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)

GuangchuangYu/treeio documentation built on April 12, 2024, 5:25 a.m.