Skip to content

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

@BorgeJorge

Description

@BorgeJorge

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions