| summary,nexml-method {RNeXML} | R Documentation |
Summary method for nexml objects
Description
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.
Usage
## S4 method for signature 'nexml'
summary(object)
Arguments
object |
the nexml object |
Details
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.
Value
A list with the following elements:
-
nblocksthe number of trees, otus, and characters blocks -
ncharactersthe number of characters in each characters block -
nstatessummary statistics of the number of character states per state set defined for each characters block -
nnonstdstatedefsthe number of polymorphic and uncertain states defined for each character block -
nmatrixrowsthe number of rows in the matrix for each character block -
ntreesthe number of trees contained in each trees block -
notusthe number of OTUs defined in each OTUs block -
nmetaa list of the number of the number of metadata annotations at several levels, specifically:-
nexmlat the top (nexml) level -
otuat the OTU level, for each OTUs block -
charat the character level, for each characters block -
stateat the character state level, for each characters block
-
Examples
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)