Description Usage Arguments Details Value Author(s) References Examples
Merge the less common terms into a single group
1 | compress_field(x, topn = NULL, min.freq = NULL, rest = "Other")
|
x |
Vector or factor. |
topn |
Number of top entries to include; or a character vector |
min.freq |
Minimum frequency for the included groups. |
rest |
Name to be used for the remaining entries |
With the min.freq argument, groups that have less items that this will be merged.
Compressed version of the input.
Leo Lahti leo.lahti@iki.fi
See citation("comhis")
1 2 3 4 | p <- compress_field(c("A", "A", "A", "B","B","C", "D"),
topn = 2, rest = "Other")
p <- compress_field(c("A", "A", "A", "B","B","C", "D"),
topn = c("A", "B"), rest = "Other")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.