top {microbiome} | R Documentation

## Identify Top Entries

### Description

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

### Usage

    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

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

[Package microbiome version 1.14.0 Index]