ff_formula: Generate formula as character string

ff_formulaR Documentation

Generate formula as character string

Description

Useful when passing finalfit dependent and explanatory lists to base R functions

Usage

ff_formula(dependent, explanatory, random_effect = NULL)

finalfit_formula(dependent, explanatory, random_effect = NULL)

Arguments

dependent

Optional character vector: name(s) of depdendent variable(s).

explanatory

Optional character vector: name(s) of explanatory variable(s).

random_effect

Optional character vector: name(s) of random effect variable(s).

Value

Character vector

Examples

explanatory = c("age", "nodes", "sex.factor", "obstruct.factor", "perfor.factor")
dependent = "mort_5yr"
ff_formula(dependent, explanatory)

explanatory = c("age", "nodes", "sex.factor", "obstruct.factor", "perfor.factor")
dependent = "mort_5yr"
random_effect = "(age.factor | hospital)"
ff_formula(dependent, explanatory)

finalfit documentation built on Sept. 11, 2024, 9:01 p.m.