View source: R/Model_formula_tools.R
deconstruct_formula | R Documentation |
Deconstruct a formula object into strings of its components. Predictors are split by '+', so interaction terms will be returned as a single string.
deconstruct_formula(formula)
formula |
formula object for use in statistical models. |
a named list with fields:
outcome (character)
predictors (vector of characters)
censor_event (character) (optional) censor event, only for formulas including a Surv() object
J. Peter Marquardt
deconstruct_formula(stats::as.formula("outcome ~ predictor1 + predictor2 + predictor3"))
deconstruct_formula(stats::as.formula("Surv(outcome, censor_event) ~ predictor"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.