top | R Documentation |
Identify the top entries in a vector or for a given field in a 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")
## Not run: p <- top(df, field, 10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.