powered by
dummy(x, data = NULL, drop = TRUE)
TRUE
df <- data.frame(y = rnorm(25), x = runif(25,0,1), sex = sample(1:2, 25, rep=TRUE)) dummy(df$sex)
Run the code above in your browser using DataLab