summary,nexml-method | R Documentation |
Generates a list of various counts of the major elements that comprise a nexml object, such as number of different kinds of blocks, characters, states, OTUs (taxa), etc.
## S4 method for signature 'nexml' summary(object)
object |
the nexml object |
The show method uses this summary for pretty-printing a summary of the NeXML object, but it can be used on its own as well, in particular for quick inspection of key properties of a NeXML file.
A list with the following elements:
nblocks
the number of trees, otus, and characters blocks
ncharacters
the number of characters in each characters block
nstates
summary statistics of the number of character states per state set
defined for each characters block
nnonstdstatedefs
the number of polymorphic and uncertain states defined
for each character block
nmatrixrows
the number of rows in the matrix for each character block
ntrees
the number of trees contained in each trees block
notus
the number of OTUs defined in each OTUs block
nmeta
a list of the number of the number of metadata annotations at
several levels, specifically:
nexml
at the top (nexml) level
otu
at the OTU level, for each OTUs block
char
at the character level, for each characters block
state
at the character state level, for each characters block
nex <- nexml_read(system.file("examples", "comp_analysis.xml", package = "RNeXML")) s <- summary(nex) # number of major blocks: s$nblocks # each characters block defines 1 character: s$ncharacters # summary stats of states per character (for morphological matrices there is # typically one state set per character) s$nstates # note that first block is of continuous type, so no stats there # pretty-printed summary: nex # this is the same as show(nex)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.