[Phylobase-commits] r815 - in pkg: R inst/doc man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed Oct 27 19:53:34 CEST 2010
Author: bbolker
Date: 2010-10-27 19:53:34 +0200 (Wed, 27 Oct 2010)
New Revision: 815
Modified:
pkg/R/class-oldclasses.R
pkg/R/setAs-Methods.R
pkg/inst/doc/phylobase.Rnw
pkg/man/as-methods.Rd
pkg/man/phylog.Rd
Log:
oops. too hasty with ade4/adephylo conversion. fixed (?)
Modified: pkg/R/class-oldclasses.R
===================================================================
--- pkg/R/class-oldclasses.R 2010-10-27 15:57:14 UTC (rev 814)
+++ pkg/R/class-oldclasses.R 2010-10-27 17:53:34 UTC (rev 815)
@@ -9,5 +9,5 @@
## setOldClass("multi.tree") ## obsolete
-## adephylo classes
+## ade4 classes
setOldClass("phylog")
Modified: pkg/R/setAs-Methods.R
===================================================================
--- pkg/R/setAs-Methods.R 2010-10-27 15:57:14 UTC (rev 814)
+++ pkg/R/setAs-Methods.R 2010-10-27 17:53:34 UTC (rev 815)
@@ -170,12 +170,13 @@
})
#######################################################
-## Exporting to adephylo
+## Exporting to ade4
setAs("phylo4", "phylog", function(from, to) {
- if (!require(adephylo))
- stop("the adephylo package is required")
+ if (!require(ade4))
+ stop("the ade4 package is required")
x <- as(from, "phylo")
xstring <- write.tree(x, file = "")
+ warning("ade4::phylog objects are deprecated, please use the adephylo package instead")
newick2phylog(xstring)
})
Modified: pkg/inst/doc/phylobase.Rnw
===================================================================
--- pkg/inst/doc/phylobase.Rnw 2010-10-27 15:57:14 UTC (rev 814)
+++ pkg/inst/doc/phylobase.Rnw 2010-10-27 17:53:34 UTC (rev 815)
@@ -57,7 +57,8 @@
\item A data structure for storing a tree with associated tip and node data: \code{phylo4d}
\item A data structure for storing multiple trees with one set of tip data: \code{multiPhylo4d}
\item Functions for reading nexus files into the above data structures
- \item Functions for converting between the above data structures and \code{ape phylo} objects as well as \code{adephylo} \code{phylog} objects
+ \item Functions for converting between the above data structures and \code{ape phylo} objects as well as \code{ade4} \code{phylog} objects
+(although the latter are now deprecated \ldots)
\item Functions for editing trees and data (i.e., subsetting and replacing)
\item Functions for plotting trees and trees with data
\end{itemize}
@@ -233,8 +234,6 @@
Or use \code{tdata()} to extract the data (i.e., \code{tdata(g2)}). By default, \code{tdata()} will retrieve tip data, but you can also get internal node data only (\code{tdata(tree, "internal")}) or --- if the tip and node data have the same format --- all the data combined (\code{tdata(tree, "allnode")}).
-%Plotting calls \code{plot.phylog} from the \code{adephylo} package.
-
If you want to plot the data (e.g. for checking the input), \code{plot(tdata(g2))} will create the default plot for the data --- in this case, since it is a data frame [\textbf{this may change in future versions but should remain transparent}] this will be a \code{pairs} plot of the data.
\section{Subsetting}
Modified: pkg/man/as-methods.Rd
===================================================================
--- pkg/man/as-methods.Rd 2010-10-27 15:57:14 UTC (rev 814)
+++ pkg/man/as-methods.Rd 2010-10-27 17:53:34 UTC (rev 815)
@@ -44,7 +44,7 @@
Translation functions to convert between phylobase objects
(\code{phylo4} or \code{phylo4d}), and objects used by other
comparative methods packages in R: \code{ape} objects (\code{phylo},
- \code{multiPhylo}), \code{adephylo} objects (\code{phylog}), and to
+ \code{multiPhylo}), \code{ade4} objects (\code{phylog}, \emph{now deprecated}), and to
\code{data.frame} representation.
}
@@ -85,11 +85,14 @@
\item{\code{as(object, "multiPhylo4")}}{~~Not implemented yet. where object is of class \code{multiPhylo} and returns an object of class \code{multiPhylo4}. }
}} % end ape to phylobase
- \item{}{\code{phylobase} to \code{adephylo} formats:
+ \item{}{\code{phylobase} to \code{ade4} formats:
\describe{
\item{\code{as(object, "phylog")}}{where object is of class \code{phylo4} and returns an object of class \linkS4class{phylog}.}
- }} % end phylobase to adephylo
+ }
+ Note that this format is now deprecated; the \code{ade4} developers recommend that you use \code{adephylo} instead,
+ which uses \code{phylo} and \code{phylo4} formats natively.
+} % end phylobase to ade4
\item{}{\code{phylobase} format to \code{data.frame}:
\describe{
@@ -102,7 +105,7 @@
\author{Ben Bolker, Thibaut Jombart, Marguerite Butler, Steve Kembel}
\seealso{ generic \code{\link[methods]{as}}, \code{\link{phylo4}},
\code{\link{phylo4d}}, \code{\link{extractTree}}, the original
- \code{\link[adephylo]{phylog}} from the \code{adephylo} package and
+ \code{\link[ade4]{phylog}} from the \code{ade4} package and
\code{\link[ape]{as.phylo}} from the \code{ape} package.
}
@@ -116,7 +119,7 @@
## test if phylo, and phylo4 converted to phylo are identical
## (no, because of dimnames)
-## Conversion to phylog (adephylo)
+## Conversion to phylog (ade4)
as(tree_in_phylo4, "phylog")
## Conversion to data.frame
Modified: pkg/man/phylog.Rd
===================================================================
--- pkg/man/phylog.Rd 2010-10-27 15:57:14 UTC (rev 814)
+++ pkg/man/phylog.Rd 2010-10-27 17:53:34 UTC (rev 815)
@@ -3,10 +3,10 @@
\alias{phylog-class}
\alias{coerce,phylo4,phylog-method}
\title{Class "phylog"}
-\description{S4 version of the class \code{phylog} from the \code{adephylo} package.}
+\description{S4 version of the class \code{phylog} from the \code{ade4} package.}
\section{Objects from the Class}{A virtual Class: No objects may be created from it.}
\section{Extends}{
-Class \code{\link[adephylo]{phylog}}, directly.
+Class \code{\link[ade4]{phylog}}, directly.
}
\section{Methods}{
\describe{
@@ -15,10 +15,10 @@
}
}
\author{Thibaut Jombart \email{jombart at biomserv.univ-lyon1.fr}}
-\seealso{The original \code{\link[adephylo]{phylog}} from the
- \code{adephylo} package.
+\seealso{The original \code{\link[ade4]{phylog}} from the
+ \code{ade4} package.
}
-% commented to eliminate Note: on build
-%\examples{
-%}
+\section{Warning}{\code{phylog} objects from \code{ade4} are now deprecated;
+users are encouraged to use the \code{adephylo} package, which uses
+\code{phylo} and \code{phylo4} objects directly.}
\keyword{classes}
More information about the Phylobase-commits
mailing list