top | R Documentation |
Identify top entries in a vector or given field in data frame.
top(
x,
field = NULL,
n = NULL,
output = "vector",
round = NULL,
na.rm = FALSE,
include.rank = FALSE
)
x |
data.frame, matrix, or vector |
field |
Field or column to check for a data.frame or matrix |
n |
Number of top entries to show |
output |
Output format: vector or data.frame |
round |
Optional rounding |
na.rm |
Logical. Remove NA before calculating the statistics. |
include.rank |
Include ranking if the output is data.frame. Logical. |
Vector of top counts, named by the corresponding entries
Leo Lahti leo.lahti@iki.fi
See citation("bibliographica")
data(dietswap)
p <- top(meta(dietswap), "group", 10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.