dummy_convert {TwoArmSurvSim} | R Documentation |
Convert Categorical Data to Dummy Variables
Description
Convert Categorical Data to Dummy Variables
Usage
dummy_convert(dataset,column_names)
Arguments
dataset |
Data frame that contains the categorical columns |
column_names |
A list of column names that need to be converted to dummy variables. |
Examples
x<-data.frame(trt=as.factor(rbinom(100,1,0.5)), Gender=as.factor(rbinom(100,1,0.5)))
dummy_convert(x,c("trt","Gender"))
[Package TwoArmSurvSim version 0.2 Index]