powered by
If the number of unique numbers is five or fewer, then they will simply be converted to factors in order, otherwise, they will be passed to cut and pretty, preserving the lowest value.
fac_from_num(x)
a factor
a vector of integers or numerics
fac_from_num(1:100) fac_from_num(sample(100, 5))
Run the code above in your browser using DataLab