[Phylobase-commits] r683 - in pkg: R man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Sep 30 01:44:29 CEST 2009


Author: pdc
Date: 2009-09-30 01:44:29 +0200 (Wed, 30 Sep 2009)
New Revision: 683

Modified:
   pkg/R/class-multiphylo4.R
   pkg/man/multiPhylo-class.Rd
Log:
Disable the functionality (basically nonexistent) of mutliPhylo4(d) objects.  This commit causes a helpful error to be issued anytime one attempts to make such and object and leaves the help as a note about possible future versions.   We plan on implementing this, so I'll leave the files in place, hopefully as a useful guide

addresses bug #607, which I will move to a feature request

Modified: pkg/R/class-multiphylo4.R
===================================================================
--- pkg/R/class-multiphylo4.R	2009-09-29 23:11:00 UTC (rev 682)
+++ pkg/R/class-multiphylo4.R	2009-09-29 23:44:29 UTC (rev 683)
@@ -6,3 +6,8 @@
 
 setClass("multiPhylo4d", representation(tip.data = "data.frame"), 
     contains = "multiPhylo4")
+
+setMethod("initialize", "multiPhylo4", function(.Object, ...) {
+    stop('multiPhylo and multiphylo4d not yet implemented.  
+    Try using a list of phylo4(d) objects and lapply()')
+})

Modified: pkg/man/multiPhylo-class.Rd
===================================================================
--- pkg/man/multiPhylo-class.Rd	2009-09-29 23:11:00 UTC (rev 682)
+++ pkg/man/multiPhylo-class.Rd	2009-09-29 23:44:29 UTC (rev 683)
@@ -5,62 +5,62 @@
 \alias{multiPhylo4d-class}
 \alias{tbind}
 \title{multiPhylo4 and extended classes}
-\description{Classes for lists of phylogenetic trees
-(FIXME: passes check but very incomplete)}
-\section{Objects from the Class}{
-  Objects can be created by calls of the form \code{new("phylo4", ...)}
-  Translation from other phylogenetic packages ...
-  }
-\section{Slots}{
-  \describe{
-    \item{\code{phylo}:}{Matrix of edges}
-    \item{\code{edge.length}:}{Numeric vector of edge lengths}
-    \item{\code{Nnode}:}{Integer: number of nodes}
-    \item{\code{tip.label}:}{Character vector of tip labels}
-    \item{\code{root.edge}:}{Integer: root edge (NA if none)}
-    \item{\code{phylolist}:}{(multiPhylo4) list of phylogenetic trees (each of which
-    may be of type \code{phylo4d}, containing node and/or edge data)}
-}
-}
-\section{Methods}{
-  \describe{
-    \item{\$}{\code{signature(x = "phylo4")}: extract a slot}
-    \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 slots names}
-}
-}
-% commented to eliminate Note: on build
-%\usage{
-%  }
-  \arguments{
-    \item{x}{a phylo4 object}
-    \item{printlen}{Maximum number of tip labels to print}
-    \item{quiet}{a logical stating whether the results of the summary
-      should be printed to the screen (FALSE, default) or not (TRUE)}
-    \item{\dots}{additional arguments (for generic consistency)}
-  }
-  \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
+\description{Classes for lists of phylogenetic trees.  These classes and methods are planned for a future version of \code{phylobase}.}
 
-   The \code{names} method returns a vector of characters corresponding
-   to the names of the slots.
-  }
-  \author{Ben Bolker, Thibaut Jombart}   
-\examples{
-### An extract from Sibley and Ahlquist (1990)
-cat("(((Strix_aluco:4.2,Asio_otus:4.2):3.1,Athene_noctua:7.3):6.3,Tyto_alba:13.5);", file = "ex.tre", sep = "\n")
-tree.owls <- read.tree("ex.tre", keep.multi = TRUE)
-tree.owls
-(as(tree.owls, "multiPhylo4"))
-}
+% \section{Objects from the Class}{
+%   Objects can be created by calls of the form \code{new("phylo4", ...)}
+%   Translation from other phylogenetic packages ...
+%   }
+% \section{Slots}{
+%   \describe{
+%     \item{\code{phylo}:}{Matrix of edges}
+%     \item{\code{edge.length}:}{Numeric vector of edge lengths}
+%     \item{\code{Nnode}:}{Integer: number of nodes}
+%     \item{\code{tip.label}:}{Character vector of tip labels}
+%     \item{\code{root.edge}:}{Integer: root edge (NA if none)}
+%     \item{\code{phylolist}:}{(multiPhylo4) list of phylogenetic trees (each of which
+%     may be of type \code{phylo4d}, containing node and/or edge data)}
+% }
+% }
+% \section{Methods}{
+%   \describe{
+%     \item{\$}{\code{signature(x = "phylo4")}: extract a slot}
+%     \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 slots names}
+% }
+% }
+% % commented to eliminate Note: on build
+% %\usage{
+% %  }
+%   \arguments{
+%     \item{x}{a phylo4 object}
+%     \item{printlen}{Maximum number of tip labels to print}
+%     \item{quiet}{a logical stating whether the results of the summary
+%       should be printed to the screen (FALSE, default) or not (TRUE)}
+%     \item{\dots}{additional arguments (for generic consistency)}
+%   }
+%   \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
+% 
+%    The \code{names} method returns a vector of characters corresponding
+%    to the names of the slots.
+%   }
+%   \author{Ben Bolker, Thibaut Jombart}   
+% \examples{
+% ### An extract from Sibley and Ahlquist (1990)
+% cat("(((Strix_aluco:4.2,Asio_otus:4.2):3.1,Athene_noctua:7.3):6.3,Tyto_alba:13.5);", file = "ex.tre", sep = "\n")
+% tree.owls <- read.tree("ex.tre", keep.multi = TRUE)
+% tree.owls
+% (as(tree.owls, "multiPhylo4"))
+% }
 \keyword{classes}



More information about the Phylobase-commits mailing list