extract a phylogenetic tree from the nexml
Value
an ape::phylo tree, if only one tree is represented.
Otherwise returns a list of lists of multiphylo trees.
To consistently receive the list of lists format (preserving
the hierarchical nature of the nexml), use get_trees_list
instead.
See also
get_trees
get_flat_trees
get_item
Examples
comp_analysis <- system.file("examples", "comp_analysis.xml", package="RNeXML")
nex <- nexml_read(comp_analysis)
get_trees(nex)
#>
#> Phylogenetic tree with 10 tips and 9 internal nodes.
#>
#> Tip labels:
#> taxon_8, taxon_9, taxon_10, taxon_1, taxon_2, taxon_3, ...
#>
#> Rooted; includes branch lengths.