[Phylobase-commits] r556 - pkg/man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Aug 21 20:29:43 CEST 2009
Author: francois
Date: 2009-08-21 20:29:43 +0200 (Fri, 21 Aug 2009)
New Revision: 556
Modified:
pkg/man/check.phylo4d.Rd
pkg/man/nNodes-methods.Rd
pkg/man/phylo4d.Rd
Log:
fixed documentation: moved addData, documented checkPhylo4Data
Modified: pkg/man/check.phylo4d.Rd
===================================================================
--- pkg/man/check.phylo4d.Rd 2009-08-21 18:06:29 UTC (rev 555)
+++ pkg/man/check.phylo4d.Rd 2009-08-21 18:29:43 UTC (rev 556)
@@ -1,8 +1,7 @@
\name{checkPhylo4d}
\alias{formatData}
-\alias{addData}
-\alias{addData,phylo4-method}
-\alias{addData,phylo4d-method}
+
+\alias{checkPhylo4Data}
\title{Data addition and validity checking for phylo4d objects}
\description{
Basic checks on the validity of S4 phylogenetic plus data objects
@@ -10,7 +9,8 @@
}
\section{Methods}{
\describe{
- \item{addData}{\code{signature(x = "phylo4d")}: add data}
+ \item{formatData}{\code{signature(phy="phylo4d")}}
+ \item{checkPhylo4Data}{\code{signature(phy="phylo4d")}}
}
}
@@ -20,15 +20,11 @@
label.type=c("rownames", "column"),
label.column=1, missing.data=c("fail", "warn", "OK"),
extra.data=c("warn", "OK", "fail"))
+checkPhylo4Data(phy)
-\S4method{addData}{phylo4}(x, tip.data=NULL, node.data=NULL, all.data=NULL,
- pos=c("after", "before"), merge.data=TRUE, match.data=TRUE, \dots)
-\S4method{addData}{phylo4d}(x, tip.data=NULL, node.data=NULL, all.data=NULL,
- pos=c("after", "before"), merge.data=TRUE, match.data=TRUE, \dots)
}
\arguments{
- \item{x}{A phylo4d object}
\item{phy}{A phylo4 object}
\item{dt}{a data frame or matrix}
\item{type}{type of data to attach}
@@ -39,30 +35,27 @@
\item{label.column}{if \code{label.type=="column"}, column specifier
(number or name) of the column containing tip labels}
\item{missing.data}{action to take if there are missing data/labels don't match}
- \item{extra.data}{action to take if there are extra data/labels don't match}
- \item{tip.data}{a data frame, matching tree tips}
- \item{node.data}{a data frame, matching tree internal nodes}
- \item{all.data}{a data frame, matching all tree nodes (tips and internal nodes)}
- \item{pos}{add data columns before or after existing data?}
- \item{merge.data}{(logical) merge data if the name of the data match any existing
- tip/node data (if TRUE), or create an additional column data (if FALSE)}
+ \item{extra.data}{action to take if there are extra data/labels don't match}
\item{rownamesAsLabels}{(logical), in the case of number-like labels should the row
names of the data provided be considered as labels (TRUE) or node numbers (FALSE and default)}
- \item{\dots}{extra arguments, passed to \code{formatData}}
+
}
\value{
By default, tip data names are used to attach the tip data to the tree, must be present, and must match the set of tree taxa exactly. By default node data names are not used to attach the data to the tree, and thus node data names are not required.
-\code{addData} returns the phylo4 object with tipdata and nodedata (if present) attached to the phylo4 tree.
+
}
\details{
- \code{formatData} checks validity of a phylo4d object. For tipdata and nodedata, checks
- for presence of tip and node names, whether tip or node data taxa and tree taxa are an
- exact match, and whether tip or node data taxa are a superset or subset of the tree
- taxa. By default, if several tip or node labels are non-unique, they all receive the same
- value. This is only true if you use names to attach data to your tree. You can prevent
- this behavior by changing the value of the arguments \code{non.unique.tips} and
- \code{non.unique.nodes} to \code{fail}.
+ \code{formatData} is an internal function that should not be called by the user. It
+ formats properly the data provided by the
+ user before being attached to a tree. The function (1) converts labels provided in the
+ data into node numbers, (2) makes sure that the data are appropriately matched against
+ tip or nodes, (3) checks for differences between data and tree, (4) creates a data frame
+ with the correct dimensions given a tree. \code{formatData} returns a data frame.
+
+ \code{checkPhylo4Data} checks the validity of a \code{phylo4d} object. It ensures that
+ (1) the data associated with the tree have the correct dimensions, (2) that the row
+ names for the data are correct.
}
\seealso{the \code{\link{phylo4d}} constructor, the \linkS4class{phylo4d} class. See also the \code{\link{checkPhylo4}}, the \code{\link{phylo4}} constructor and the \linkS4class{phylo4} class. See \code{\link{coerce-methods}} for translation functions.}
\author{Steven Kembel \email{skembel at berkeley.edu}}
Modified: pkg/man/nNodes-methods.Rd
===================================================================
--- pkg/man/nNodes-methods.Rd 2009-08-21 18:06:29 UTC (rev 555)
+++ pkg/man/nNodes-methods.Rd 2009-08-21 18:29:43 UTC (rev 556)
@@ -72,6 +72,9 @@
\alias{tdata-methods}
\alias{tdata,phylo4d-method}
\alias{tdata<-,phylo4d-method}
+\alias{addData}
+\alias{addData,phylo4-method}
+\alias{addData,phylo4d-method}
\title{Methods for S4 phylogeny classes}
\description{
Generic methods for phylogenetic trees represented as S4 classes
@@ -107,6 +110,8 @@
<= 2 descendants)}
\item{rootEdge}{\code{signature(object = "phylo4")}: root edge}
\item{tdata}{\code{signature(object = "phylo4d")}: trait data}
+ \item{addData}{\code{signature(x = "phylo4d")}: add data}
+
}
}
\usage{
@@ -116,6 +121,13 @@
\S4method{tdata}{phylo4d}(object, type = "tip", \dots) <- value
\S4method{edgeLength}{phylo4}(x, node)
\S4method{edges}{phylo4}(x, order, drop.root=FALSE, \dots)
+
+ \S4method{addData}{phylo4}(x, tip.data=NULL, node.data=NULL, all.data=NULL,
+ pos=c("after", "before"), merge.data=TRUE, match.data=TRUE, \dots)
+
+ \S4method{addData}{phylo4d}(x, tip.data=NULL, node.data=NULL, all.data=NULL,
+ pos=c("after", "before"), merge.data=TRUE, match.data=TRUE, \dots)
+
}
\arguments{
\item{x}{a phylo4d object}
@@ -128,6 +140,17 @@
\item{value}{a data frame}
\item{order}{(not yet implemented)}
\item{drop.root}{logical: drop root row from edge matrix?}
+ \item{tip.data}{a data frame for tips data}
+ \item{node.data}{a data frame for nodes data}
+ \item{all.data}{a data frame for all (i.e. tips and nodes) data.}
+ \item{match.data}{(logical) should the rownames of the data frame provided in
+ \code{tip.data}, \code{node.data} and/or \code{all.data} be used to be matched against
+ tip and node labels?}
+\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{pos}{add data columns before or after existing data?}
\item{\dots}{for future development compatibility}
}
\examples{
Modified: pkg/man/phylo4d.Rd
===================================================================
--- pkg/man/phylo4d.Rd 2009-08-21 18:06:29 UTC (rev 555)
+++ pkg/man/phylo4d.Rd 2009-08-21 18:29:43 UTC (rev 556)
@@ -37,7 +37,9 @@
\item{node.data}{a data frame for nodes data}
\item{all.data}{a data frame for all (i.e. tips and nodes) data. In such
case, first rows should correspond to tips, last rows to nodes.}
- \item{match.data}{FIXME}
+ \item{match.data}{(logical) should the rownames of the data frame provided in
+ \code{tip.data}, \code{node.data} and/or \code{all.data} be used to be matched against
+ tip and node labels?}
\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. This argument is evaluated only if both \code{tip.data} and
More information about the Phylobase-commits
mailing list