ft_level_order | R Documentation |
Returns a vector indicating the order in which factor levels appear in the data.
ft_level_order(factor_vec)
factor_vec |
A factor vector. |
A numeric vector representing the order of levels.
Kai Guo
# Example factor vector
factor_vec <- factor(c('banana', 'apple', 'cherry', 'apple', 'banana'))
# Get level order
ft_level_order(factor_vec)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.