fct_describe | R Documentation |
Outputs a single character with names and counts of each level of the input factor.
fct_describe(x, max_n = 5, return_ordered = TRUE)
x |
factor. |
max_n |
Integer: Return counts for up to this many levels. |
return_ordered |
Logical: If TRUE, return levels ordered by count, otherwise return in level order. |
Character with level counts.
EDG
## Not run:
# Small number of levels
fct_describe(iris$Species)
# Large number of levels: show top n by count
x <- factor(sample(letters, 1000, TRUE))
fct_describe(x)
fct_describe(x, 3)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.