Description Usage Arguments Examples
Produces an ordered list by frequency.
1 | commonlist(group, cut = 20, plot = FALSE)
|
group |
|
cut |
frequency cut-off value |
plot |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
function (group, cut = 20, plot = FALSE)
{
x <- as.data.frame(table(group))
x <- data.frame(x, prop = x$Freq/sum(x$Freq))
if (plot) {
plot(x$Var1[x$Freq > cut], x$Freq[x$Freq > cut], las = 3)
}
x[x$Freq > cut, ][order(x[x$Freq > cut, "Freq"], decreasing = TRUE),
]
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.