]> git.donarmstrong.com Git - ape.git/blob - man/write.tree.Rd
new code for reading FASTA files
[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   \code{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). 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).
40 }
41 \references{
42   Felsenstein, J. The Newick tree format.
43   \url{http://evolution.genetics.washington.edu/phylip/newicktree.html}
44
45   Olsen, G. Interpretation of the "Newick's 8:45" tree format standard.
46   \url{http://evolution.genetics.washington.edu/phylip/newick_doc.html}
47 }
48
49 \author{Emmanuel Paradis, Daniel Lawson
50   \email{dan.lawson@bristol.ac.uk}, and Klaus Schliep
51   \email{kschliep@snv.jussieu.fr}}
52 \seealso{
53   \code{\link{read.tree}}, \code{\link{read.nexus}},
54   \code{\link{write.nexus}}
55 }
56 \keyword{manip}
57 \keyword{IO}