[Adephylo-commits] r136 - in pkg/inst/doc: . figs

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Nov 5 17:09:11 CET 2009


Author: jombart
Date: 2009-11-05 17:09:11 +0100 (Thu, 05 Nov 2009)
New Revision: 136

Modified:
   pkg/inst/doc/adephylo.Rnw
   pkg/inst/doc/adephylo.pdf
   pkg/inst/doc/figs/adephylo-012.pdf
   pkg/inst/doc/figs/adephylo-phylo4d.pdf
Log:
version 1.0-1 is all ready to cruise


Modified: pkg/inst/doc/adephylo.Rnw
===================================================================
--- pkg/inst/doc/adephylo.Rnw	2009-11-05 13:36:03 UTC (rev 135)
+++ pkg/inst/doc/adephylo.Rnw	2009-11-05 16:09:11 UTC (rev 136)
@@ -9,8 +9,8 @@
 
 \usepackage[utf8]{inputenc} % for UTF-8/single quotes from sQuote()
 \newcommand{\code}[1]{{{\tt #1}}}
-\title{The \code{adephylo} package}
-\author{Thibaut Jombart}
+\title{\code{adephylo}: exploratory analyses for the phylogenetic comparative method}
+\author{Thibaut Jombart and St\'ephane Dray}
 \date{\today}
 
 
@@ -44,36 +44,34 @@
 %%%%%%%%%%%%%%%%%%%%%
 %%%%%%%%%%%%%%%%%%%%%
 
-\SweaveOpts{prefix.string = figs/adephylo, fig = FALSE, eps = TRUE, pdf = TRUE, width = 6, height = 6}
+\SweaveOpts{prefix.string = figs/adephylo, fig = FALSE, eps = FALSE, pdf = TRUE, width = 6, height = 6}
 
 
 This document describes the \code{adephylo} package for the R software.
 \code{adephylo} aims at implementing exploratory methods for the
 analysis of phylogenetic comparative data, i.e. biological traits measured for
 taxa whose phylogeny is also provided.
-Procedures implemented in this package rely on exploratory data
-analysis.
-They include data visualization and manipulation, tests for phylogenetic
-autocorrelation, multivariate analysis, computation of phylogenetic
-proximities and distances, and modelling phylogenetic signal using
-orthonormal bases.
-\\
+This package extends and replaces implementation of phylogeny-related
+methods in the ade4 package \url{http://pbil.univ-lyon1.fr/ADE-4/home.php?lang=eng}.
 
-These methods can be used to visualize, test, remove or investigate
-the phylogenetic signal in comparative data.
-The purpose of this document is to provide a general view a the main
-functionalities of \code{adephylo}, and to show how this package can be
-used along with \code{ape}, \code{phylobase} and \code{ade4} to
-analyse comparative data.
+Procedures implemented in \code{adephylo} rely on exploratory data analysis.  They include data
+visualization and manipulation, tests for phylogenetic autocorrelation, multivariate analysis,
+computation of phylogenetic proximities and distances, and modelling phylogenetic signal using
+orthonormal bases.  \\
 
+These methods can be used to visualize, test, remove or investigate the phylogenetic signal in
+comparative data.  The purpose of this document is to provide a general view of the main
+functionalities of \code{adephylo}, and to show how this package can be used along with \code{ape},
+\code{phylobase} and \code{ade4} to analyse comparative data.
 
 
 
 
 
+
 %%%%%%%%%%%%%%%%%%%%%
 %%%%%%%%%%%%%%%%%%%%%
-\section{First steps into \code{adephylo}}
+\section{First steps}
 %%%%%%%%%%%%%%%%%%%%%
 %%%%%%%%%%%%%%%%%%%%%
 
@@ -82,48 +80,38 @@
 %%%%%%%%%%%%%%%%%%%%%
 \subsection{Data representation: why we are not reinventing the weel}
 %%%%%%%%%%%%%%%%%%%%%
-Data representation can be defined as the way data are stored in a
-software (R, in our case).
-Technically, they are classes of objects containing the information.
-In the case of phylogeny, and comparative data, very efficient data
-representation are already defined in other packages.
-Hence, it made much more sense using directly objects from these classes.
-\\
 
+Data representation can be defined as the way data are stored in a software
+(R, in our case).  Technically, data representation is defined by classes of objects that contain
+the information.  In the case of phylogeny and comparative data, very efficient data representation
+are already defined in other packages.  Hence, it makes much more sense to use directly objects from
+these classes.  \\
 
-Phylogenies are best represented in Emmanuel Paradis's \code{ape}
-package (\url{http://ape.mpl.ird.fr/}),
-as the class \code{phylo}. Note that as \code{ape} is by far the
-largest package dedicated to phylogeny, using the \code{phylo} class
-assures a good interoperability of data. This class is defined in an
-online document: \url{http://ape.mpl.ird.fr/misc/FormatTreeR_28July2008.pdf}.
-\\
 
-However, data that are to be analyzed in \code{adephylo} do not only
-contain trees, but also traits associated to the tips of a tree.
-The package \code{phylobase}
-(\url{http://r-forge.r-project.org/projects/phylobase/}) is a
-collaborative effort designed to the handling of such data.
-Its representation of phylogenies is very similar to that of
-\code{ape}: the class \code{phylo4} basically is an extension of
-\code{phylo} class into formal (S4) class.
-More interestingly, the S4 class \code{phylo4d} can be used to store a
-tree and data associated to tips, internal nodes, or even edges of a tree.
-Classes of \code{phylobase} are described in a vignette of the
-package, accessible by typing:
+Phylogenies are best represented in Emmanuel Paradis's \code{ape} package
+(\url{http://ape.mpl.ird.fr/}), as the class \code{phylo}.  As \code{ape} is by far the largest
+package dedicated to phylogeny, using the \code{phylo} class assures a good interoperability of
+data. This class is defined in an online document:
+\url{http://ape.mpl.ird.fr/misc/FormatTreeR_28July2008.pdf}.  \\
+
+However, data that are to be analyzed in \code{adephylo} do not only contain trees, but also traits
+associated to the tips of a tree.  The package \code{phylobase}
+(\url{http://r-forge.r-project.org/projects/phylobase/}) is a collaborative effort designed to
+handling such data.  Its representation of phylogenies slightly differs from that of \code{ape}; the
+class \code{phylo4} was originally an extension of the \code{phylo} class into formal (S4) class, but it
+has now evolved into something more original. The S4 class \code{phylo4d} (`d' for `data') can be used to store a
+tree and data associated to tips, internal nodes, or even edges of a tree.  Classes of
+\code{phylobase} are described in a vignette of the package, accessible by typing:
 <<eval=FALSE>>=
-vignette("phylobase", package="phylobase")
+vignette("phylobase")
 @
 
-~\\
-As trees and comparative data are already handled by \code{ape} and
-\code{phylobase}, no particular data format shall be defined in
-\code{adephylo}.
-In particular, we are no longer using \code{phylog} objects, which
-were used to represent phylogenies in \code{ade4}.
-This class is now deprecated, but all previous functionalities
-available for \code{phylog} objects have been re-implemented and
--- in some cases -- improved in \code{adephylo}.
+~\\ As trees and comparative data are already handled by \code{ape} and \code{phylobase}, no
+particular data format shall be defined in \code{adephylo}.  In particular, we are no longer using
+\code{phylog} objects, which were used to represent phylogenies in \code{ade4} in a very \textit{ad
+  hoc} way, without much compatibility with other packages.  This class is now deprecated, but all
+previous functionalities available for \code{phylog} objects have been re-implemented and -- in some
+cases -- improved in \code{adephylo}.
 
 
 
@@ -132,38 +120,30 @@
 %%%%%%%%%%%%%%%%%%%%%
 \subsection{Installing the package}
 %%%%%%%%%%%%%%%%%%%%%
-What is tricky here is that a vignette is basically available once the
-package is installed.
-Assuming you got this document before installing the package, here are
-some clues about installing \code{adephylo}.
-\\
 
-First of all, \code{adephylo} depends on other packages, being
-\code{methods}, \code{ape}, \code{phylobase}, and \code{ade4}.
-These dependencies are mandatory, that is, you actually need to have
-these packages installed (with or without their dependencies) before
-using \code{adephylo}.
-Also, it is better to make sure you are using the latest versions of
-these packages. This can be achieved by typing
-\texttt{update.packages}, or (better for \code{ade4} and \code{phylobase}) by installing devel versions
-from R-Forge (\url{http://r-forge.r-project.org/}).
-In all cases, the latest version of \code{adephylo} can be found from
-\url{http://r-forge.r-project.org/R/?group_id=303}.
-\\
+What is tricky here is that a vignette is basically available once the package
+is installed.  Assuming you got this document before installing the package, here are some clues
+about installing \code{adephylo}.  \\
 
+First of all, \code{adephylo} depends on other packages, being \code{methods}, \code{ape},
+\code{phylobase}, and \code{ade4}.  These dependencies are mandatory, that is, you actually need to
+have these packages installed before using \code{adephylo}.  Also, it is better to make sure you are
+using the latest versions of these packages. This can be achieved using
+the \texttt{update.packages} command, or by installing devel versions from R-Forge
+(\url{http://r-forge.r-project.org/}).  In all cases, the latest version of \code{adephylo} can be
+found from \url{http://r-forge.r-project.org/R/?group_id=303}.  \\
+
 When loading the package, dependencies are also loaded:
 <<load>>=
 library(adephylo)
+search()
 @
 
-Note that possibly conflicting, deprecated functions or datasets from \code{ade4} are
-masked by \code{adephylo}.
-In case the converse would occur (i.e. deprecated function masking a
-function of \code{adephylo}), one can refer to the 'good' version of a
-function by adding the prefix \code{adephylo::} to the function,
-without space.
-Hence, it is possibly to coerce the version of a masked function,
-using a kludge like:
+Note that possibly conflicting, deprecated functions or datasets from \code{ade4} are masked by
+\code{adephylo}.  In case the converse would occur (i.e. deprecated function masking a function of
+\code{adephylo}), one can refer to the `good' version of a function by adding the prefix
+\code{adephylo::} to the function.  Hence, it is possible to coerce the version of a masked
+function, using a kludge like:
 <<kludge>>=
 cat("\n=== Old - deprecated- version ===\n")
 orthogram <- ade4::orthogram
@@ -186,7 +166,7 @@
 ?adephylo
 @
 
-Note that a html version may be preferred to browse easily the content
+The html version of this manpage may be preferred to browse easily the content
 of \code{adephylo}; this is accessible by typing:
 <<eval=FALSE>>=
 help("adephylo", package="adephylo", html=TRUE)
@@ -204,17 +184,18 @@
 %%%%%%%%%%%%%%%%%%%%%
 \subsection{Putting data into shape}
 %%%%%%%%%%%%%%%%%%%%%
-While this is not the purpose of this document to go through the
-details of \code{phylo}, \code{phylo4} and \code{phylo4d} objects, we
-shall show briefly how these objects can be obtained.
 
+While this is not the purpose of this document to go through the details of
+\code{phylo}, \code{phylo4} and \code{phylo4d} objects, we shall show briefly how these objects can
+be obtained.
 
+
 % % % % % % % % % % %
 \subsubsection{Making a \code{phylo} object}
 % % % % % % % % % % %
 The simplest way of turning a tree into a \code{phylo} object is using
 ape's function \code{read.tree}.
-This function reads a tree with the Newick (or 'parentetic') format,
+This function reads a tree with the Newick (or `parentetic') format,
 from a file (default, argument \code{file}) of from a character string
 (argument \code{text}).
 <<readTree, plot=TRUE>>=
@@ -232,7 +213,7 @@
 \\
 
 Note that \code{phylo} trees can also be constructed from alignements
-(see \code{read.GenBankdist.dna}, \code{read.dna},
+(see \code{read.GenBank}, \code{read.dna},
 \code{dist.dna}, \code{nj}, \code{bionj}, and \code{mlphylo}, all in
 \code{ape}), or even simulated (for instance, see \code{rtree}).
 \\
@@ -254,14 +235,17 @@
 % % % % % % % % % % %
 \subsubsection{Making a \code{phylo4d} object}
 % % % % % % % % % % %
-\code{phylo4d} objects are S4 objects, and are thus created in a
-particular way.
-The most immediate way of creating a \code{phylo4d} object is to call
-to the constructor, also named \code{phylo4d}.
-This is a function that takes two arguments: a tree (\code{phylo} or
-\code{phylo4} format) and a data.frame containing data, for tips by
-default (see \code{?phylo4d} for more information).
-Here is an example:
+
+\code{phylo4d} objects are S4 objects, and are thus created in a particular
+way.  These objects can be obtained in two ways, by reading a Nexus file containing tree and data
+information, or by `assembling' a tree and data provided for tips, nodes, or edges.
+
+Nexus files containing both tree and data can be read by \code{phylobase}'s function
+\code{readNexus} (see corresponding manpage for more information).
+The other way of creating a \code{phylo4d} object is using the
+constructor, also named \code{phylo4d}.  This is a function that takes two arguments: a tree
+(\code{phylo} or \code{phylo4} format) and a \code{data.frame} containing data, for tips by default (see
+\code{?phylo4d} for more information).  Here is an example:
 <<phylo4d, fig=TRUE>>=
 ung <- phylo4d(myTree, ungulates$tab)
 class(ung)
@@ -279,7 +263,7 @@
 %% errors in further analyses.
 %% \\
 
-Data are stored inside the slot \code{@tip.data} of the object.
+Data are stored inside the \code{@data} slot of the object.
 They can be accessed using the function \code{tdata}:
 <<>>=
 x <- tdata(ung, type="tip")
@@ -303,27 +287,24 @@
 %%%%%%%%%%%%%%%%%%%%%
 \subsection{Quantifying and testing phylogenetic signal}
 %%%%%%%%%%%%%%%%%%%%%
-In this document, the terms 'phylogenetic signal' and 'phylogenetic
-autocorrelation' are used interchangeably.
-They refer to the fact that observations of traits are not independent
-in closely related taxa.
-Several procedures are implemented by \code{adephylo} to measure and
-test phylogenetic autocorrelation.
 
+In this document, the terms `phylogenetic signal' and `phylogenetic autocorrelation' are used
+interchangeably.  They refer to the fact that values of life-history traits or ecological features
+are not independent in closely related taxa.  Several procedures are implemented by \code{adephylo}
+to measure and test phylogenetic autocorrelation.
 
+
 % % % % % % % % % % %
 \subsubsection{Moran's $I$}
 % % % % % % % % % % %
-The function \code{moran.idx} computes Moran's $I$, the most
-widely-used autocorrelation measure.
-It can also provide additionnal information (argument \code{addInfo}),
-being the null value of $I$ (i.e., the expected value in absence of
-phylogenetic autocorrelation), and the range of variation of $I$.
-It requires the degree of relatedness of tips on the phylogeny to be
-modelled by a matrix of phylogenetic proximities.
-Such a matrix can be obtained using different methods implemented by
-the function \code{proxTips}.
 
+The function \code{moran.idx} computes Moran's $I$, the most widely-used autocorrelation measure.
+It can also provide additionnal information (argument \code{addInfo}), being the null value of $I$
+(i.e., the expected value in absence of phylogenetic autocorrelation), and the range of variation of
+$I$.  It requires the degree of relatedness of tips on the phylogeny to be modelled by a matrix of
+phylogenetic proximities.  Such a matrix can be obtained using different methods implemented by the
+function \code{proxTips}.
+
 <<moranI>>=
 W <- proxTips(myTree, met="Abouheif")
 moran.idx(tdata(ung, type="tip")$afbw, W)
@@ -387,8 +368,8 @@
 For instance, we would like to use the correlation corresponding to a
 Brownian motion as a measure of phylogenetic proximity.
 
-First, we must estimate branch lengths, as the tree we possess does
-not have any:
+First, we must estimate branch lengths, as our tree does
+not have any (ideally, we would already have a tree with meaningful branch lengths):
 <<>>=
 hasEdgeLength(ung)
 myTree.withBrLe <- compute.brlen(myTree)
@@ -402,12 +383,10 @@
 abouheif.moran(ung, W=myProx)
 @
 
-\noindent In the present case, traits no longer appear as
-phylogenetically autocorrelated.
-Several explanation can be proposed: the procedure for estimating
-branch length might not have been appropriate, or the Brownian motion
-may simply not be appropriate to describe the evolution of the traits
-under study for this set of taxa.
+\noindent In the present case, traits no longer appear as phylogenetically autocorrelated.  Several
+explanation can be proposed: the procedure for estimating branch length may not be appropriate in
+this case, or the Brownian motion may fail to describe the evolution of the traits under study for
+this set of taxa.
 
 
 
@@ -443,29 +422,24 @@
 table.phylo4d(temp, cent=FALSE, scale=FALSE)
 @
 
-\noindent What we would like to do is assess where the variation of a trait is localized on
-the phylogeny; to do so, be could use these dummy vectors as
-regressors and see how variation is distributed among these vectors.
-However, these dummy vectors cannot be used as regressors because they
-are linearly dependent.
-The orthogram circumvents this issue by transforming and selecting
-dummy vectors into a new set of variables that are orthonormal.
-The obtained orthonormal basis can be used to decompose variation of
-the trait.
-Even if not necessary to get an orthogram, this basis can be obtained
-from \code{treePart}:
+\noindent What we would like to do is assess where the variation of a trait is structured on the
+phylogeny; to do so, we could use these dummy vectors as regressors and see how variation is
+distributed among these vectors.  However, these dummy vectors cannot be used as regressors because
+they are linearly dependent.  The orthogram circumvents this issue by transforming and selecting
+dummy vectors into a new set of variables that are orthonormal.  The obtained orthonormal basis can
+be used to decompose the variation of the trait.  Even if not necessary to get an orthogram, this basis
+can be obtained from \code{treePart}:
 <<>>=
 args(treePart)
 temp <- phylo4d(x, treePart(x, result="orthobasis") )
-table.phylo4d(temp)
 @
 
-\noindent And here are the first 10 vectors of the orthonormal basis
+\noindent And here are the first 8 vectors of the orthonormal basis
 for the ungulate dataset:
 <<orthobas1, fig=TRUE>>=
 temp <- phylo4d(myTree, treePart(myTree, result="orthobasis") )
 par(mar=rep(.1,4))
-table.phylo4d(temp, repVar=1:8)
+table.phylo4d(temp, repVar=1:8, ratio.tree=.3)
 @
 
 The decomposition of variance achieved by projecting a trait onto this
@@ -492,31 +466,25 @@
 \subsubsection{Using orthonormal bases}
 % % % % % % % % % % %
 
-In fact, the previous section describing the 'orthogram' has already
-shown that testing phylogenetic signal can (often) underlie modelling
-phylogenetic signal.
-In the case of the orthogram, several tests are linked to the
-decomposition of the variance of a trait onto a particular basis describing tree topology.
-In fact, it is possible to extend the principle of the 'orthogram' to
-any orthonormal basis modelling phylogenetic topology.
-Another example of such bases is offered by Moran's eigenvectors,
-which can be used to model different observable phylogenetic
-structures (see references in \code{me.phylo}).
+The previous section describing the orthogram has shown that testing phylogenetic signal underlies a
+model of phylogenetic structure. In the case of the orthogram, several tests are based on the
+decomposition of the variance of a trait onto an orthonormal basis describing tree topology.  In
+fact, it is possible to extend this principle to any orthonormal basis modelling phylogenetic
+topology.  Another example of such bases is offered by Moran's eigenvectors, which can be used to
+model different observable phylogenetic structures (see references in \code{me.phylo}).
 
-Moran's phylogenetic eigenvectors are implemented by the function
-\code{me.phylo} (also nicknamed \code{orthobasis.phylo}).
-The returned object is a data.frame with the class \code{orthobasis}
-defined in \code{ade4}; columns of this object are Moran's eigenvectors.
-An \code{orthobasis} be coerced to a regular data.frame or to a matrix
-using \code{as.data.frame} and \code{as.matrix}.
+Moran's phylogenetic eigenvectors are implemented by the function \code{me.phylo} (also nicknamed
+\code{orthobasis.phylo}).  The returned object is a data.frame with the class \code{orthobasis}
+defined in \code{ade4}; columns of this object are Moran's eigenvectors.  An \code{orthobasis} can
+be coerced to a regular \code{data.frame} or to a matrix using \code{as.data.frame} and \code{as.matrix}.
 <<>>=
 me.phylo(myTree.withBrLe)
 @
 
 \noindent Moran's eigenvectors are constructed from a matrix of
 phylogenetic proximities between tips.
-While any proximity can be used (argument \code{prox}), 5 proximities
-implemented by the \code{proxTips} function can be used, giving rise
+Any proximity can be used (argument \code{prox}); the 5 proximities
+implemented by the \code{proxTips} function are available by default, giving rise
 to different orthobases:
 <<figFourBas, fig=TRUE,include=FALSE, print=FALSE>>=
 ung.listBas <- list()
@@ -530,16 +498,12 @@
 
 \includegraphics[width=.8\textwidth]{figs/adephylo-figFourBas}
 
-\noindent In this case, the first Moran's eigenvectors are all very
-similar.
-In other cases, however, the orthobases built from different proximities can be
-quite different.
-\\
+\noindent In this case, the first Moran's eigenvectors are essentially similar.  In other cases,
+however, the orthobases built from different proximities can be quite different. \\
 
-One of the interests of Moran's eigenvectors in phylogeny is to remove
-phylogenetic autocorrelation in a linear model.
-This can be achieved using the appropriate eigenvector as covariate.
-Here is an example when studying the link of two traits in ungulate dataset.
+One of the interests of Moran's eigenvectors in phylogeny is to account for phylogenetic
+autocorrelation in a linear model.  This can be achieved using the appropriate eigenvector as
+covariate.  Here is an example when studying the link of two traits in ungulate dataset.
 <<lm1, fig=TRUE>>=
 afbw <- log(ungulates$tab[,1])
 neonatw <- log((ungulates$tab[,2]+ungulates$tab[,3])/2)
@@ -551,7 +515,7 @@
 anova(lm1)
 @
 
-\noindent Is this model valid, that is, are its residuals independent?
+\noindent Are the residuals of this model independent?
 <<resid, fig=TRUE>>=
 resid <- residuals(lm1)
 names(resid) <- myTree$tip.label
@@ -560,8 +524,8 @@
 table.phylo4d(temp)
 @
 
-\noindent No, residuals are clearly not independent, and exhibit
-phylogenetic autocorrelation.
+\noindent No, residuals are clearly not independent, as they exhibit
+strong phylogenetic autocorrelation.
 In this case, autocorrelation can be removed by using the first
 Moran's eigenvector as a covariate.
 In general, the appropriate eigenvector(s) can be chosen by usual
@@ -621,17 +585,16 @@
 %%%%%%%%%%%%%%%%%%%%%
 \subsection{Using multivariate analyses}
 %%%%%%%%%%%%%%%%%%%%%
-Multivariate analyses can of course be used to identify the main
-biodemographic strategies in a large set of traits.
-This could be (and likely is) the topic of an entire book.
-Such application is not particular to \code{adephylo}, but some
-practices are made easier by the package.
-We here provide a simple example, using the \code{maples} dataset.
-This dataset contains a tree and a set of 31 quantitative traits (see \code{?maples}).
 
-First of all, we seek a summary of the variability in traits using a
-principal component analysis.
-Missing data are replaced by mean values, so they are placed at the origin of the axes (the 'non-informative' point).
+Multivariate analyses can be used to identify the main biodemographic strategies in a large set of
+traits.  This could be the topic of an entire book.  Such application is not particular to
+\code{adephylo}, but some practices are made easier by the package, used together with \code{ade4}.
+We here provide a simple example, using the \code{maples} dataset.  This dataset contains a tree and
+a set of 31 quantitative traits (see \code{?maples}).
+
+First of all, we seek a summary of the variability in traits using a principal component analysis.
+Missing data are replaced by mean values, so they are placed at the origin of the axes (the
+`non-informative' point).
 <<pca1, fig=TRUE>>=
 f1 <- function(x){
     m <- mean(x,na.rm=TRUE)
@@ -642,30 +605,27 @@
 data(maples)
 traits <- apply(maples$tab, 2, f1)
 pca1 <- dudi.pca(traits, scannf=FALSE, nf=1)
-barplot(pca1$eig, main="PCA eigenvalues")
+barplot(pca1$eig, main="PCA eigenvalues", col=heat.colors(16))
 @
 
-\noindent One axis shall be retained.
-Does this axis reflect a phylogenetic structure?
-We can, as previously, plot it onto the phylogeny.
-In some cases, positive autocorrelation can be better perceived by
-examining the lag vector (see previous section on autoregressive
-models) instead of the original vector.
-Here, we shall plot both the retained principal component, and its lag vector:
+\noindent One axis shall be retained.  Does this axis reflect a phylogenetic structure?  We can
+represent this principal component onto the phylogeny.  In some cases, positive autocorrelation can
+be better perceived by examining the lag vector (see previous section on autoregressive models)
+instead of the original vector.  Here, we shall plot both the retained principal component, and its
+lag vector:
 <<pca2, fig=TRUE>>=
 tre <- read.tree(text=maples$tre)
 W <- proxTips(tre)
 myComp <- data.frame(PC1=pca1$li[,1], lagPC1=W %*% pca1$li[,1])
 myComp.4d <- phylo4d(tre, myComp)
+nodeLabels(myComp.4d) <- names(nodeLabels(myComp.4d))
 table.phylo4d(myComp.4d)
 @
 
-\noindent It is quite clear that the main component of diversity among
-taxa separates descendants from 'N02' from descendants of 'N07'.
-Phylogenetic autocorrelation can be checked in 'PC1' (note that
-testing it in the lag vector would be circulary, as the lag vector
-already otimizes positive autocorrelation), for instance using
-Abouheif's test:
+\noindent It is quite clear that the main component of diversity among taxa separates descendants
+from node 19 from descendants of node 24.  Phylogenetic autocorrelation can be checked in `PC1'
+(note that testing it in the lag vector would be circulary, as the lag vector already otimizes
+positive autocorrelation), for instance using Abouheif's test:
 <<aboutest, fig=TRUE>>=
 myTest <- abouheif.moran(myComp[,1], W=W)
 plot(myTest, main="Abouheif's test using patristic proximity")
@@ -674,7 +634,7 @@
 
 \noindent To dig further into the interpretation of this structure,
 one can have a look at the loadings of the traits, to see to which
-biological traits these opposed strategy correspond:
+biological traits these opposed life histories correspond:
 <<loadings, fig=TRUE>>=
 ldgs <- pca1$c1[,1]
 plot(ldgs, type="h", xlab="Variable", xaxt="n", ylab="Loadings")

Modified: pkg/inst/doc/adephylo.pdf
===================================================================
--- pkg/inst/doc/adephylo.pdf	2009-11-05 13:36:03 UTC (rev 135)
+++ pkg/inst/doc/adephylo.pdf	2009-11-05 16:09:11 UTC (rev 136)
@@ -10,7 +10,7 @@
 << /S /GoTo /D (section.2) >>
 endobj
 12 0 obj
-(First steps into adephylo)
+(First steps)
 endobj
 13 0 obj
 << /S /GoTo /D (subsection.2.1) >>
@@ -105,435 +105,421 @@
 73 0 obj
 << /S /GoTo /D [74 0 R  /Fit ] >>
 endobj
-93 0 obj <<
-/Length 1746      
+94 0 obj <<
+/Length 1894      
 /Filter /FlateDecode
 >>
 stream
-xÚÝYKÛ6¾ï¯Ð­2©|Kꭏ$H€i°==¨¶Öqc[†eovûë;R¦eí#NÐl{°E‹3CÎÇá¼,’y"’—âçO—ß¿Ð&‘E®¤5ÉåU¢”É%'m®+•\Î’÷éåD¦àÓLþ¸|
-UÌ¡Un´yDZÙ¬¯
-2ÜÂgÙz®£u
-›W…\ «§U¤'V§õü°˜‰”ye­B¶¬¹-ª$Se^VÒo—ZÀçOŸ=|v“L+›¾nWUö3[šÁI&óB:¤s]Xôk‹´×¸TÁsfʥ͖ÅÙgüT0-|U¼K£irmïR*—gFåeY±ôŸ[ _O4ì éGò_ "Ùμ{	çbʤÊ+§J°Q at A,JN²
-vñ
-d¨t‡Jµ°/‘μòÓÝ‚Cáá´“÷ ‰¨p¯Ù¯Rò*ŠWyèâbZê´C<³_¨tÁûðmu´ñÊäÕÀ:èl%yo#¤A¼ÙþÊh 4ˆQw‚óÀA“caò¼9¬øI¡túšÅŽl#ÓZ§[ÚêÚ ’Í-`ˆí¾˜dÆèôÓœ»e¾O8nx\;‘¾EÔ ’½ Sûº&Ž^>½Ÿ3Ó®¿mA6›c³gQUi>ɬø0ü‹Jé¤ó°…·ãçOP¹*å¡zµ¦cG,ð´–¬‰LãM7¬é¯r‰WÙÁUn†{©¤<Ùîà1¦Ñç“|™°/B066í|Ùx ‡NÀÖ[?Ó̆KÛªü/ vå˜æ0óíþ0gƒ+Ý߸÷’8^¯zÞýäR¹ÿ!”J[7cxw(KßÔhÖ#.½p¹T&Ý'nüØ«*7*зP­Iÿj(L([>ðÏÂŒÓæÖ܉´úªHãuÀ€z‚¸®òÒÉÇA^8ó¯Bþ 1Û@¤™´:/!;Ê]4ç.ÏAå›MضޅÑ-'/ì0jNmêup·è•ÝÉ+NÃ=*Œ°š‚ŽÓß0]«IÀ•?Ý#»XÓS`¥¼±ë=Þ!ún|2‚Ùöœ’Ë&rSïõp<÷
-Àˆ¯}ìcGëÎñSÙ‘Ÿj1X2ßulýRÆ÷F@íÒg‹¯‰åÑ%X“§|ZŽþñ$cPºªRäEožnˆuðT?bT¤íž<¶¨«IVéw¾ðéŸ7ÎaòR¨'NüÌå žöà½}̽¤‚h
-u*ÖD„5¹ž@E]þöê 5™ÿÂW¹0wM©övÑW*Ì7PÊUâ‹#`õ YÝy…C%ñ¦%-g\Ò°k~¼?›²Æ÷93'Š§š¬I€Pª³½ Š½àï]'ÚP?| ³§Ÿ+À†Ð¢öGלD3-¾})vDâ.tz¿µ§@OÅø¼¯è	²ë¨Z_
-Œ±;5¦ò©x¬S¤ŠTç_ÈP˜zC:\¿ÖKûe䪼ƒÁ_õ.ô&„`Ε¸f½ÂVß.¹|$ˆnâi;Ï'rT‡œ”؃ë[yÞ/c	Û~Ê-£Ð†;Î;¸ÓVŠrÐÁ¤†šHgl•SÌWQ#Š'ƒ1O·}ß3ó="Ïï»1§…Ô‚“íÇïÚ@mcÕhÓ–;=´øß»ÃF¼½ÀÏwüèÚ+²-`¥ÎYM½±|l¿ÊåZ›3÷‹þ
-N®<¶}
-œ+@ÊÂú`Íô¤w›¥—½:íÌYòPMàÒËàZ¸šÀR…ÐQõ>˜‹_ç
-±¾
-áA‘QÁÜSÇ3õ„A¯è¼Y‡…8À~öÀ!ú|¢ÞÆ)Ap|F¸¨Oò^(n” Whàª8ÇÍtÊ#xÍÅ”7
-Ì6ÊAv¼a|IÚ×ÝÞÏ53~Ì!ðÕ7ÜœÁM|" º†gÇ5å.+Î/‚‡*Køu-^q¶¾‡Øf]‹™‘zY>ó-RnMí·!ƒe)l~ͪ‰»H
-WdlCoê‹ AœtA‰~âÌ-µž¹¹ñ½ŒÍŠèFôíKV«ä¨åèÙ!º¤Œ¬S`—Œeéÿ"˜5üvše(ë:¸¡=ÉÄáßq÷›8êõŒ+Z‰6{TÔ'³²ÎÖí‚]º	±N.înÜkæ™Âþ 	¥Ö(û…õ••>–¡Ì‘XF
-–G±Œ‘tPV‘•´d
-ûÝ Å¦=áUEç]Õ
-›#°Ýx²Õ"
-½àê3Ui†3nLøfüzÂþ5%änuž­*çÙŒ(Ì4žäx ¥¢$dÜ´À>@µžó‹v;’€Žhܧ£r¥«ríl’Yx*BmLóüòâ”mQ
+xÚÝYKÛ6¾ï¯Ð-2+|‰”
+EÚ< )Òt{J{PmÙëƶÙÞdûë;R¦e{wãͶ[’CÎÇ™3#‘L‘¼¼w\¼¼xòBëDºLÉÜ$—“DÚ"+s•X™gºTÉå8yŸV™Žkø[]Áß
+üæÍàË×0ØƃÈ\	’iÐwƒ¡&­?á8"ÓEmšöf0ÔBà%üª¹—»®×Ü2‡¦Å{菳Ö8a2ÌE¦\‘•ÌJYðL(ýj \X™L§µ\ofð?b9#”¹ÀÞ-eÿ³kXs‡£ÙšÁPÙtÌJ*‘H˜.X at I%²ÂŠ¬(%/à‡àDzÙ[”2Už¾nUt-mh±òcîø+µ@×ß…ÒcuZ³b0TánÏZ’ýnSf¹ÀõèL;Ãëù¹Áv¯¨Å@ê–¥äùª Yø+YUÆ`2m,©:”Êfî‡FeEQ²ôŸZ¸†åÖÝÝÇ_HØ|‘´Ó„oÞ½û2ERf¥U%Šý“ƒa	«x2Tºix- Æp´™ñd(<Xmò4¥‚ÑÇçìÏ¢x–¸I8Ç7 Ðé'×8)JxJ©X' ¬4À"ñSf ´“°—é3ܱ
+mÛPk¶äJ¸’—P/q6¡Ó¬ÁÝFï1:ýxÅ;Mã>â}Í÷UëM:ˆ${F˜Áî_ÓˆN>½Ÿò ·­º“ÍÆRÏûX¸²L³xžÀ‹á'¾ôzJ+­-¼=¾;P)Õ«%mJ „ùÌûH¼èš5]U#Ôëà WšÖýµ”R,·w9¦Ñçwù2aÇÔ÷EÐFjàËÚHaGÀV­o©Çý©ó²ø/ v[Ïc`šsÌÑx0ßnc0#ï÷\ºó¸ç0œ¨{ż{àTö¥R@ºÇ˜Ð:”Ʀoª=4+>|`ÈŽUÍ¤2!˜'!ð1ˆiX•™Q¡Ç]nÒ¿j:DØ=/
+øgáÆ™g¹9‰´úªH£;Èňë"!y?ȝ5ÿ*äws~ȽÀe(síEš#‹ç ò§UÇ–t‡gw¡<aTxT»˜Yyv~HÁmjÏ?t~ü‚ÁTµ&~w÷ì"¢‡Õ#…8¢;AV>Á ›#ì:¢Æ‘g=¼ŸzûF`Ä×Þöc[kÏá)†l§š6ÄޏÖlýRÆ~# C²Áü_íMÚÛ"è	Öä{>,¢¿—cP»;©ª€œÐœÄ:0ÕSLO\Úl9Àc‹š†Î¥(>ïÂ?oœýàÅ©}œÞañ™ÑÞ<íÁ{{¿DªGŒb6NXõ„^tó7“Ôdþ3Ÿ°BÛ5…Úí¬ËTx\O)[Š/>Ë;Í꤇LâMCZŽ9¥aj¾?ŸXãÛÈÌ
+÷Pƒ5	Ju6ª˜[ÇçDò*’,éqØZTãÀ
+No=XZùÖÄvDâ:om7\¨+›v=Aveë‹ž1®©x(Œuˆ”K¥;ß!Cbê
+iç~Ì—¶óˆª<ÁàSµ	µ	GpT<†žËËo\ÞDÛñ°Øæ9
+H*×ȤÄ
+YWhó¼Œ9&DlÛ—ŒB‘l?îà:X!Š^™ÓB¤c¶J,‹nQ!Šƒ1Ú®¸9ô5"?ÞWc3
+©•
+ET>öG÷=9¹M®â|+=nWé¡É»qXˆ·x|‡IfÂUUÇųŠÊcÙ±%+›imÎ\2Rl^±oþtv. ¬æƒ¦+½[ͽìÅaq.'Ú€„§žvᄳ	B»ÕÑ0s‹Ÿg‚ ä¾áAA‘Õ~Ý›¶à‘öËè(xZ/ÃDI`Á¹Ç‰>¤¨Ú8*Üg„J%á…âZ	C
+Þb-Í)”à9g#^(Σ0dÃÆ—¤}µÞú¶z̯ƒE„qÕ'®Ïà">Pëš[kÊ…VlŸ’é+Kø­prPJÛp™•5ójø´S¥w8Xµ*ʨ^™³ãKú:²aßãñk^-Ç܃4¤Ü²±KÒëÙ"˜GÏŒº2uý¥ÉB þð˜žm8¨*_+æÚ/Ž™¼Ÿ-ùª³x_Ñ÷"ƒö˜3
+8AÚiÂ7”Ùî;¥Ë3»ã‘«¨·¢¹LŸøßj°3¤¹7°­?oØ"QU`ç4¸@ã[¥ï=ñæ„Ҟ«öÏ»Q†ZèTXÕbW^âÂïH^ð몺3P¦ßû¾ü|:},
+H¡Ü.}¤U8
+Ä®÷Sƒ·l‘ÔÉ·>*/™|:ÃYì}| ]ö}–GÒe.?›Ô]&t—wöuÃs¢¹âõvÞ+Òq¨¹bgÏhDgìg2€#‹2sº7Ö7H:LÃKi¾í†h
+|ŽM\CÎ?û{ÏÇP¹*Þ,ª`m«mØîÝ`?—{g_{6ÃQDØxùè)òÝÅÒ–™¶9œ<.3¢ûœ÷y~yñ.Ր
 endstream
 endobj
 74 0 obj <<
 /Type /Page
-/Contents 93 0 R
-/Resources 92 0 R
+/Contents 94 0 R
+/Resources 93 0 R
 /MediaBox [0 0 612 792]
-/Parent 105 0 R
-/Annots [ 75 0 R 76 0 R 77 0 R 78 0 R 79 0 R 80 0 R 81 0 R 82 0 R 83 0 R 84 0 R 85 0 R 86 0 R 87 0 R 88 0 R 89 0 R 90 0 R 91 0 R ]
+/Parent 107 0 R
+/Annots [ 75 0 R 76 0 R 77 0 R 78 0 R 79 0 R 80 0 R 81 0 R 82 0 R 83 0 R 84 0 R 85 0 R 86 0 R 87 0 R 88 0 R 89 0 R 90 0 R 91 0 R 92 0 R 106 0 R ]
 >> endobj
 75 0 obj <<
 /Type /Annot
 /Border[0 0 0]/H/I/C[1 0 0]
-/Rect [132.772 497.323 212.801 506.19]
+/Rect [132.772 475.406 212.801 484.272]
 /Subtype /Link
 /A << /S /GoTo /D (section.1) >>
 >> endobj
 76 0 obj <<
 /Type /Annot
 /Border[0 0 0]/H/I/C[1 0 0]
-/Rect [132.772 473.194 271.461 484.272]
+/Rect [132.772 451.555 202.669 462.354]
 /Subtype /Link
 /A << /S /GoTo /D (section.2) >>
 >> endobj
 77 0 obj <<
 /Type /Annot
 /Border[0 0 0]/H/I/C[1 0 0]
-/Rect [147.716 461.518 423.429 472.357]
+/Rect [147.716 439.6 423.429 450.439]
 /Subtype /Link
 /A << /S /GoTo /D (subsection.2.1) >>
 >> endobj
 78 0 obj <<
 /Type /Annot
 /Border[0 0 0]/H/I/C[1 0 0]
-/Rect [147.716 449.563 267.516 460.402]
+/Rect [147.716 427.645 267.516 438.484]
 /Subtype /Link
 /A << /S /GoTo /D (subsection.2.2) >>
 >> endobj
 79 0 obj <<
 /Type /Annot
 /Border[0 0 0]/H/I/C[1 0 0]
-/Rect [147.716 437.607 239.66 448.447]
+/Rect [147.716 415.69 239.66 426.529]
 /Subtype /Link
 /A << /S /GoTo /D (subsection.2.3) >>
 >> endobj
 80 0 obj <<
 /Type /Annot
 /Border[0 0 0]/H/I/C[1 0 0]
-/Rect [147.716 425.652 276.761 436.491]
+/Rect [147.716 403.734 276.761 414.574]
 /Subtype /Link
 /A << /S /GoTo /D (subsection.2.4) >>
 >> endobj
 81 0 obj <<
 /Type /Annot
 /Border[0 0 0]/H/I/C[1 0 0]
-/Rect [170.63 413.418 304.975 424.536]
+/Rect [170.63 391.5 304.975 402.618]
 /Subtype /Link
 /A << /S /GoTo /D (subsubsection.2.4.1) >>
 >> endobj
 82 0 obj <<
 /Type /Annot
 /Border[0 0 0]/H/I/C[1 0 0]
-/Rect [170.63 401.463 315.416 412.581]
+/Rect [170.63 379.545 315.416 390.663]
 /Subtype /Link
 /A << /S /GoTo /D (subsubsection.2.4.2) >>
 >> endobj
 83 0 obj <<
 /Type /Annot
 /Border[0 0 0]/H/I/C[1 0 0]
-/Rect [132.772 379.824 278.215 390.623]
+/Rect [132.772 357.906 278.215 368.706]
 /Subtype /Link
 /A << /S /GoTo /D (section.3) >>
 >> endobj
 84 0 obj <<
 /Type /Annot
 /Border[0 0 0]/H/I/C[1 0 0]
-/Rect [147.716 367.869 362.099 378.708]
+/Rect [147.716 345.951 362.099 356.79]
 /Subtype /Link
 /A << /S /GoTo /D (subsection.3.1) >>
 >> endobj
 85 0 obj <<
 /Type /Annot
 /Border[0 0 0]/H/I/C[1 0 0]
[TRUNCATED]

To get the complete diff run:
    svnlook diff /svnroot/adephylo -r 136


More information about the Adephylo-commits mailing list