3 \title{Write Tree File in Parenthetic Format}
5 write.tree(phy, file = "", append = FALSE,
6 digits = 10, tree.names = FALSE)
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
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.}
24 This function writes in a file a tree in parenthetic format using the
25 Newick (also known as New Hampshire) format.
28 a vector of mode character if \code{file = ""}, none (invisible
29 \code{NULL}) otherwise.
32 The node labels and the root edge length, if available, are written in
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). The tree names are
38 taken from the \code{names} attribute if present (they are ignored if
39 \code{tree.names} is a character vector).
42 Felsenstein, J. The Newick tree format.
43 \url{http://evolution.genetics.washington.edu/phylip/newicktree.html}
45 Olsen, G. Interpretation of the "Newick's 8:45" tree format standard.
46 \url{http://evolution.genetics.washington.edu/phylip/newick_doc.html}
49 \author{Emmanuel Paradis, Daniel Lawson
50 \email{dan.lawson@bristol.ac.uk}, and Klaus Schliep
51 \email{kschliep@snv.jussieu.fr}}
53 \code{\link{read.tree}}, \code{\link{read.nexus}},
54 \code{\link{write.nexus}}