Learn R Programming

rbmi (version 1.4.1)

extract_covariates: Extract Variables from string vector

Description

Takes a string including potentially model terms like * and : and extracts out the individual variables

Usage

extract_covariates(x)

Arguments

x

string of variable names potentially including interaction terms

Details

i.e. c("v1", "v2", "v2*v3", "v1:v2") becomes c("v1", "v2", "v3")