top: Identify Top Entries

Description Usage Arguments Value Author(s) References Examples

View source: R/top.R

Description

Identify the top entries in a vector or for a given field in a data frame.

Usage

1
2
top(x, field = NULL, n = NULL, output = "vector", round = NULL,
  na.rm = FALSE, include.rank = FALSE)

Arguments

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.

Value

Vector of top counts, named by the corresponding entries

Author(s)

Leo Lahti [email protected]

References

See citation("bibliographica")

Examples

1
## Not run: p <- top(df, field, 10)

rOpenGov/bibliographica documentation built on Nov. 19, 2018, 10:55 a.m.