compress_field | R Documentation |
Merge the less common terms into a single group
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("bibliographica")
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.