extract_rhs_varnames: Extract variable names from right side of model formula

View source: R/illustrative-analysis-helpers.R

extract_rhs_varnamesR Documentation

Extract variable names from right side of model formula

Description

Extract variable names from right side of model formula

Usage

extract_rhs_varnames(form, dat)

Arguments

form

Formula object

dat

Dataframe on which the formula is applied

Value

Character vector of variable names in right hand side of formula

Examples

form <- reformulate(
  termlabels = c("age_allo1_decades", "mdsclass"),
  response = "Surv(ci_allo1, ci_s_allo1 == 1)"
)

extract_rhs_varnames(form, dat_mds_synth)


survival-lumc/CauseSpecCovarMI documentation built on June 16, 2022, 9:51 a.m.