additional arguments, if applicable to certain elements
Value
return type depends on the element requested. See details.
Details
"tree" an ape::phylo tree, if only one tree is represented. Otherwise returns a list of lists of multiphylo trees. To consistently recieve the list of lists format (preserving the heriarchical nature of the nexml), use trees instead.
"trees" returns a list of lists of multiphylo trees, even if all trees are in the same `trees` node (and hence the outer list will be of length 1) or if there is only a single tree (and hence the inner list will also be of length 1. This guarentees a consistent return type regardless of the number of trees present in the nexml file, and also preserves any heirarchy/grouping of trees.
"flat_trees" a multiPhylo object (list of ape::phylo objects) Note that this method collapses any heirachical structure that may have been present as multiple `trees` nodes in the original nexml (though such a feature is rarely used). To preserve that structure, use `trees` instead.
"metadata"Get metadata from the specified level (default is top/nexml level)
"otu" returns a named character vector containing all available metadata. names indicate property (or rel in the case of links/resourceMeta), while values indicate the content (or href for links).
"taxa" alias for otu
For a slightly cleaner interface, each of these elements is also defined as an S4 method
for a nexml object. So in place of `get_item(nexml, "tree")`, one could use `get_tree(nexml)`,
and so forth for each element type.