formulate takes the inputs and assembles a formula object

formulate(lhs = NULL, ...)

Arguments

lhs

(string|symbol) The left-hand side of the formula

...

(dots-list) Elements to use on the right-hand side of the formula

Value

A formula

...

  • Length-1 elements are treated as terms

  • Vectors are reduced as individual terms

  • Refer to formula for valid syntax

See also

Other Data Generation: make.date_time()

Examples

formulate(score)
#> score ~ .
#> <environment: 0x636e5e916ec0>
formulate(score, )
#> score ~ .
#> <environment: 0x636e5ea9a650>
formulate(score, -that)
#> score ~ . - that
#> <environment: 0x636e5eb8ec50>
formulate(score, this)
#> score ~ this
#> <environment: 0x636e5ebf1c68>
formulate(score, this:that)
#> score ~ this:that
#> <environment: 0x636e5ec7e930>
formulate(score, this*that)
#> score ~ this * that
#> <environment: 0x636e5ecfe480>
formulate(score, this, -that, c(that:other, high*low))
#> score ~ this - that + that:other + high * low
#> <environment: 0x636e5ed6d588>