make_formula: Create a formula

Description Usage Arguments Details Value Examples

View source: R/formula.R

Description

Creates a new formula object to be used anywhere formulas are used (i.e, glm).

Usage

1
make_formula(..., lhs = TRUE, op = "+", group = NULL)

Arguments

...

any number of arguments to compose the formula

lhs

a boolean indicating if the formula has a left hand side of the argument

op

the operand acting upon the arguments of the right side of the formula.

group

an argument to use as a grouping variable to facet by

Details

If lhs is TRUE, the first argument provided is used as the left hand side of the formula. The group paramenter will add | group to the end of the formula. This is useful for packages that support faceting by grouping variables for the purposes of tables or graphs.

Value

a formula

Examples

1
2
3
make_formula(var1, var2, var3)
make_formula(var1, var2, var3, lhs = FALSE)
make_formula(var1, var2, var3, lhs = FALSE, group = var4)

dylanrussellmd/nsqipBileSpill documentation built on Dec. 20, 2021, 2:17 a.m.