Description Usage Arguments Examples
Convience method for dealing with factors. Map a list of vectors to a list of factor vectors (1-1 mapping) such that the factor vectors all have the same levels - the unique values of the union of all the vectors in the list. Optionally group all low frequency values into a "_other_" level.
1 | set_factor(vectorList, aggregationThreshold = 0)
|
vectorList |
A list of values to convert to factors |
aggregationThreshold |
Values which appear this many times or less will be grouped into the level "_other_" |
1 2 3 4 | x <- c("a", "b", "c", "c")
y <- c("a", "d", "d")
set_factor(list(x, y))
set_factor(list(x, y), aggregationThreshold=1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.