Learn R Programming

RNeXML (version 2.4.11)

nexml-class: Class representing a NeXML document

Description

The nexml class represents a NeXML document, and is the top of the class hierarchy defined in this package, corresponding to the root node of the corresponding XML document.

Arguments

Slots

trees

list, corresponding to the list of <trees/> elements in NeXML. Elements will be of class trees.

characters

list, corresponding to the list of <characters/> elements in NeXML. Elements will be of class characters.

otus

list, corresponding to the list of <otus/> elements in NeXML. Elements will be of class otus.

about

inherited, see Annotated

meta

inherited, see Annotated

xsi:type

for internal use

version

NeXML schema version, do not change

generator

name of software generating the XML

xsi:schemaLocation

for internal use, do not change

namespaces

named character vector giving the XML namespaces

Details

Normally objects of this type are created by the package as a result of reading a NeXML file, or of converting from another type, such as ape::phylo. Also, interacting directly with the slots of the class is normally not necessary. Instead, use the get_XXX() and add_XXX() functions in the API.

See Also

read.nexml()

Examples

Run this code
nex <- nexml() # a nexml object with no further content
nex <- new("nexml") # accomplishes the same thing
nex@generator
length(nex@trees)

data(bird.orders)
nex <- as(bird.orders, "nexml")
summary(nex)
length(nex@trees)

Run the code above in your browser using DataLab