write.beast.newick: write.beast.newick

View source: R/write-beast.R

write.beast.newickR Documentation

write.beast.newick

Description

Export treedata object to BEAST Newick file. This is useful for making BEAST starting trees with metadata

Usage

write.beast.newick(
  treedata,
  file = "",
  append = FALSE,
  digits = 10,
  tree.prefix = ""
)

Arguments

treedata

treedata object

file

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

append

logical. Only used if the argument 'file' is the name of file (and not a connection or "|cmd"). If 'TRUE' output will be appended to 'file'; otherwise, it will overwrite the contents of file.

digits

integer, the indicating the number of decimal places, default is 10.

tree.prefix

character the tree prefix, default is "".

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.newick(nhx)

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