Export multiple treedata objects (S4 class tree files) to BEAST NEXUS file
write.beast.treedata.RdThis function was adopted and modified from treeio::write.beast to export a list of trees instead of a single tree.
Arguments
- treedata
 An S4 class object of type
treedatacontaining multiple trees; e.g. a Bayesian clock tree distribution imported usingtreeio::read.beastortreeio::read.mrbayes.- file
 Output file. If
file = "", prints the output content on screen.- translate
 Whether to translate taxa labels.
- tree.name
 Name of the trees, default
"STATE".
Examples
#Load file with multiple trees
if (FALSE) { # \dontrun{
trees_file = system.file("extdata", "ex_offset.trees", package = "EvoPhylo")
posterior_trees_offset = treeio::read.beast(trees_file)
#Write multiple trees to screen
write.beast.treedata(posterior_trees_offset)
} # }