ft_mapping | R Documentation |
Creates a data frame mapping the original factor levels to the modified levels.
ft_mapping(original_factor, modified_factor)
original_factor |
The original factor vector before modification. |
modified_factor |
The modified factor vector after modification. |
A data frame containing the mapping of original to modified levels.
Kai Guo
# Original and modified factor vectors
original_factor <- factor(c('apple', 'banana', 'cherry'))
modified_factor <- factor(c('apple_fruit', 'banana_fruit', 'cherry_fruit'))
# Create mapping table
ft_mapping(original_factor, modified_factor)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.