View source: R/functions_wrapper.R
| binarize_dataset | R Documentation |
Binarize dataset
Will create one column per category if specified, otherwise for all columns except for the last one. Will also update datainfo so that new columns have type covariate and is categorical.
binarize_dataset(model, columns, keep = FALSE, all_levels = FALSE)
model |
(Model) Pharmpy model |
columns |
(array(str) (optional)) The columns to binarize or NULL for all marked as categorical |
keep |
(logical) Keep the original column in dataset (default is FALSE) |
all_levels |
(logical) Create one column per level, otherwise skip last value (default is FALSE) |
(Model) Updated Pharmpy model
## Not run:
model <- load_example_model("pheno")
model <- binarize_dataset(model, c('APGR'))
model$dataset
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.