powered by
Write a newick formatted phylogenetic tree.
write.tree(tree = NULL, file = NULL)
If file is NULL, the newick string as a character vector. Otherwise, the return value from writeChar, typically invsible(NULL).
writeChar
A phylo object, as returned from read.tree. Also accepts a BIOM object if it has a phylogentic tree.
phylo
BIOM
Filename or connection to write the newick file to (optional).
library(rbiom) infile <- system.file("extdata", "newick.tre", package = "rbiom") tree <- read.tree(infile) newick <- write.tree(tree)
Run the code above in your browser using DataLab