[Phylobase-commits] r603 - pkg/man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Aug 28 01:05:02 CEST 2009
Author: francois
Date: 2009-08-28 01:05:00 +0200 (Fri, 28 Aug 2009)
New Revision: 603
Added:
pkg/man/addData.Rd
pkg/man/phylo4-display.Rd
pkg/man/phylo4d-display.Rd
pkg/man/phylo4d-hasData.Rd
Modified:
pkg/man/phylo4-class.Rd
pkg/man/phylo4.Rd
pkg/man/phylo4d-class.Rd
pkg/man/phylo4d.Rd
Log:
reorganization of documentation and some tweaking
Added: pkg/man/addData.Rd
===================================================================
--- pkg/man/addData.Rd (rev 0)
+++ pkg/man/addData.Rd 2009-08-27 23:05:00 UTC (rev 603)
@@ -0,0 +1,52 @@
+\name{addData}
+\alias{addData}
+\alias{addData-methods}
+\alias{addData,phylo4-method}
+\alias{addData,phylo4d-method}
+
+\title{Adding data to a phylo4 or a phylo4d object}
+\description{
+ \code{addData} adds data to a \code{phylo4} (converting it in a
+ \code{phylo4d} object) or to a \code{phylo4d} object
+}
+\usage{
+\S4method{addData}{phylo4}(x, tip.data, node.data, all.data,
+pos=c("after", "before"), merge.data=TRUE, match.data=TRUE, \dots)
+\S4method{addData}{phylo4d}(x, tip.data, node.data, all.data,
+pos=c("after", "before"), merge.data=TRUE, match.data=TRUE, \dots)
+}
+\arguments{
+ \item{x}{a phylo4 or a phylo4d object}
+ \item{tip.data}{a data frame for tip data}
+ \item{node.data}{a data frame for node data}
+ \item{all.data}{a data frame for both tip an node data}
+ \item{match.data}{(logical), should the row names provided in
+ \code{tip.data}, \code{node.data} and/or \code{all.data} be used to
+ match data against the tree labels?}
+ \item{pos}{should the new data provided be bound \code{before} or
+ \code{after} the pre-existing data?}
+ \item{merge.data}{if both \code{tip.data} and \code{node.data} are
+ provided, it determines if they should be merged as a single
+ trait (if TRUE). This argument is evaluated only if both \code{tip.data} and
+ \code{node.data} have identical column names.}
+ \item{\dots}{additional arguments to be passed to \link{formatData}}
+}
+\value{
+ \code{addData} returns a \code{phylo4d} object.
+}
+\details{
+ The option \code{pos} is ignored (silently) if \code{x} is a
+ \code{phylo4} object. It is provided for compatibility reasons.
+}
+\seealso{
+ \code{\link{tdata}} for extracting or updating data and
+ \code{\link{phylo4d}} constructor.
+}
+\examples{
+ data(geospiza)
+ nDt <- data.frame(a=rnorm(nNodes(geospiza)), b=1:nNodes(geospiza),
+row.names=nodeId(geospiza))
+ t1 <-addData(geospiza, node.data=nDt)
+}
+\author{Francois Michonneau}
+\keyword{methods}
Modified: pkg/man/phylo4-class.Rd
===================================================================
--- pkg/man/phylo4-class.Rd 2009-08-27 03:41:01 UTC (rev 602)
+++ pkg/man/phylo4-class.Rd 2009-08-27 23:05:00 UTC (rev 603)
@@ -3,13 +3,7 @@
\alias{phylo4_orderings}
\alias{phylo-class}
\alias{phylo4-class}
-\alias{print,phylo4-method}
-\alias{show,phylo4-method}
-\alias{head,phylo4-method}
-\alias{tail,phylo4-method}
-\alias{summary,phylo4-method}
-\alias{names,phylo4-method}
-\title{Displaying phylo4 object}
+\title{The phylo4 class}
\description{Classes for phylogenetic trees}
\section{Objects from the Class}{
Phylogenetic tree objects can be created by calls to the \code{\link{phylo4}} constructor function.
@@ -31,83 +25,16 @@
unstructured/unused by methods)}
}
}
-\section{Methods}{
- \describe{
- \item{print}{\code{signature(x = "phylo4")}: print method}
- \item{show}{\code{signature(object = "phylo4")}: show method }
- \item{summary}{\code{signature(object = "phylo4")}: summary method}
- \item{names}{\code{signature(x = "phylo4")}: gives the slot names}
- \item{head}{\code{signature(object = "phylo4")}: show first few
- nodes}
- \item{tail}{\code{signature(object = "phylo4")}: show last few nodes} }
-}
-\usage{
- \S4method{print}{phylo4}(x, edgeOrder = c("pretty", "real"), printall)
- \S4method{summary}{phylo4}(object, quiet=FALSE)
- \S4method{show}{phylo4}(object)
- \S4method{names}{phylo4}(x)
- }
- \arguments{
- \item{x}{a phylo4 object}
- \item{object}{a phylo4 object}
- \item{edgeOrder}{Character string indicating whether the edges should be printed
- as ordered in the tree "real" (e.g. preorder or postorder), or "pretty" printed
- with tips collated together}
- \item{printall}{If TRUE all tip labels are printed}
- \item{quiet}{a logical stating whether the results of the summary
- should be printed to the screen (FALSE, default) or not (TRUE)}
- }
- \value{
- The \code{summary} method invisibly returns a list with the
- following components: \cr
- - \code{name}: the name of the object \cr
- - \code{nb.tips}: the number of tips\cr
- - \code{nb.nodes}: the number of nodes \cr
- - \code{mean.el}: mean of edge lengths \cr
- - \code{var.el}: variance of edge lengths (estimate for population) \cr
- - \code{sumry.el}: summary (i.e. range and quartiles) of the edge
- lengths \cr
- - \code{degree}: (optional) degree (i.e. number of descendants) of
- each node; displayed only when there are polytomies \cr
- - \code{polytomy}: (optional) type of polytomy for each node:
- 'node', 'terminal' (all descendants are tips) or internal (at least
- one descendant is an internal node); displayed only when there are
- polytomies \cr
- The \code{names} method returns a vector of characters corresponding
- to the names of the slots.
- }
-\seealso{the \code{\link{phylo4}} constructor, the \code{\link{checkPhylo4}}
+\usage{}
+\arguments{}
+\value{}
+\seealso{
+ The \code{\link{phylo4}} constructor, the \code{\link{checkPhylo4}}
function to check the validity of \code{phylo4} objects. See also the
- \code{\link{phylo4d}} constructor and the \linkS4class{phylo4d}
- class.}
-\author{Ben Bolker, Thibaut Jombart}
-\examples{
+ \code{\link{phylo4d}} constructor and the \linkS4class{phylo4d}
+ class.}
- tree.owls <- read.tree(text="(((Strix_aluco:4.2,Asio_otus:4.2):3.1,Athene_noctua:7.3):6.3,Tyto_alba:13.5);")
- P1 <- as(tree.owls, "phylo4")
- P1
- summary(P1)
-
-
- ## summary of a polytomous tree
- E <- matrix(c(
- 8, 9,
- 9, 10,
- 10, 1,
- 10, 2,
- 9, 3,
- 9, 4,
- 8, 11,
- 11, 5,
- 11, 6,
- 11, 7,
- NA, 8), ncol=2, byrow=TRUE)
-
- P2 <- phylo4(E)
- nodeLabels(P2) <- as.character(sort(nodeId(P2)))
- plot(P2, show.node.label=TRUE)
- sumryP2 <- summary(P2)
- sumryP2
-}
-\keyword{classes}
+\author{Ben Bolker, Thibaut Jombart}
+\examples{}
+\keyword{classes}
\ No newline at end of file
Copied: pkg/man/phylo4-display.Rd (from rev 602, pkg/man/phylo4-class.Rd)
===================================================================
--- pkg/man/phylo4-display.Rd (rev 0)
+++ pkg/man/phylo4-display.Rd 2009-08-27 23:05:00 UTC (rev 603)
@@ -0,0 +1,103 @@
+\name{phylo4-display}
+\docType{method}
+\alias{print,phylo4-method}
+\alias{show,phylo4-method}
+\alias{head,phylo4-method}
+\alias{tail,phylo4-method}
+\alias{summary,phylo4-method}
+\alias{names,phylo4-method}
+\title{Displaying phylo4 object}
+\description{Display methods for phylo4 and phylo4d phylogenetic trees}
+
+
+\section{Methods}{
+ \describe{
+ \item{print}{\code{signature(x = "phylo4")}: print method}
+ \item{show}{\code{signature(object = "phylo4")}: show method }
+ \item{summary}{\code{signature(object = "phylo4")}: summary method}
+ \item{names}{\code{signature(x = "phylo4")}: gives the slot names}
+ \item{head}{\code{signature(object = "phylo4")}: show first few
+ nodes}
+ \item{tail}{\code{signature(object = "phylo4")}: show last few
+ nodes}
+ }
+}
+
+\usage{
+ \S4method{print}{phylo4}(x, edgeOrder = c("pretty", "real"), printall)
+ \S4method{summary}{phylo4}(object, quiet=FALSE)
+ \S4method{show}{phylo4}(object)
+ \S4method{names}{phylo4}(x)
+}
+
+\arguments{
+ \item{x}{a phylo4 object}
+ \item{object}{a phylo4 object}
+ \item{edgeOrder}{Character string indicating whether the edges
+ should be printed as ordered in the tree "real" (e.g. preorder or
+ postorder), or "pretty" printed with tips collated together}
+ \item{printall}{If TRUE all tip labels are printed}
+ \item{quiet}{a logical stating whether the results of the summary
+ should be printed to the screen (FALSE, default) or not (TRUE)}
+}
+
+\value{
+
+ The \code{summary} method invisibly returns a list with the
+ following components:
+
+ \item{\code{name}}{the name of the object}
+ \item{\code{nb.tips}}{the number of tips}
+ \item{\code{nb.nodes}}{the number of nodes}
+ \item{\code{mean.el}}{mean of edge lengths}
+ \item{\code{var.el}}{variance of edge lengths (estimate for population)}
+ \item{\code{sumry.el}}{summary (i.e. range and quartiles) of the edge
+ lengths}
+ \item{\code{degree}}{(optional) degree (i.e. number of descendants) of
+ each node; displayed only when there are polytomies}
+ \item{\code{polytomy}}{(optional) type of polytomy for each node:
+ \sQuote{node}, \sQuote{terminal} (all descendants are tips) or
+ \sQuote{internal} (at least one descendant is an internal node);
+ displayed only when there are polytomies}
+
+ The \code{names} method returns a vector of characters corresponding
+ to the names of the slots.
+}
+
+\seealso{
+ The \code{\link{phylo4}} constructor, the \code{\link{checkPhylo4}}
+ function to check the validity of \code{phylo4} objects. See also the
+ \code{\link{phylo4d}} constructor and the \linkS4class{phylo4d}
+ class.
+}
+\author{Ben Bolker, Thibaut Jombart}
+\examples{
+
+ tOwls <- "(((Strix_aluco:4.2,Asio_otus:4.2):3.1,Athene_noctua:7.3):6.3,Tyto_alba:13.5);"
+ tree.owls <- read.tree(text=tOwls)
+ P1 <- as(tree.owls, "phylo4")
+ P1
+ summary(P1)
+
+
+ ## summary of a polytomous tree
+ E <- matrix(c(
+ 8, 9,
+ 9, 10,
+ 10, 1,
+ 10, 2,
+ 9, 3,
+ 9, 4,
+ 8, 11,
+ 11, 5,
+ 11, 6,
+ 11, 7,
+ NA, 8), ncol=2, byrow=TRUE)
+
+ P2 <- phylo4(E)
+ nodeLabels(P2) <- as.character(sort(nodeId(P2)))
+ plot(P2, show.node.label=TRUE)
+ sumryP2 <- summary(P2)
+ sumryP2
+}
+\keyword{methods}
Property changes on: pkg/man/phylo4-display.Rd
___________________________________________________________________
Name: svn:mergeinfo
+
Modified: pkg/man/phylo4.Rd
===================================================================
--- pkg/man/phylo4.Rd 2009-08-27 03:41:01 UTC (rev 602)
+++ pkg/man/phylo4.Rd 2009-08-27 23:05:00 UTC (rev 603)
@@ -6,7 +6,12 @@
\alias{phylo4,phylo-method}
\title{Create a phylogenetic tree}
\description{
- \code{phylo4} is a generic constructor that creates a phylogenetic tree object for use in phylobase methods. Phylobase contains functions for input of phylogenetic trees and data, manipulation of these objects including pruning and subsetting, and plotting. The phylobase package also contains translation functions to forms used in other comparative phylogenetic method packages.
+ \code{phylo4} is a generic constructor that creates a phylogenetic
+ tree object for use in phylobase methods. Phylobase contains functions
+ for input of phylogenetic trees and data, manipulation of these
+ objects including pruning and subsetting, and plotting. The phylobase
+ package also contains translation functions to forms used in other
+ comparative phylogenetic method packages.
}
\section{Methods}{
\describe{
@@ -17,16 +22,20 @@
\code{phylo}}
}}
\usage{
- \S4method{phylo4}{matrix}(x, edge.length = NULL, tip.label = NULL, node.label = NULL,
- edge.label = NULL, order="unknown", annote=list(), ...)
- \S4method{phylo4}{phylo}(x, check.node.labels = c("keep", "drop"), annote=list())
+ \S4method{phylo4}{matrix}(x, edge.length = NULL, tip.label = NULL,
+ node.label = NULL, edge.label = NULL, order="unknown",
+ annote=list())
+ \S4method{phylo4}{phylo}(x, check.node.labels = c("keep", "drop"),
+ annote=list())
}
\arguments{
\item{x}{a matrix of edges or an object of class \code{phylo} (see
above)}
- \item{edge}{A numeric, two-column matrix with as many rows as branches in the phylogeny.}
+ \item{edge}{A numeric, two-column matrix with as many rows as branches
+ in the phylogeny.}
\item{edge.length}{Edge (branch) length. (Optional)}
- \item{tip.label}{A character vector of species names (names of "tip" nodes). (Optional)}
+ \item{tip.label}{A character vector of species names (names of "tip"
+ nodes). (Optional)}
\item{node.label}{A character vector of internal node names. (Optional)}
\item{edge.label}{A character vector of edge (branch) names. (Optional)}
\item{order}{character: tree ordering (allowable values are
@@ -36,29 +45,52 @@
\item{check.node.labels}{if \code{x} is of class \code{phylo}, either
"keep" (the default) or "drop" node labels. This argument is useful
if the \code{phylo} object has non-unique node labels.}
- \item{annote}{any additional annotation data to be passed to the new object}
- \item{\dots}{Additional arguments} %TODO a more elaborate description would be useful
+ \item{annote}{any additional annotation data to be passed to the new object}
}
\details{
- The minimum information necessary to create a phylobase tree object is a valid edge matrix. The edge matrix describes the topology of the phylogeny. Each row describes a branch of the phylogeny, with the (descendant) node number in column 2 and its ancestor's node number in column 1. These numbers are used internally and must be unique for each node.
- The labels designate either nodes or edges. The vector \code{node.label} names internal nodes, and together with \code{tip.label}, name all nodes in the tree. The vector \code{edge.label} names all branches in the tree. All label vectors are optional, and if they are not given, internally-generated labels will be assigned. The labels, whether user-specified or internally generated, must be unique as they are used to join species data with phylogenetic trees.
+ The minimum information necessary to create a phylobase tree object is
+ a valid edge matrix. The edge matrix describes the topology of
+ the phylogeny. Each row describes a branch of the phylogeny, with
+ the (descendant) node number in column 2 and its ancestor's node
+ number in column 1. These numbers are used internally and must be
+ unique for each node.
+
+ The labels designate either nodes or edges. The vector
+ \code{node.label} names internal nodes, and together with
+ \code{tip.label}, name all nodes in the tree. The vector
+ \code{edge.label} names all branches in the tree. All label
+ vectors are optional, and if they are not given,
+ internally-generated labels will be assigned. The labels, whether
+ user-specified or internally generated, must be unique as they
+ are used to join species data with phylogenetic trees.
}
\author{phylobase team}
-\note{Translation functions are available from many valid tree formats. See \link{coerce-methods}.
+\note{
+ Translation functions are available from many valid tree formats. See
+ \link{coerce-methods}.
}
-\seealso{\code{\link{coerce-methods}} for translation functions. The \linkS4class{phylo4} class, the \code{\link{formatData}}
- function to check the validity of \code{phylo4} objects. See also the \code{\link{phylo4d}} constructor, and \linkS4class{phylo4d} class.}
+\seealso{
+ \code{\link{coerce-methods}} for translation functions. The
+ \linkS4class{phylo4} class, the \code{\link{formatData}}
+ function to check the validity of \code{phylo4} objects. See also the
+ \code{\link{phylo4d}} constructor, and \linkS4class{phylo4d}
+ class.
+ }
+
\examples{
# a three species tree:
-mytree <- phylo4(x=matrix(data=c(4,1, 4,5, 5,2, 5,3,NA,4), ncol=2, byrow=TRUE), tip.label=c("speciesA", "speciesB", "speciesC"))
+mytree <- phylo4(x=matrix(data=c(4,1, 4,5, 5,2, 5,3,NA,4), ncol=2,
+byrow=TRUE), tip.label=c("speciesA", "speciesB", "speciesC"))
mytree
plot(mytree)
# another way to specify the same tree:
-mytree <- phylo4(x=cbind(c(4,4,5,5,NA), c(1,5,2,3,4)), tip.label=c("speciesA", "speciesB", "speciesC"))
+mytree <- phylo4(x=cbind(c(4,4,5,5,NA), c(1,5,2,3,4)),
+tip.label=c("speciesA", "speciesB", "speciesC"))
# another way:
-mytree <- phylo4(x=rbind(c(4,1), c(4,5), c(5,2), c(5,3), c(NA,4)), tip.label=c("speciesA", "speciesB", "speciesC"))
+mytree <- phylo4(x=rbind(c(4,1), c(4,5), c(5,2), c(5,3), c(NA,4)),
+tip.label=c("speciesA", "speciesB", "speciesC"))
# with branch lengths:
mytree <- phylo4(x=rbind(c(4,1), c(4,5), c(5,2), c(5,3), c(NA,4)),
Modified: pkg/man/phylo4d-class.Rd
===================================================================
--- pkg/man/phylo4d-class.Rd 2009-08-27 03:41:01 UTC (rev 602)
+++ pkg/man/phylo4d-class.Rd 2009-08-27 23:05:00 UTC (rev 603)
@@ -1,22 +1,7 @@
\name{phylo4d-class}
\docType{class}
\alias{phylo4d-class}
-\alias{show,phylo4d-method}
-\alias{print,phylo4d-method}
-\alias{head,phylo4d-method}
-\alias{tail,phylo4d-method}
-\alias{summary,phylo4d-method}
-\alias{phylo4d,phylo4d-method}
-\alias{names,phylo4d-method}
-\alias{hasNodeData}
-\alias{hasNodeData-methods}
-\alias{hasNodeData,phylo4d-method}
-\alias{hasTipData}
-\alias{hasTipData-methods}
-\alias{hasTipData,phylo4d-method}
-\alias{addData}
-\alias{addData,phylo4-method}
-\alias{addData,phylo4d-method}
+
\title{phylo4d class}
\description{S4 class for phylogenetic tree and data.}
\section{Objects from the Class}{
@@ -46,52 +31,19 @@
unstructured/unused by methods)}
}
}
-\section{Methods}{
- \describe{
- \item{print}{\code{signature(x = "phylo4d")}: print method}
- \item{show}{\code{signature(object = "phylo4d")}: show method }
- \item{summary}{\code{signature(object = "phylo4d")}: summary method}
- \item{names}{\code{signature(x = "phylo4d")}: gives the slots names}
- \item{head}{\code{signature(object = "phylo4d")}: show first few
- nodes}
- \item{tail}{\code{signature(object = "phylo4d")}: show last few
- nodes}
- \item{hasNodeData}{\code{signature(object = "phylo4d")}: whether
- tree has internal node data}
- \item{hasTipData}{\code{signature(object = "phylo4d")}: whether tree
- has data associated with its tips}
- }
+
+\usage{}
+\value{}
+
+\seealso{
+ \code{\link{coerce-methods}} for translation functions. The
+ \code{\link{phylo4d}} constructor and the \code{\link{formatData}}
+ function to check the validity of trees and data. See also the
+ \code{\link{phylo4}} constructor, the \linkS4class{phylo4} class,
+ and the \code{\link{checkPhylo4}} function to check the validity of
+ \code{phylo4} trees.
}
-\usage{
- \S4method{print}{phylo4d}(x, edgeOrder = c("pretty", "real"), printall=TRUE)
- \S4method{summary}{phylo4d}(object, quiet=FALSE)
- \S4method{names}{phylo4d}(x)
- }
- \arguments{
- \item{x}{a phylo4d object}
- \item{object}{a phylo4d object}
- \item{edgeOrder}{Character string indicating whether the edges should be printed
- as ordered in the tree "real" (e.g. preorder or postorder), or "pretty" printed
- with tips collated together}
- \item{quiet}{Should the summary be displayed on screen?}
- \item{printall}{If TRUE all tip labels are printed}
- }
- \value{
- The \code{summary} method invisibly returns a list with the
- following components:
- - \code{name}: the name of the object
- - \code{nb.tips}: the number of tips
- - \code{nb.nodes}: the number of nodes
-
- The \code{names} method returns a vector of characters corresponding
- to the names of the slots.
- }
-\seealso{\code{\link{coerce-methods}} for translation functions. The
- \code{\link{phylo4d}} constructor and the \code{\link{formatData}}
- function to check the validity of trees and data. See also the
- \code{\link{phylo4}} constructor, the \linkS4class{phylo4} class,
- and the \code{\link{checkPhylo4}} function to check the validity of
- \code{phylo4} trees. }
+
\author{Ben Bolker, Thibaut Jombart}
\examples{
library(ape)
Added: pkg/man/phylo4d-display.Rd
===================================================================
--- pkg/man/phylo4d-display.Rd (rev 0)
+++ pkg/man/phylo4d-display.Rd 2009-08-27 23:05:00 UTC (rev 603)
@@ -0,0 +1,77 @@
+\name{phylo4d-display}
+\docType{methods}
+\alias{show,phylo4d-method}
+\alias{print,phylo4d-method}
+\alias{head,phylo4d-method}
+\alias{tail,phylo4d-method}
+\alias{summary,phylo4d-method}
+\alias{names,phylo4d-method}
+
+\title{Display methods for phylo4d objects}
+
+\description{
+ Methods used to display information about the data and the tree for
+ phylo4d objects.
+}
+
+\section{Methods}{
+ \describe{
+ \item{print}{\code{signature(x = "phylo4d")}: print method}
+ \item{show}{\code{signature(object = "phylo4d")}: show method }
+ \item{summary}{\code{signature(object = "phylo4d")}: summary method}
+ \item{names}{\code{signature(x = "phylo4d")}: gives the slots names}
+ \item{head}{\code{signature(object = "phylo4d")}: show first few
+ nodes}
+ \item{tail}{\code{signature(object = "phylo4d")}: show last few
+ nodes}
+ }
+}
+
+\usage{
+ \S4method{print}{phylo4d}(x, edgeOrder = c("pretty", "real"),
+ printall=TRUE)
+ \S4method{summary}{phylo4d}(object, quiet=FALSE)
+ \S4method{names}{phylo4d}(x)
+}
+
+\arguments{
+ \item{x}{a phylo4d object}
+ \item{object}{a phylo4d object}
+ \item{edgeOrder}{Character string indicating whether the edges should be printed
+ as ordered in the tree "real" (e.g. preorder or postorder), or "pretty" printed
+ with tips collated together}
+ \item{quiet}{Should the summary be displayed on screen?}
+ \item{printall}{If TRUE all tip labels are printed}
+}
+\value{
+ The \code{summary} method invisibly returns a list with the
+ following components:
+ \item{\code{name}}{the name of the object}
+ \item{\code{nb.tips}}{the number of tips}
+ \item{\code{nb.nodes}}{the number of nodes}
+ \item{\code{mean.el}}{mean of edge lengths}
+ \item{\code{var.el}}{variance of edge lengths (estimate for
+ population) }
+ \item{\code{sumry.el}}{summary (i.e. range and quartiles) of the
+ edge lengths}
+ \item{\code{degree}}{(optional) type of polytomy for each node:
+ \sQuote{node}, \sQuote{terminal} (all descendants are tips) or
+ \sQuote{internal} (at least one descendant is an internal node);
+ displayed only when there are polytomies}
+ \item{\code{sumry.tips}}{(optional) summary for the data associated
+ with the tips}
+ \item{\code{sumry.nodes}}{(optional) summary for the data associated
+ with the internal nodes}
+
+ The \code{names} method returns a vector of characters corresponding
+ to the names of the slots.
+}
+
+\seealso{
+ \code{\link{phylo4d}} constructor and \code{\linkS4class{phylo4d}} class.
+}
+
+\author{Ben Bolker, Thibaut Jombart}
+\examples{}
+\keyword{methods}
+
\ No newline at end of file
Added: pkg/man/phylo4d-hasData.Rd
===================================================================
--- pkg/man/phylo4d-hasData.Rd (rev 0)
+++ pkg/man/phylo4d-hasData.Rd 2009-08-27 23:05:00 UTC (rev 603)
@@ -0,0 +1,53 @@
+\name{phylo4d-hasData}
+
+\alias{hasNodeData}
+\alias{hasNodeData-methods}
+\alias{hasNodeData,phylo4d-method}
+\alias{hasTipData}
+\alias{hasTipData-methods}
+\alias{hasTipData,phylo4d-method}
+
+
+\title{Tests for presence of data associated with trees stored
+as phylo4d objects}
+\description{
+ Methods that test for the presence of data associated with trees
+ stored as phylo4d objects.
+}
+\usage{
+ \S4method{hasNodeData}{phylo4d}(x)
+ \S4method{hasTipData}{phylo4d}(x)
+}
+\arguments{
+ \item{x}{a phylo4d object}
+}
+\value{
+ \item{\code{logical}}{return \code{TRUE} or \code{FALSE} depending
+ whether data are associated with the tree (i.e., the slots
+ \code{tip.data} or \code{node.data} are not empty)}
+}
+\details{
+ The outcome of the test is based on the number of rows in the data
+ frame stored in \code{tip.data} or \code{node.data}. If the number of
+ rows is greater than 0, then \code{TRUE} is returned.
+}
+
+\section{Methods}{
+ \describe{
+ \item{hasNodeData}{\code{signature(object = "phylo4d")}: whether
+ tree has internal node data}
+ \item{hasTipData}{\code{signature(object = "phylo4d")}: whether tree
+ has data associated with its tips}
+ }
+}
+
+\seealso{
+ \code{\link{phylo4d}} constructor and \code{\linkS4class{phylo4d}} class.
+}
+\examples{
+ data(geospiza)
+ hasTipData(geospiza) ## TRUE
+ hasNodeData(geospiza) ## FALSE
+}
+\author{Ben Bolker, Thibault Jombart, Francois Michonneau}
+\keyword{methods}
Modified: pkg/man/phylo4d.Rd
===================================================================
--- pkg/man/phylo4d.Rd 2009-08-27 03:41:01 UTC (rev 602)
+++ pkg/man/phylo4d.Rd 2009-08-27 23:05:00 UTC (rev 603)
@@ -1,8 +1,9 @@
-\name{phylo4d-methods}
+\name{phylo4d}
\docType{methods}
\alias{phylo4d}
\alias{phylo4d-methods}
\alias{phylo4d,phylo4-method}
+\alias{phylo4d,phylo4d-method}
\alias{phylo4d,matrix-method}
\alias{phylo4d,phylo-method}
\title{Combine a phylogenetic tree with data}
@@ -57,8 +58,11 @@
(TRUE) or node numbers (FALSE and default)}
\item{annote}{any additional annotation data to be passed to the new object}
\item{metadata}{any additional metadata to be passed to the new object}
- \item{\dots}{further arguments to be passed to other methods. Used to
- control the validity checking of the created object (see \code{\link{formatData}}).}
+ \item{\dots}{further arguments to be passed to
+ \code{\link{formatData}}. Notably, these additional arguments
+ control the behavior of the constructor in the case of missing/extra
+ data and where to look for labels in the case of non-unique labels
+ that cannot be stored as row names in a data frame.}
}
\details{
@@ -70,7 +74,7 @@
(and also of the value of the arguments \code{use.tip.names} and
\code{use.node.names}). This means that you need to be consistent
with the row names of your data frames. It is good practice to use tip
- and node labels when you merge data with a tree.
+ and node labels (or node numbers) when you merge data with a tree.
If \code{all.data} is provided and tip and node names are not being
used, then the first part of the data frame will be tips data and the
second part will be nodes data.
@@ -94,7 +98,8 @@
rows of data vs. number of nodes/tips/etc.)
}
\examples{
-tree.owls.bis <- read.tree(text = "((Strix_aluco:4.2,Asio_otus:4.2):3.1,Athene_noctua:7.3);")
+treeOwls <- "((Strix_aluco:4.2,Asio_otus:4.2):3.1,Athene_noctua:7.3);"
+tree.owls.bis <- read.tree(text=treeOwls)
try(phylo4d(as(tree.owls.bis,"phylo4"),data.frame(wing=1:3)), silent=TRUE)
obj <- phylo4d(as(tree.owls.bis,"phylo4"),data.frame(wing=1:3), match.data=FALSE)
obj
More information about the Phylobase-commits
mailing list