Skip to contents

tp_phylo_to_tpjson takes an object of class phylo and returns a TreePPL json str ready to print in a data file for TreePPL use.

Usage

tp_phylo_to_tpjson(phylo_tree, age = "")

Arguments

phylo_tree

an object of class ape::phylo.

age

a string that determines the way the age of the nodes are calculated (default "branch-length").

  • "branch-length" : Root's age = NA, branch-length from the parent branch

  • "root-to-tip" : Root's age = 0.0, cumulative branch-length from root

  • "tip-to-root" : Leaf's age = 0.0, cumulative branch-length from leaf

Value

A TreePPL json str