write.simmap: Write a stochastic character mapped tree to file

Description Usage Arguments Value Author(s) References See Also


This function writes stochastic character mapped trees to file using the Newick style format of SIMMAP v1.0 (Bollback 2006). Note, can only write one tree at a time to file (hence the append option).


write.simmap(tree, file=NULL, append=FALSE, map.order=NULL, quiet=FALSE)



a phylogenetic tree as a modified object of class "phylo". See make.simmap and read.simmap.


an optional filename.


a logical value indicating whether to append to file.


a optional value specifying whether to write the map in left-to-right or right-to-left order. Acceptable values are "left-to-right" or "right-to-left" or some abbreviation of either. If not provided, write.simmap will use attr(tree,"map.order") if available.


logical value indicating whether or not to print a warning message when map.order is neither specified by a function argument or as an attribute of tree.


A file or string (if file=NULL).


Liam Revell liam.revell@umb.edu


Bollback, J. P. (2006) Stochastic character mapping of discrete traits on phylogenies. BMC Bioinformatics, 7, 88.

Huelsenbeck, J. P., R. Neilsen, and J. P. Bollback (2003) Stochastic mapping of morphological characters. Systematic Biology, 52, 131-138.

Revell, L. J. (2012) phytools: An R package for phylogenetic comparative biology (and other things). Methods Ecol. Evol., 3, 217-223.

See Also

make.simmap, read.simmap, plotSimmap

Search within the phytools package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.