[Adephylo-commits] r92 - in pkg: . R man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sat Dec 13 14:46:37 CET 2008
Author: jombart
Date: 2008-12-13 14:46:37 +0100 (Sat, 13 Dec 2008)
New Revision: 92
Modified:
pkg/DESCRIPTION
pkg/R/orthogram.R
pkg/R/ppca.R
pkg/TODO
pkg/man/orthogram.Rd
pkg/man/ppca.Rd
pkg/man/treePart.Rd
Log:
Orthogram doc and some tests ok.
Modified: pkg/DESCRIPTION
===================================================================
--- pkg/DESCRIPTION 2008-12-12 19:05:47 UTC (rev 91)
+++ pkg/DESCRIPTION 2008-12-13 13:46:37 UTC (rev 92)
@@ -9,4 +9,4 @@
Description: Multivariate tools to analyze comparative data, i.e. a phylogeny and some traits measured for each taxa.
License: GPL (>=2)
LazyLoad: yes
-Collate: utils.R partition.R s.phylo4d.R distances.R proximities.R orthobasis.R ppca.R orthogram.R abouheif.R zzz.R
\ No newline at end of file
+Collate: utils.R partition.R s.phylo4d.R distances.R proximities.R orthobasis.R ppca.R orthogram.R abouheif.R moran.R zzz.R
\ No newline at end of file
Modified: pkg/R/orthogram.R
===================================================================
--- pkg/R/orthogram.R 2008-12-12 19:05:47 UTC (rev 91)
+++ pkg/R/orthogram.R 2008-12-13 13:46:37 UTC (rev 92)
@@ -38,7 +38,7 @@
## retrieve the orthobasis from a proximity matrix
if(is.null(orthobas)){
if(is.null(prox)) { # both orthobas and prox are not given -> default orthobasis
- ## check that tre is provided and right
+ ## check that tre is provided and valid
if(is.null(tre)) stop("tre, orthobasis or prox must be provided")
tre <- as(tre, "phylo4")
if (is.character(checkval <- check_phylo4(tre))) stop(checkval)
Modified: pkg/R/ppca.R
===================================================================
--- pkg/R/ppca.R 2008-12-12 19:05:47 UTC (rev 91)
+++ pkg/R/ppca.R 2008-12-13 13:46:37 UTC (rev 92)
@@ -144,9 +144,9 @@
#####################
-# Function plot.ppca
+# Function scatter.ppca
#####################
-plot.ppca <- function(x, axis=1:ncol(x$li), useLag=FALSE, ...){
+scatter.ppca <- function(x, axis=1:ncol(x$li), useLag=FALSE, ...){
if(useLag){
df <- as.data.frame(x$ls)
} else{
@@ -163,7 +163,7 @@
}
args <- c(obj,args)
do.call(s.phylo4d, args)
-}
+} # end scatter.ppca
Modified: pkg/TODO
===================================================================
--- pkg/TODO 2008-12-12 19:05:47 UTC (rev 91)
+++ pkg/TODO 2008-12-13 13:46:37 UTC (rev 92)
@@ -76,7 +76,7 @@
# LONG TERM
==========================
==========================
-* re-implement all relevant phylogenetic methods from ade4 in adephylo
+o re-implement all relevant phylogenetic methods from ade4 in adephylo -- done (TJ)
o implement several phylogenetic proximities -- done (TJ)
o implement an orthobasis for phylogenies -- done (TJ)
* write a comprehensive tutorial, going through adephylo, ade4, ape, phylobase, etc.
Modified: pkg/man/orthogram.Rd
===================================================================
--- pkg/man/orthogram.Rd 2008-12-12 19:05:47 UTC (rev 91)
+++ pkg/man/orthogram.Rd 2008-12-13 13:46:37 UTC (rev 92)
@@ -4,16 +4,29 @@
\title{Orthonormal decomposition of variance}
\description{
This function performs the orthonormal decomposition of variance of a quantitative variable on an orthonormal basis. It also returns the results of five non parametric tests associated to the variance decomposition.
-It thus provides tools (graphical displays and test) for analysing phylogenetic, spatial and temporal pattern of one quantitative variable.
+It thus provides tools (graphical displays and test) for analysing
+phylogenetic, pattern in one quantitative trait. This implementation
+replace the (deprecated) version from the \code{ade4} package.\cr
+
+Several orthonormal bases can be used. By default, basis is constructed
+from a partition of tips according to tree topology (as returned by
+\code{\link{treePart}}); for this, the argument \code{tre} must be
+provided. Alternatively, one can provide an orthonormal basis as
+returned by \code{\link{orthobasis.phylo}}/\code{\link{me.phylo}}
+(argument \code{orthobas}), or provide a proximity matrix from which an
+orthobasis based on Moran's eigenvectors will be constructed (argument
+\code{prox}).
}
\usage{
-orthogram(x, orthobas = NULL, prox = NULL,
+orthogram(x, tre=NULL, orthobas = NULL, prox = NULL,
nrepet = 999, posinega = 0, tol = 1e-07, cdot = 1.5,
cfont.main = 1.5, lwd = 2, nclass,
high.scores = 0,alter=c("greater", "less", "two-sided"))
}
\arguments{
\item{x}{a numeric vector corresponding to the quantitative variable}
+ \item{tre}{a tree of class \code{\link[pkg:ape]{phylo}},
+ \linkS4class{phylo4} or \linkS4class{phylo4d}.}
\item{orthobas}{an object of class \code{'orthobasis'}}
\item{prox}{a matrix of phylogenetic proximities as returned by \code{\link{proxTips}}.}
\item{nrepet}{an integer giving the number of permutations}
@@ -50,6 +63,7 @@
}
\author{
Original code: Sébastien Ollier and Daniel Chessel.\cr
+
Current maintainer: Stéphane Dray <dray at biomserv.univ-lyon1.fr>
}
\seealso{
@@ -70,11 +84,15 @@
abline(lm(neonatw~afbw))
x <- phylo4d(tre, cbind.data.frame(afbw, neonatw)) # traits on the phylogeny
-## orthogram for trait afbw
-myOrthoBasis <- orthobasis.phylo(tre, method="oriAbouheif") # compute Abouheif's proximities
-orthogram(afbw, myOrthoBasis)
+## default orthogram for trait afbw
+ung.phylog <- newick2phylog(ungulates$tre)
+orthogram(afbw, tre)
+## using orthonormal basis derived from Abouheif's proximity
+myOrthoBasis <- orthobasis.phylo(tre, method="oriAbouheif") # Abouheif's proximities
+orthogram(afbw, ortho=myOrthoBasis)
+
## orthogram for trait neonatw
-orthogram(neonatw, myOrthoBasis)
+orthogram(neonatw, tre)
}
Modified: pkg/man/ppca.Rd
===================================================================
--- pkg/man/ppca.Rd 2008-12-12 19:05:47 UTC (rev 91)
+++ pkg/man/ppca.Rd 2008-12-13 13:46:37 UTC (rev 92)
@@ -2,7 +2,7 @@
\name{ppca}
\alias{ppca}
\alias{print.ppca}
-\alias{plot.ppca}
+\alias{scatter.ppca}
\title{Phylogenetic principal component analysis}
\description{These functions are designed to perform a phylogenetic principal
component analysis (pPCA, Jombart et al. in prep) and to display the
@@ -14,7 +14,7 @@
- \code{print.ppca}: prints the ppca content\cr
- - \code{plot.ppca}: plot principal components using
+ - \code{scatter.ppca}: plot principal components using
\code{\link{s.phylo4d}}\cr
}
@@ -91,9 +91,7 @@
Other functions have different outputs:\cr
- - \code{plot.ppca} returns the matched call.\cr
-
- - \code{screeplot.ppca} returns the matched call.
+ - \code{scatter.ppca} returns the matched call.\cr
}
\references{
Jombart, T.; Pavoine, S.; Dufour, A.-B. & Pontier, D. (in prep)
Modified: pkg/man/treePart.Rd
===================================================================
--- pkg/man/treePart.Rd 2008-12-12 19:05:47 UTC (rev 91)
+++ pkg/man/treePart.Rd 2008-12-13 13:46:37 UTC (rev 92)
@@ -26,6 +26,10 @@
tip (rows).
}
\author{ Thibaut Jombart \email{jombart at biomserv.univ-lyon1.fr} }
+\references{
+Ollier, S., Chessel, D. and Couteron, P. (2005) Orthonormal Transform to Decompose the Variance of a Life-History Trait across a Phylogenetic Tree. \emph{Biometrics}, \bold{62}, 471--477.
+}
+
\seealso{
- \code{\link{listDD}} which is called by \code{treePart}.\cr
- \code{\link{orthogram}}, which uses by default the orthobasis
More information about the Adephylo-commits
mailing list