read.newick.tree: Read a Newick Tree from a File

Description Usage Arguments Details Value Author(s) Examples

View source: R/trees.R

Description

Read a tree from a file

Usage

1
read.newick.tree(filename)

Arguments

filename

The file containing the tree.

Details

Reads a tree in newick format

Value

a character string representing the tree in newick format

Author(s)

Melissa J. Hubisz and Adam Siepel

Examples

1
2
3
4
5
cat(c("((hg18:0.142679,(mm9:0.083220,rn4:0.090564):0.269385):0.020666,canFam2:0.193569);",
      "(human, (mouse, rat));",
      sep="\n"), file="test.nh")
read.newick.tree("test.nh")
unlink("test.nh")

Example output

[1] "((hg18:0.142679,(mm9:0.083220,rn4:0.090564):0.269385):0.020666,canFam2:0.193569);"
[2] "(human,(mouse,rat));"                                                             

rphast documentation built on May 1, 2019, 9:26 p.m.