powered by
factor
unfactor
unfactor(x, levels, labels, numeric = FALSE)
#### create sample of male/female participants (at random) x = as.factor(sample(c("Male", "Female"), 12, replace=TRUE)) unfactor(x, levels=c(0,1), labels=c("Male", "Female"))
Run the code above in your browser using DataLab