Learn R Programming

RAM (version 1.2.1.3)

group.rich: Barplot Of Richness For Each Level Of A Given Metadata Variable

Description

This function first use specpool to estimate the extrapolated species richness in a species pool (levels of metadata variable), and the number of unobserved species, then do a barplot.

Usage

group.rich(otu, meta, factor, file=NULL, ext=NULL, width=8, height=8)

Arguments

otu
an OTU table.
meta
the metadata table to be used (must have same samples as data.
factor
a character string. Must be one of the metadata variables.
file
optional. Filename that the plot to be saved to.
ext
optional. Filename extension, type of image to be saved.
width
an integer. Filter OTU table by counts.
height
an integer. Filter OTU table by counts.

Value

This function returns a barplot of species richness for a given metadata variable.

See Also

specpool, specpool

Examples

Run this code
data(ITS1, meta)
group.rich(ITS1, meta, "Crop")

Run the code above in your browser using DataLab