Learn R Programming

itol.toolkit (version 1.1.7)

learn_df: Learn from tree

Description

Learn initial data frame from Newick format tree leaves.

Usage

learn_df(tree, node = FALSE, tip = TRUE)

Value

a list containing

node

a data frame with id column. The id information is from the node label in Newick format tree file or phylo object. If the node parameter set as FALSE, the node information will be NULL.

tip

a data frame with id column. The id information is from the tip label in Newick format tree file or phylo object. If the tip parameter set as FALSE, the tip information will be NULL.

Arguments

tree

Newick tree file or phylo object.

node

a logical to control output with node label or not. The default value is FALSE.

tip

a logical to control output tip label or not.The default value is TRUE.

Examples

Run this code
tree <- system.file("extdata",
                    "tree_of_itol_templates.tree",
                    package = "itol.toolkit")
sub_df <- learn_df(tree,node=TRUE,tip=TRUE)

Run the code above in your browser using DataLab