Converts a factor with numeric levels to a numeric vector, using the values of the levels.
as.numeric_factor(x, keepNA = FALSE, sortUnique = FALSE)
A factor based on numeric values.
Keep NA values (TRUE
), or remove them (default = FALSE
)
Should the unique character values be sorted? (default = FALSE
)
A numeric vector with factor levels as names.