top: Identify Top Entries

Description Usage Arguments Value Author(s) References Examples

Description

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

Usage

1
2
3
4
5
6
7
8
9
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 leo.lahti@iki.fi

References

See citation("bibliographica")

Examples

1
2
  data(dietswap)
  p <- top(meta(dietswap), "group", 10)

microbiome documentation built on Nov. 8, 2020, 5:08 p.m.