metacoder (version 0.1.3)

class_to_taxonomy: List of classifications to taxonomy tree

Description

Convert a list of classifications to a taxonomic tree structure. Columns in the input not used to create the taxonomy are preserved in the output. Unique IDs can be assigned if the column used to create the taxonomy does not have unique values for place in the hierarchy (e.g. same species epithet in different phlya.) Missing data does not effect the taxonomy, but its positon is preserved in the observation output.

Usage

class_to_taxonomy(classifications, id_column, obs_data = NULL)

Arguments

classifications

(list of data.frame) The classifications of a set of observations. Not necessarily unique. Rows should correspond to taxa and columns to information associated with those taxa.

id_column

(character of length 1) The name of the column present in each data.frame in classifications that will be used to infer the taxonomic tree structure.

obs_data

(data.frame) Data associated with the classifications.

Value

An object of type taxmap