Closed cboettig closed 10 years ago
Would it be possible to indicate how many trees per tree block?
Summary now prints number of trees by block:
A nexml object representing:
2 phylogenetic tree blocks, where:
block 1 contains 2 phylogenetic trees
block 2 contains 2 phylogenetic trees
2 meta elements
0 character matrices
92 taxonomic units
Taxa: Struthioniformes, Tinamiformes, Craciformes, Galliformes, Anseriformes, Turniciformes ...
NeXML generated by RNeXML using schema version: 0.9
size: 1.1 Mb
With only one block it will still show the same layout as above, just saying 1 phylogenetic tree
, block 1 contains
... @rvosa this was a great suggestion, particularly since we provide different functions to handle different ways of converting the trees blocks into phylo objects, e.g. preserving always the block structure: get_trees_list()
, or automatically collapsing length 1 lists with get_trees
(so that a single tree in a single block is a "phylo" and not a 'list of multiPhylo. These functions are the same if there are multiple blocks with multiple trees.) We also have get_flat_trees
which combines all blocks into a single multiPhylo list. So it's great that the user can now see the internal NeXML structure nicely summarized to help choose the appropriate format.
I'm definitely open to suggestions for tweaking this summary display further.
Done, see
nexml_methods.R
. Suggestions for improvement welcome.Example:
show
just callssummary
(analogous to the S3print
method inape::phylo
). Any suggestions / reasons for a separateshow
methodLiterally showing all the data would probably just be messy in any format, users wanting to see the nexml can look at the file (or
cat(write.nexml(nexml))
to see in the R console).