Learn R Programming

ggphylo (version 0.1)

tags.into.df: Given a phylo object and a data frame, transform all the tags from the tree ' into columns of the data frame. Rows of the data frame are linked to the tree via a required 'node' column, which must contain integer indices of the associated node.

Description

This function is similar to the tree.as.data.frame method, but not exactly the same. It is used internally by the tree.layout function.

Usage

tags.into.df(phylo, df)

Arguments

phylo,
input phylo object
df,
data.frame with a 'node' column corresponding to integer indices of tree nodes.

Value

df, a copy of the input data frame, with tags added as new columns