R/get_x.R

Defines functions get_x

get_x = function(formula, meta_data) {
    opt = options(na.action = "na.pass") # Keep NA's in rows of x
    on.exit(options(opt)) # Switch it back
    x = model.matrix(formula(paste0("~", formula)), data = meta_data)
    return(x)
}

Try the ANCOMBC package in your browser

Any scripts or data that you put into this service are public.

ANCOMBC documentation built on March 11, 2021, 2 a.m.