scl <- DexiDiscreteScale(values = c("low", "med", "high"))
value_to_set(1, scl) # 1
value_to_set(1:2, scl) # c(1, 2)
value_to_set(c(1,3), scl) # c(1, 3)
value_to_set(distribution(1, 0, 0.5), scl) # c(1, 3)
Run the code above in your browser using DataLab