write.tree: Write a newick formatted phylogenetic tree.

Description Usage Arguments Value Examples

View source: R/write.tree.r

Description

Write a newick formatted phylogenetic tree.

Usage

1
write.tree(tree = NULL, file = NULL)

Arguments

tree

A phylo object, as returned from read.tree.

file

Filename or connection to write the newick file to (optional).

Value

If file is NULL, the newick string as a character vector. Otherwise, the return value from writeChar, typically invsible(NULL).

Examples

1
2
3
4
5
    library(rbiom)
    
    infile <- system.file("extdata", "newick.tre", package = "rbiom")
    tree   <- read.tree(infile)
    newick <- write.tree(tree)

cmmr/rbiom documentation built on Nov. 21, 2018, 10:04 a.m.