]> git.donarmstrong.com Git - ape.git/blob - man/write.tree.Rd
a90f4c5816a14c8e318b51f7e6bf093686ca8e6e
[ape.git] / man / write.tree.Rd
1 \name{write.tree}
2 \alias{write.tree}
3 \title{Write Tree File in Parenthetic Format}
4 \usage{
5 write.tree(phy, file = "", append = FALSE,
6            digits = 10, tree.names = FALSE)
7 }
8 \arguments{
9   \item{phy}{an object of class \code{"phylo"} or \code{"multiPhylo"}.}
10   \item{file}{a file name specified by either a variable of mode character,
11     or a double-quoted string; if \code{file = ""} (the default) then the
12     tree is written on the standard output connection (i.e. the console).}
13   \item{append}{a logical, if \code{TRUE} the tree is appended to the file
14     without erasing the data possibly existing in the file, otherwise
15     the file (if it exists) is overwritten (\code{FALSE} the default).}
16   \item{digits}{a numeric giving the number of digits used for printing
17     branch lengths.}
18   \item{tree.names}{either a logical or a vector of mode character. If
19     \code{TRUE} then any tree names will be written prior to the tree on
20     each line. If character, specifies the name of \code{"phylo"}
21     objects which can be written to the file.}
22 }
23 \description{
24   This function writes in a file a tree in parenthetic format using the
25   Newick (also known as New Hampshire) format.
26 }
27 \value{
28   a vector of mode character if \code{file = ""}, none (invisible
29   `NULL') otherwise.
30 }
31 \details{
32   The node labels and the root edge length, if available, are written in
33   the file.
34
35   If \code{tree.names == TRUE} then a variant of the Newick format is
36   written for which the name of a tree precedes the Newick format tree
37   (parentheses are eventually deleted beforehand).
38 }
39 \references{
40   Felsenstein, J. The Newick tree format.
41   \url{http://evolution.genetics.washington.edu/phylip/newicktree.html}
42
43   Olsen, G. Interpretation of the "Newick's 8:45" tree format standard.
44   \url{http://evolution.genetics.washington.edu/phylip/newick_doc.html}
45 }
46
47 \author{Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr} and Daniel
48   Lawson \email{dan.lawson@bristol.ac.uk}}
49 \seealso{
50   \code{\link{read.tree}}, \code{\link{read.nexus}},
51   \code{\link{write.nexus}}
52 }
53 \keyword{manip}
54 \keyword{IO}