Learn R Programming

pctax (version 0.1.3)

df2tree: From a dataframe to construct a phylo

Description

NOTE: this function will do before_tree first.

Usage

df2tree(data, edge_df = FALSE)

Value

phylo object

Arguments

data

dataframe

edge_df

if the data is edge_df ?

Examples

Run this code
data(otutab, package = "pcutils")
df2tree(taxonomy) -> tax_tree
print(tax_tree)
# check all nodes matched!
if (requireNamespace("picante")) {
  picante::match.phylo.comm(tax_tree, t(otutab)) -> nn
  nrow(nn$comm) == nrow(t(otutab))
}

Run the code above in your browser using DataLab