nexml_get {RNeXML}R Documentation

Get the desired element from the nexml object

Description

Get the desired element from the nexml object

Usage

nexml_get(
  nexml,
  element = c("trees", "trees_list", "flat_trees", "metadata", "otu", "taxa",
    "characters", "characters_list", "namespaces"),
  ...
)

Arguments

nexml

a nexml object (from read_nexml)

element

the kind of object desired, see details.

...

additional arguments, if applicable to certain elements

Details

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.

Value

return type depends on the element requested. See details.

See Also

get_trees

Examples

comp_analysis <- system.file("examples", "comp_analysis.xml", package="RNeXML")
nex <- nexml_read(comp_analysis)
nexml_get(nex, "trees")
nexml_get(nex, "characters_list")

[Package RNeXML version 2.4.11 Index]