powered by
Convert a factor with numeric levels to a non-factor (numeric).
factor_to_num(x)
A vector containing a factor with numeric levels.
The input factor made into a numeric vector.
# NOT RUN { x <- factor(c(3, 4, 9, 4, 9), levels = c(3, 4, 9)) factor_to_num(x) # }
Run the code above in your browser using DataLab