Closed brj1 closed 5 months ago
I noticed a small bug in my PR in that for single trees it would grab the names of the tree object (edge, tip.label, edge.length, Ntip, etc). So I removed that from my code. I have squashed the commits into one and it is fixed here.
thanks @brj1
Description
I decided to add support for writing multiple trees in write.beast and support for phylo objects and lists of phylo objects.
I also added support for pulling the tree names from
names(treedata)
. As such, I changedtree.name = "UNTITLED"
totree.name = NULL
to make it usenames(treedata)
by default. Ifnames(treedata)
is NULL then it will use "UNTITLED" for the tree names. Settingtree.name
to a vector will pull tree names from the vector.I also changed
read.beast
to preserve the tree names. This is actually done byape::read.nexus
but it is not carried over to the output ofread.beast
. I think you are working on rewritingread.beast
so this might be moot.Related Issue
fix #39
Example
Lastly, I tested this on snippets of beast runs I had lying around, but I think it should be tested more before being pulled.
EDIT: the rexports.Rd file might not need to be changed. I think Rstudio or roxygen just decided to reorder the exports.