formula_tools | R Documentation |
Tools for manipulating formulas
lhs(formulas, surv = FALSE)
lhs(formulas) <- value
rhs_vars(formulas)
tidy_formulas(formulas, kwd, prefix = "V")
formulas |
list of formulae |
surv |
logical indicating whether to treat as survey data |
value |
character vector to assign |
kwd |
string used to denote copula |
prefix |
string to begin each new variable name |
lhs
returns a character vector containing left-hand sides of a
list of formulae. If surv=TRUE
then two responses are returned in the
event of the left-hand side being a valid Surv
object. lhs<-
allows
one to assign the left-hand sides of variables in the obvious way.
tidy_formulas
ensures that all formulae in a list have a left hand side,
by giving them names of the form Vn
where n
is some positive integer. The
prefix V
can be changed using the argument prefix
.
rhs_vars
extracts all the variables used on the right-hand sides of a list
of formulas.
lhs()
: Obtain left-hand sides from list of formulas
lhs(formulas) <- value
: Assign left-hand sides to list of formulas
rhs_vars()
: Extract variables from right-hand sides
tidy_formulas()
: Tidy up formulae
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.