Parse a formula to finalfit grammar

ff_parse_formula(.formula)

Arguments

.formula

an object of class "formula" (or one that can be coerced to that class).

Value

A list containing dependent, explanatory and random effects variables

Examples

ff_parse_formula(mort ~ age + sex + (1 | hospital))
#> $dependent
#> [1] "mort"
#> 
#> $explanatory
#> [1] "age" "sex"
#> 
#> $random_effect
#> [1] "( 1 | hospital )"
#>