
Convert a pf or pfc object to a ape::phylo object
pf_as_phylo.RdThis function attempts to convert a pf or pfc object
to a phylogenyin phylo format (from package {ape}).
It will use the feature as branch lengths, and if edges
have multiple feature values, they will be aggregated
by averaging them. Note that this function can fail if the
pf or pfc does not have a tree-like structure. An example
of this would be an 'interaction' pfc (as generated by
pf_interaction)
Examples
pf_as_phylo(rpfc(100))
#>
#> Phylogenetic tree with 100 tips and 99 internal nodes.
#>
#> Tip labels:
#> t75, t55, t89, t62, t28, t81, ...
#> Node labels:
#> root, Node3, Node18, Node22, Node40, Node61, ...
#>
#> Rooted; includes branch lengths.