get_hier: Add classification information to community data

Description Usage Arguments Value Examples

Description

Add classification information to community data

Usage

1
get_hier(x, taxa.var = "NULL", db = "itis", ...)

Arguments

x

data.frame; community data. Nore this must be in transposed wide format. (taxa in rows, samples in columns). See examples.

taxa.var

character; column of taxon names.

db

character; database to retrieve classification data. See classification for more details.

...

Other arguments passed to classification,

Value

A list of class wide_class, with the following elements:

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
data(samp)
# transpose data
df <- data.frame(t(samp), stringsAsFactors = FALSE)
df[ , 'taxon'] <- rownames(df)

# clean taxa names
get_hier(df, taxa.var = 'taxon', db = 'itis')

## End(Not run)

EDiLD/restax documentation built on May 6, 2019, 3:04 p.m.