powered by
Convert dummy-coded variables to low/medium/high factor
ec_undummy_lowmediumhigh(vec_in)
A factor vector with levels "low", "medium" and "high"
A vector of dummy-coded variables (0/1/2)
ec_undummy_lowmediumhigh(c(0,1,2,1,0,2))
Run the code above in your browser using DataLab