dummize_ipd | R Documentation |
This is a convenient function to convert categorical variables into dummy binary variables. This would be especially useful if the variable has more than two factors. Note that the original variable is kept after a variable is dummized.
dummize_ipd(raw_ipd, dummize_cols, dummize_ref_level)
raw_ipd |
ipd data that contains variable to dummize |
dummize_cols |
vector of column names to binarize |
dummize_ref_level |
vector of reference level of the variables to binarize |
ipd with dummized columns
data(adsl_twt)
dummize_ipd(adsl_twt, dummize_cols = c("SEX"), dummize_ref_level = c("Male"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.