df2tree: From a dataframe to construct a phylo

View source: R/phylogenetic.R

df2treeR Documentation

From a dataframe to construct a phylo

Description

NOTE: this function will do before_tree first.

Usage

df2tree(data, edge_df = FALSE)

Arguments

data

dataframe

edge_df

if the data is edge_df ?

Value

phylo object

Examples

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))
}

pctax documentation built on May 29, 2024, 10:03 a.m.