write.beast: write.beast

View source: R/write-beast.R

write.beastR Documentation

write.beast

Description

Export treedata object to BEAST NEXUS file. This function was adopted and modified from ape::write.nexus

Usage

write.beast(treedata, file = "", translate = TRUE, tree.name = NULL)

Arguments

treedata

treedata object, list of treedata, phylo, or list of phylo

file

output file. If file = "", print the output content on screen

translate

whether to translate taxa labels

tree.name

names of the trees, NULL to use existing tree names

Value

output file or file content on screen

Author(s)

Guangchuang Yu

Examples

nhxfile <- system.file("extdata/NHX", "phyldog.nhx", package="treeio")
nhx <- read.nhx(nhxfile)
write.beast(nhx)

YuLab-SMU/treeio documentation built on Nov. 3, 2024, 4:17 p.m.