Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Formula fails, I think because f.build() surrounds a quadratic term with backticks #69

Open
BorgeJorge opened this issue May 28, 2023 · 0 comments

Comments

@BorgeJorge
Copy link

BorgeJorge commented May 28, 2023

form1 below won't work with lm() but form2 will. I think the problem is the backticks surrounding the quadratic term in form1.

data(mtcars)
form1 <- f.build('mpg', c('wt', 'I(wt^2)'))
lm(form1, data = mtcars)
form2 <- update(f.build('mpg', 'wt'), ~ . + I(wt^2))
lm(form2, data = mtcars)
@BorgeJorge BorgeJorge changed the title Formula fails because f.build() surrounds quadratic terms with backticks Formula fails, I think because f.build() surrounds a quadratic term with backticks May 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant