From noreply at r-forge.r-project.org Tue May 14 13:48:33 2013 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Tue, 14 May 2013 13:48:33 +0200 (CEST) Subject: [Adephylo-commits] r189 - in pkg: . R Message-ID: <20130514114834.02B661853E0@r-forge.r-project.org> Author: jombart Date: 2013-05-14 13:48:33 +0200 (Tue, 14 May 2013) New Revision: 189 Added: pkg/R/bullseye.R Modified: pkg/DESCRIPTION Log: Working on bullseye function. Package now requires adegenet. Modified: pkg/DESCRIPTION =================================================================== --- pkg/DESCRIPTION 2013-03-26 17:53:05 UTC (rev 188) +++ pkg/DESCRIPTION 2013-05-14 11:48:33 UTC (rev 189) @@ -5,7 +5,7 @@ Author: Thibaut Jombart , Stephane Dray Maintainer: Thibaut Jombart Suggests: -Depends: methods, phylobase, ape, ade4 +Depends: methods, phylobase, ape, ade4, adegenet Description: Multivariate tools to analyze comparative data, i.e. a phylogeny and some traits measured for each taxa. License: GPL (>=2) LazyLoad: yes Added: pkg/R/bullseye.R =================================================================== --- pkg/R/bullseye.R (rev 0) +++ pkg/R/bullseye.R 2013-05-14 11:48:33 UTC (rev 189) @@ -0,0 +1,74 @@ +## +## PLOT A FAN TREE, WITH BULLSEYE LEGEND AND AXIS, AND OPTIONAL COLORS +## FOR TIPS +## +## Author: Thibaut Jombart, May 2013. +## t.jombart at imperial.ac.uk +## + +############ +## bullseye +############ +bullseye <- function(phy, traits=NULL, type="fan", col.tips.by=NULL, col.pal=seasun, + n.circ=6, bg.circ=transp("royalblue",.1), circ.unit=NULL, + legend=TRUE, posi.leg="bottomleft", leg.title="", + ...){ + ## CHECKS ## + if(inherits(phy, c("phylo4","phylo4d"))) phy <- as(phy, "phylo") + if(!is.list(col.pal)) col.pal <- c(col.pal) + + ## REORDER DATA BY TIP LABEL ## + ## traits + if(!is.null(traits) && !is.null(row.names(traits))){ + traits <- traits[phy$tip.label,,drop=FALSE] + } + ## col.tips.by + if(!is.null(col.tips.by) && !is.null(names(col.tips.by))){ + col.tips.by <- col.tips.by[phy$tip.label] + } + + + ## PLOT THE PHYLOGENY + ## handle color info + leg.txt <- NULL + if(!is.null(col.tips.by)){ + tip.col.info <- any2col(col.tips.by, col.pal=col.pal[[1]]) + plot(phy, type="fan", tip.col=tip.col.info$col, ...) + leg.col <- tip.col.info$leg.col + leg.txt <- tip.col.info$leg.txt + } else{ + plot(phy, type="fan", ...) + } + + ## HANDLE THE 'BULLSEYE' ## + ## window setting + oxpd <- par("xpd") + par(xpd=TRUE) + on.exit(par(oxpd)) + + ## annot info + if(is.null(circ.unit)){ + annot.max <- 0.5*diff(par("usr")[1:2]) + annot.dist <- seq(from=0, to=annot.max, length=n.circ) + } else { + annot.dist <- seq(from=0, by=circ.unit, length=n.circ) + annot.max <- max(annot.dist) + } + + ## trace the disks + symbols(rep(0,n.circ), rep(0,n.circ), circ=annot.dist, inches=FALSE, + bg=bg.circ, fg=NA, add=TRUE) + + ## axis annotation + segments(-annot.dist[2],0,-annot.dist[3],0) + text(-mean(annot.dist[2:3]),-annot.dist[2]/5, + label=format(annot.dist[2], scientific=TRUE, digits=3),cex=.7) + + ## legend info + if(!is.null(legend) && !is.null(leg.txt)){ + legend(x=posi.leg, legend=leg.txt, fill=leg.col, title=leg.title) + } + + leg.info <- list(posi=posi.leg, col=leg.col, txt=leg.txt) + return(invisible(leg.info)) +} # end bullseye From noreply at r-forge.r-project.org Tue May 14 16:12:05 2013 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Tue, 14 May 2013 16:12:05 +0200 (CEST) Subject: [Adephylo-commits] r190 - in pkg: . R man Message-ID: <20130514141205.A1DD8183A54@r-forge.r-project.org> Author: jombart Date: 2013-05-14 16:12:05 +0200 (Tue, 14 May 2013) New Revision: 190 Modified: pkg/ChangeLog pkg/DESCRIPTION pkg/R/bullseye.R pkg/man/adephylo.package.Rd pkg/man/dibas.Rd pkg/man/table.phylo4d.Rd Log: preparing new release - 1.1-4 Modified: pkg/ChangeLog =================================================================== --- pkg/ChangeLog 2013-05-14 11:48:33 UTC (rev 189) +++ pkg/ChangeLog 2013-05-14 14:12:05 UTC (rev 190) @@ -1,3 +1,15 @@ + CHANGES IN ADEPHYLO VERSION 1.1-4 + + +NEW FEATURES + + o added the function bullseye to plot fan-like phylogenies and + associated traits. + + o added new methods for dibas. + + + CHANGES IN ADEPHYLO VERSION 1.1-3 Modified: pkg/DESCRIPTION =================================================================== --- pkg/DESCRIPTION 2013-05-14 11:48:33 UTC (rev 189) +++ pkg/DESCRIPTION 2013-05-14 14:12:05 UTC (rev 190) @@ -1,6 +1,6 @@ Package: adephylo -Version: 1.1-3 -Date: 2012/10/30 +Version: 1.1-4 +Date: 2013/05/15 Title: adephylo: exploratory analyses for the phylogenetic comparative method. Author: Thibaut Jombart , Stephane Dray Maintainer: Thibaut Jombart @@ -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 table.phylo4d.R distances.R proximities.R orthobasis.R ppca.R orthogram.R abouheif.R moran.R dibas.R zzz.R +Collate: utils.R partition.R table.phylo4d.R distances.R proximities.R orthobasis.R ppca.R orthogram.R abouheif.R moran.R dibas.R bullseye.R zzz.R Modified: pkg/R/bullseye.R =================================================================== --- pkg/R/bullseye.R 2013-05-14 11:48:33 UTC (rev 189) +++ pkg/R/bullseye.R 2013-05-14 14:12:05 UTC (rev 190) @@ -9,37 +9,49 @@ ############ ## bullseye ############ -bullseye <- function(phy, traits=NULL, type="fan", col.tips.by=NULL, col.pal=seasun, - n.circ=6, bg.circ=transp("royalblue",.1), circ.unit=NULL, - legend=TRUE, posi.leg="bottomleft", leg.title="", - ...){ +bullseye <- function(phy, traits=NULL, col.tips.by=NULL, col.pal=seasun, + circ.n=6, circ.bg=transp("royalblue",.1), circ.unit=NULL, + legend=TRUE, leg.posi="bottomleft", leg.title="", leg.bg="white", + traits.inset=1.1, traits.space=0.05, traits.pch=19, traits.cex=1, + alpha=1, axis=TRUE, ...){ ## CHECKS ## if(inherits(phy, c("phylo4","phylo4d"))) phy <- as(phy, "phylo") if(!is.list(col.pal)) col.pal <- c(col.pal) + leg.info <- NULL ## REORDER DATA BY TIP LABEL ## - ## traits + ## make sure traits is a data.frame + if(!is.null(traits)) traits <- as.data.frame(traits) if(!is.null(traits) && !is.null(row.names(traits))){ - traits <- traits[phy$tip.label,,drop=FALSE] + if(!all(phy$tip.label %in% row.names(traits))){ + warning("tip labels and names of the traits matrix do not match") + } else { + traits <- traits[phy$tip.label,,drop=FALSE] + } } + ## col.tips.by if(!is.null(col.tips.by) && !is.null(names(col.tips.by))){ col.tips.by <- col.tips.by[phy$tip.label] } + ## recycle col.pal + pal.length <- 0 + if(!is.null(traits)) pal.length <- pal.length + ncol(traits) + if(!is.null(col.tips.by)) pal.length <- pal.length + 1 + col.pal <- rep(col.pal, length=pal.length) + ## PLOT THE PHYLOGENY ## handle color info - leg.txt <- NULL if(!is.null(col.tips.by)){ tip.col.info <- any2col(col.tips.by, col.pal=col.pal[[1]]) - plot(phy, type="fan", tip.col=tip.col.info$col, ...) - leg.col <- tip.col.info$leg.col - leg.txt <- tip.col.info$leg.txt + plot(phy, type="fan", tip.col=transp(tip.col.info$col,alpha), ...) } else{ plot(phy, type="fan", ...) } + ## HANDLE THE 'BULLSEYE' ## ## window setting oxpd <- par("xpd") @@ -49,26 +61,72 @@ ## annot info if(is.null(circ.unit)){ annot.max <- 0.5*diff(par("usr")[1:2]) - annot.dist <- seq(from=0, to=annot.max, length=n.circ) + annot.dist <- seq(from=0, to=annot.max, length=circ.n) } else { - annot.dist <- seq(from=0, by=circ.unit, length=n.circ) + annot.dist <- seq(from=0, by=circ.unit, length=circ.n) annot.max <- max(annot.dist) } - + ## trace the disks - symbols(rep(0,n.circ), rep(0,n.circ), circ=annot.dist, inches=FALSE, - bg=bg.circ, fg=NA, add=TRUE) + symbols(rep(0,circ.n), rep(0,circ.n), circles=annot.dist, inches=FALSE, + bg=circ.bg, fg=NA, add=TRUE) ## axis annotation - segments(-annot.dist[2],0,-annot.dist[3],0) - text(-mean(annot.dist[2:3]),-annot.dist[2]/5, - label=format(annot.dist[2], scientific=TRUE, digits=3),cex=.7) + if(axis){ + segments(-annot.dist[2],0,-annot.dist[3],0) + text(-mean(annot.dist[2:3]),-annot.dist[2]/5, + label=format(annot.dist[2], scientific=TRUE, digits=3),cex=.7) + } + + ## PLOT TRAITS ## + if(!is.null(traits)){ + ## recycle pch and cex + traits.pch <- rep(traits.pch, length=ncol(traits)) + traits.cex <- rep(traits.cex, length=ncol(traits)) + + ## get tips coordinates + tips.x <- get("last_plot.phylo", envir = .PlotPhyloEnv)$xx[1:length(phy$tip.label)] + tips.y <- get("last_plot.phylo", envir = .PlotPhyloEnv)$yy[1:length(phy$tip.label)] + + ## use furthest tip from the root to define new base coords + vec.length <- sqrt(tips.x^2 + tips.y^2) + + x.base <- (tips.x/vec.length) * max(vec.length) * traits.inset + y.base <- (tips.y/vec.length) * max(vec.length) * traits.inset + + ## plot traits + for(i in 1:ncol(traits)){ + col.info <- any2col(traits[,i], col.pal=col.pal[[i]]) + temp.x <- x.base * (traits.inset + i*traits.space) + temp.y <- y.base * (traits.inset + i*traits.space) + points(temp.x, temp.y, pch=traits.pch[i], col=transp(col.info$col,alpha), cex=traits.cex[i]) + + ## save info for legend if needed + if(is.null(col.tips.by) && i==1){ + leg.info <- list(col=transp(col.info$leg.col,alpha), txt=col.info$leg.txt) + } + } + } + + + ## ADD LEGEND ## ## legend info - if(!is.null(legend) && !is.null(leg.txt)){ - legend(x=posi.leg, legend=leg.txt, fill=leg.col, title=leg.title) + if(!is.null(legend)){ + ## legend for tip colors + if(!is.null(col.tips.by)){ + leg.col <- transp(tip.col.info$leg.col,alpha) + leg.txt <- tip.col.info$leg.txt + leg.info <- list(col=transp(tip.col.info$leg.col,alpha), txt=tip.col.info$leg.txt) + } + + ## plot legend + if(!is.null(leg.info) && legend){ + leg.info$posi <- leg.posi + legend(x=leg.info$posi, legend=leg.info$txt, fill=leg.info$col, title=leg.title, bg=leg.bg) + return(invisible(leg.info)) + } } - leg.info <- list(posi=posi.leg, col=leg.col, txt=leg.txt) - return(invisible(leg.info)) + return(invisible()) } # end bullseye Modified: pkg/man/adephylo.package.Rd =================================================================== --- pkg/man/adephylo.package.Rd 2013-05-14 11:48:33 UTC (rev 189) +++ pkg/man/adephylo.package.Rd 2013-05-14 14:12:05 UTC (rev 190) @@ -109,6 +109,10 @@ representing traits onto the tips of a phylogeny. Several traits can be plotted in a single graphic.\cr + - \code{\link{bullseye}}: an alternative to + \code{\link{table.phylo4d}} based on fan-like representation, better + for large trees.\cr + - \code{\link{scatter.ppca}}, \code{\link{screeplot.ppca}}, \code{\link{plot.ppca}}: several plots associated to a phylogenetic principal component analysis (see \code{\link{ppca}}).\cr @@ -130,8 +134,8 @@ \tabular{ll}{ Package: \tab adephylo\cr Type: \tab Package\cr - Version: \tab 1.1-3\cr - Date: \tab 2012-10-30 \cr + Version: \tab 1.1-4\cr + Date: \tab 2013-05-15 \cr License: \tab GPL (>=2) } } Modified: pkg/man/dibas.Rd =================================================================== --- pkg/man/dibas.Rd 2013-05-14 11:48:33 UTC (rev 189) +++ pkg/man/dibas.Rd 2013-05-14 14:12:05 UTC (rev 190) @@ -4,6 +4,7 @@ \alias{dibas.matrix} \alias{dibas.dist} \alias{dibas.phylo} +\alias{dibas.vector} \alias{simDatGroups} \title{DIstance-Based Assignment} \description{ @@ -12,12 +13,16 @@ } \usage{ \method{dibas}{phylo}(x, grp, method = c("default", "leaveOneOut"), - metric = c("Abouheif", "nNodes", "patristic", "sumDD"), \ldots) + fromRoot=FALSE, metric = c("Abouheif", "nNodes", "patristic","sumDD"), + n.items=NULL, \ldots) \method{dibas}{matrix}(x, grp, method = c("default", "leaveOneOut"), \ldots) \method{dibas}{dist}(x, grp, method = c("default", "leaveOneOut"), \ldots) +\method{dibas}{vector}(x, grp, method=c("default","leaveOneOut"), + n.items=NULL, \ldots) + } \arguments{ \item{x}{a \code{phylo} object, or a symmetric matrix of pairwise distances @@ -33,6 +38,12 @@ \code{\link{distTips}} for more information. Note that patristic distances should be avoided in presence of one or more highly diverse group because of the 'hand fan' syndrome (see example).} + \item{fromRoot}{a logical indicating if distances from the root, + rather than between groups, should be used.} + \item{n.items}{a vector of integers of the same length as x, stating + how many times each items in 'x' should be repeated; used to take + into account differences in abundances of the different items + (e.g. sequences in multiple copies).} \item{\dots}{further arguments passed to other methods. Can be used to provide arguments to \code{\link{table.phylo4d}} in \code{plot} method.} } Modified: pkg/man/table.phylo4d.Rd =================================================================== --- pkg/man/table.phylo4d.Rd 2013-05-14 11:48:33 UTC (rev 189) +++ pkg/man/table.phylo4d.Rd 2013-05-14 14:12:05 UTC (rev 190) @@ -12,6 +12,8 @@ from the \code{ape} package. Hence, many of the arguments of \code{\link[ape]{plot.phylo}} can be passed to \code{table.phylo4d}, through the \dots argument, but their names must be complete. + + For large trees, consider using \code{\link{bullseye}}. } \usage{ table.phylo4d(x, treetype=c("phylogram","cladogram"), symbol=c("circles", "squares","colors"), @@ -62,8 +64,11 @@ \item{\dots}{further arguments to be passed to plot methods from \code{ape}. See \code{\link[ape]{plot.phylo}}.} } -\seealso{The \linkS4class{phylo4d} class for storing \code{phylogeny+data}.\cr +\seealso{The \linkS4class{phylo4d} class for storing + \code{phylogeny+data}.\cr + For large trees, consider using \code{\link{bullseye}}. + \code{\link[ape]{plot.phylo}} from the \code{ape} package.\cr An alternative (deprecated) representation is available from From noreply at r-forge.r-project.org Wed May 15 18:43:13 2013 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Wed, 15 May 2013 18:43:13 +0200 (CEST) Subject: [Adephylo-commits] r191 - pkg/R Message-ID: <20130515164313.2DF9118563A@r-forge.r-project.org> Author: jombart Date: 2013-05-15 18:43:12 +0200 (Wed, 15 May 2013) New Revision: 191 Modified: pkg/R/bullseye.R Log: redone a fix I probably did yesterday, and forgot to commit Modified: pkg/R/bullseye.R =================================================================== --- pkg/R/bullseye.R 2013-05-14 14:12:05 UTC (rev 190) +++ pkg/R/bullseye.R 2013-05-15 16:43:12 UTC (rev 191) @@ -31,6 +31,16 @@ } ## col.tips.by + if(!is.null(col.tips.by) && is.data.frame(col.tips.by)){ + old.names <- row.names(col.tips.by) + col.tips.by <- unlist(col.tips.by) + names(col.tips.by) <- old.names + } + if(!is.null(col.tips.by) && is.matrix(col.tips.by)){ + old.names <- rownames(col.tips.by) + col.tips.by <- as.vector(col.tips.by) + names(col.tips.by) <- old.names + } if(!is.null(col.tips.by) && !is.null(names(col.tips.by))){ col.tips.by <- col.tips.by[phy$tip.label] } @@ -43,6 +53,11 @@ ## PLOT THE PHYLOGENY + ## window setting + oxpd <- par("xpd") + par(xpd=TRUE) + on.exit(par(oxpd)) + ## handle color info if(!is.null(col.tips.by)){ tip.col.info <- any2col(col.tips.by, col.pal=col.pal[[1]]) @@ -53,11 +68,6 @@ ## HANDLE THE 'BULLSEYE' ## - ## window setting - oxpd <- par("xpd") - par(xpd=TRUE) - on.exit(par(oxpd)) - ## annot info if(is.null(circ.unit)){ annot.max <- 0.5*diff(par("usr")[1:2]) From noreply at r-forge.r-project.org Thu May 16 15:48:51 2013 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Thu, 16 May 2013 15:48:51 +0200 (CEST) Subject: [Adephylo-commits] r192 - in pkg: R man Message-ID: <20130516134851.A359F185602@r-forge.r-project.org> Author: jombart Date: 2013-05-16 15:48:51 +0200 (Thu, 16 May 2013) New Revision: 192 Added: pkg/man/bullseye.Rd Modified: pkg/R/bullseye.R Log: resolving conflict (?) Modified: pkg/R/bullseye.R =================================================================== --- pkg/R/bullseye.R 2013-05-15 16:43:12 UTC (rev 191) +++ pkg/R/bullseye.R 2013-05-16 13:48:51 UTC (rev 192) @@ -36,11 +36,6 @@ col.tips.by <- unlist(col.tips.by) names(col.tips.by) <- old.names } - if(!is.null(col.tips.by) && is.matrix(col.tips.by)){ - old.names <- rownames(col.tips.by) - col.tips.by <- as.vector(col.tips.by) - names(col.tips.by) <- old.names - } if(!is.null(col.tips.by) && !is.null(names(col.tips.by))){ col.tips.by <- col.tips.by[phy$tip.label] } Added: pkg/man/bullseye.Rd =================================================================== --- pkg/man/bullseye.Rd (rev 0) +++ pkg/man/bullseye.Rd 2013-05-16 13:48:51 UTC (rev 192) @@ -0,0 +1,74 @@ +\name{bullseye} +\alias{bullseye} +\title{Fan-like phylogeny with possible representation of traits on tips} +\description{ + This function represents a phylogeny as a fan, using circles to + provide a legend for distances and optionally colored symbols to + represent traits associated to the tips of the tree. This function + uses and is compatible with ape's \code{\link[ape]{plot.phylo}}. +} +\usage{ +bullseye(phy, traits=NULL, col.tips.by=NULL, col.pal=seasun, + circ.n=6, circ.bg=transp("royalblue",.1), circ.unit=NULL, + legend=TRUE, leg.posi="bottomleft", leg.title="", leg.bg="white", + traits.inset=1.1, traits.space=0.05, traits.pch=19, traits.cex=1, + alpha=1, axis=TRUE,\dots) +} +\arguments{ + \item{phy}{a tree in \code{phylo}, \linkS4class{phylo4} or + \linkS4class{phylo4d} format.} + \item{traits}{an optional data.frame of traits.} + \item{col.tips.by}{an optional vector used to define colors for tip + labels; if unamed, must be ordered in the same order as + \code{phy$tip.label}.} + \item{col.pal}{a function generating colors according to a given + palette; several palettes can be provided as a list, in the case of + several traits; the first palette is always reserved for the tip + colors; this argument is recycled.} + \item{circ.n}{the number of circles for the distance annotations.} + \item{circ.bg}{the color of the circles.} + \item{circ.unit}{the unit of the circles; if NULL, determined + automatically from the data.} + \item{legend}{a logical specifying whether a legend should be + plotted; only one legend is displayed, with priority to tip colors + first, and then to the first trait.} + \item{leg.posi,leg.title,leg.bg}{position, title and background for the legend.} + \item{traits.inset}{inset for positioning the traits; 1 corresponds to + the circle crossing the furthest tip, 0 to the center of the plot.} + \item{traits.space}{a coefficient indicating the spacing between traits.} + \item{traits.pch,traits.cex}{type and size of the symbols used for the + traits; recycled if needed.} + \item{alpha}{alpha value to be used for the color transparency, + between 0 (invisible) and 1 (plain).} + \item{axis}{a logical indicating whether an axis should be displayed.} + \item{\dots}{further arguments to be passed to plot methods from + \code{ape}. See \code{\link[ape]{plot.phylo}}.} +} +\seealso{ + \code{\link{table.phylo4d}} for non-radial plots.\cr + + The \linkS4class{phylo4d} class for storing \code{phylogeny+data}.\cr + + \code{\link[ape]{plot.phylo}} from the \code{ape} package.\cr + + \code{\link[ade4]{dotchart.phylog}}. +} +\author{Thibaut Jombart \email{tjombart at imperial.ac.uk}} +\examples{ + +data(lizards) +tre <- read.tree(text=lizards$hprA) # make a tree + +## basic plots +bullseye(tre) +bullseye(tre, lizards$traits) + +## customized +par(mar=c(6,6,6,6)) +bullseye(tre, lizards$traits, traits.cex=sqrt(1:7), alpha=.7, + legend=FALSE, circ.unit=10, circ.bg=transp("black",.1), + edge.width=2) + +} +\keyword{hplot} +\keyword{multivariate} From noreply at r-forge.r-project.org Mon May 20 18:33:39 2013 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Mon, 20 May 2013 18:33:39 +0200 (CEST) Subject: [Adephylo-commits] r193 - pkg/man Message-ID: <20130520163340.02A53185636@r-forge.r-project.org> Author: jombart Date: 2013-05-20 18:33:39 +0200 (Mon, 20 May 2013) New Revision: 193 Modified: pkg/man/abouheif.Rd pkg/man/adephylo.package.Rd pkg/man/carni19.Rd pkg/man/carni70.Rd pkg/man/dibas.Rd pkg/man/distRoot.Rd pkg/man/distTips.Rd pkg/man/lizards.Rd pkg/man/maples.Rd pkg/man/mjrochet.Rd pkg/man/orthobasis.Rd pkg/man/orthogram.Rd pkg/man/palm.Rd pkg/man/ppca.Rd pkg/man/procella.Rd pkg/man/proxTips.Rd pkg/man/sp.tips.Rd pkg/man/table.phylo4d.Rd pkg/man/tithonia.Rd pkg/man/treePart.Rd pkg/man/ungulates.Rd Log: fixing manpage line length Modified: pkg/man/abouheif.Rd =================================================================== --- pkg/man/abouheif.Rd 2013-05-16 13:48:51 UTC (rev 192) +++ pkg/man/abouheif.Rd 2013-05-20 16:33:39 UTC (rev 193) @@ -12,18 +12,20 @@ proximities as well.\cr Note that the original Abouheif's proximity (Abouheif, 1999; Pavoine - \emph{et al.} 2008) unifies Moran's I and Geary'c tests (Thioulouse \emph{et - al.} 1995).\cr + \emph{et al.} 2008) unifies Moran's I and Geary'c tests (Thioulouse + \emph{et al.} 1995).\cr \code{abouheif.moran} can be used in two ways:\cr - providing a data.frame of traits (\code{x}) and a matrix of - phylogenetic proximities (\code{W})\cr - - providing a \linkS4class{phylo4d} object (\code{x}) and specifying the type of proximity to be - used (\code{method}). + phylogenetic proximities (\code{W})\cr + - providing a \linkS4class{phylo4d} object (\code{x}) and specifying + the type of proximity to be used (\code{method}). } \usage{ -abouheif.moran(x, W=NULL, method=c("oriAbouheif","patristic","nNodes","Abouheif","sumDD"), a=1, nrepet = 999, alter=c("greater", "less", "two-sided")) +abouheif.moran(x, W=NULL, + method=c("oriAbouheif","patristic","nNodes","Abouheif","sumDD"), + a=1, nrepet = 999, alter=c("greater", "less", "two-sided")) } \arguments{ \item{x}{a data frame with continuous variables, or a @@ -56,10 +58,12 @@ } \references{ -Thioulouse, J., Chessel, D. and Champely, S. (1995) Multivariate analysis of spatial patterns: a unified approach to local and global structures. -\emph{Environmental and Ecological Statistics}, \bold{2}, 1--14. +Thioulouse, J., Chessel, D. and Champely, S. (1995) Multivariate +analysis of spatial patterns: a unified approach to local and global +structures. \emph{Environmental and Ecological Statistics}, \bold{2}, 1--14. } -\author{Original code from ade4 (gearymoran function) by S?bastien Ollier\cr +\author{ + Original code from ade4 (gearymoran function) by S?bastien Ollier\cr Adapted and maintained by Thibaut Jombart . } \seealso{ Modified: pkg/man/adephylo.package.Rd =================================================================== --- pkg/man/adephylo.package.Rd 2013-05-16 13:48:51 UTC (rev 192) +++ pkg/man/adephylo.package.Rd 2013-05-20 16:33:39 UTC (rev 193) @@ -60,20 +60,22 @@ Several procedures allow one to measure, and/or test phylogenetic signal in biological traits:\cr - - \code{\link{abouheif.moran}}: performs Abouheif's test, designed to detect phylogenetic - autocorrelation in a quantitative trait. This implementation is not - based on original heuristic procedure, but on the exact formulation - proposed by Pavoine et al. (2008), showing that the test is in fact a - Moran's index test. This implementation further extends the procedure - by allowing any measure of phylogenetic proximity (5 are proposed).\cr + - \code{\link{abouheif.moran}}: performs Abouheif's test, designed to + detect phylogenetic autocorrelation in a quantitative trait. This + implementation is not based on original heuristic procedure, but on + the exact formulation proposed by Pavoine et al. (2008), showing that + the test is in fact a Moran's index test. This implementation further + extends the procedure by allowing any measure of phylogenetic + proximity (5 are proposed).\cr - \code{\link{orthogram}}: performs the orthonormal decomposition of variance of a quantitative variable on an orthonormal basis as in Ollier et al. (2005). It also returns the results of five non parametric tests associated to the variance decomposition.\cr - - \code{\link{moran.idx}}: computes Moran's index of autocorrelation given a - variable and a matrix of proximities among observations (no test).\cr + - \code{\link{moran.idx}}: computes Moran's index of autocorrelation + given a variable and a matrix of proximities among observations (no + test).\cr === MODELLING/INVESTIGATION OF PHYLOGENETIC SIGNAL ===\cr @@ -142,7 +144,8 @@ \author{ Thibaut Jombart \cr with contributions St??phane Dray . \cr - Parts of former code from \code{ade4} by Daniel Chessel and S??bastien Ollier. + Parts of former code from \code{ade4} by Daniel Chessel and S??bastien + Ollier. } \keyword{manip} \keyword{multivariate} Modified: pkg/man/carni19.Rd =================================================================== --- pkg/man/carni19.Rd 2013-05-16 13:48:51 UTC (rev 192) +++ pkg/man/carni19.Rd 2013-05-20 16:33:39 UTC (rev 193) @@ -3,7 +3,9 @@ \docType{data} \title{Phylogeny and quantative trait of carnivora} \description{ -This data set describes the phylogeny of carnivora as reported by Diniz-Filho et al. (1998). It also gives the body mass of these 19 species. +This data set describes the phylogeny of carnivora as reported by +Diniz-Filho et al. (1998). It also gives the body mass of these 19 +species. } \usage{data(carni19)} \format{ @@ -13,8 +15,9 @@ \item{bm}{is a numeric vector which values correspond to the body mass of the 19 species (log scale).} }} \source{ -Diniz-Filho, J. A. F., de Sant'Ana, C.E.R. and Bini, L.M. (1998) -An eigenvector method for estimating phylogenetic inertia. \emph{Evolution}, \bold{52}, 1247--1262. +Diniz-Filho, J. A. F., de Sant'Ana, C.E.R. and Bini, L.M. (1998) An +eigenvector method for estimating phylogenetic +inertia. \emph{Evolution}, \bold{52}, 1247--1262. } \note{ This dataset replaces the former version in ade4. Modified: pkg/man/carni70.Rd =================================================================== --- pkg/man/carni70.Rd 2013-05-16 13:48:51 UTC (rev 192) +++ pkg/man/carni70.Rd 2013-05-20 16:33:39 UTC (rev 193) @@ -4,7 +4,9 @@ \docType{data} \title{Phylogeny and quantitative traits of carnivora} \description{ -This data set describes the phylogeny of 70 carnivora as reported by Diniz-Filho and Torres (2002). It also gives the geographic range size and body size corresponding to these 70 species. +This data set describes the phylogeny of 70 carnivora as reported by +Diniz-Filho and Torres (2002). It also gives the geographic range size +and body size corresponding to these 70 species. } \usage{data(carni70)} \format{ @@ -15,8 +17,10 @@ \item{tab}{is a data frame with 70 species and two traits: size (body size (kg)) ; range (geographic range size (km)).} }} \source{ -Diniz-Filho, J. A. F., and N. M. T?rres. (2002) Phylogenetic comparative methods and the -geographic range size-body size relationship in new world terrestrial carnivora. \emph{Evolutionary Ecology}, \bold{16}, 351--367. +Diniz-Filho, J. A. F., and N. M. T?rres. (2002) Phylogenetic comparative +methods and the geographic range size-body size relationship in new +world terrestrial carnivora. \emph{Evolutionary Ecology}, \bold{16}, +351--367. } \note{ This dataset replaces the former version in ade4. Modified: pkg/man/dibas.Rd =================================================================== --- pkg/man/dibas.Rd 2013-05-16 13:48:51 UTC (rev 192) +++ pkg/man/dibas.Rd 2013-05-20 16:33:39 UTC (rev 193) @@ -58,7 +58,8 @@ ## make a tree tre <- nj(dist(dat$dat)) -plot(tre,type="unr", tip.col=c("blue","red")[as.integer(dat$grp)],main="simulated data - tree") +plot(tre,type="unr", tip.col=c("blue","red")[as.integer(dat$grp)], + main="simulated data - tree") ## use dibas method res <- dibas(tre, dat$grp, metric="nNodes") @@ -70,11 +71,13 @@ #### NON-PARAMETRIC TEST BASED ON MEAN SUCCESSFUL ASSIGNMENT #### ## use dibas method -distHo <- replicate(100, dibas(tre, sample(dat$grp), metric="patristic")$mean.ok) +distHo <- replicate(100, + dibas(tre, sample(dat$grp), metric="patristic")$mean.ok) pval <- mean(res$mean.ok<=c(distHo,res$mean.ok)) pval -hist(c(distHo,res$mean.ok), col="grey", main="Mean successful assignement - permuted values") +hist(c(distHo,res$mean.ok), col="grey", + main="Mean successful assignement - permuted values") abline(v=res$mean.ok, col="red") mtext(side=3, text="Observed value in red") @@ -87,7 +90,8 @@ ## make a tree tre <- nj(dist(dat$dat)) -plot(tre,type="unr", tip.col=c("blue","red")[as.integer(dat$grp)],main="simulated data - tree") +plot(tre,type="unr", tip.col=c("blue","red")[as.integer(dat$grp)], + main="simulated data - tree") mtext(side=3, text="hand-fan syndrome") ## use dibas method @@ -105,7 +109,8 @@ #### MORE COMPLEX DATASET #### if(require(adegenet)){ -dat <- simDatGroups(k=5, p=50, n=c(5,10,10,30,60), mu=sample(1:5, 5, replace=TRUE), sigma=sample(1:5)/2) +dat <- simDatGroups(k=5, p=50, n=c(5,10,10,30,60), mu=sample(1:5, 5, + replace=TRUE), sigma=sample(1:5)/2) names(dat) ## make a tree Modified: pkg/man/distRoot.Rd =================================================================== --- pkg/man/distRoot.Rd 2013-05-16 13:48:51 UTC (rev 192) +++ pkg/man/distRoot.Rd 2013-05-20 16:33:39 UTC (rev 193) @@ -2,8 +2,9 @@ \alias{distRoot} \title{Compute the distance of tips to the root} \description{ - The function \code{distRoot} computes the distance of a set of tips to the - root. Several distances can be used, defaulting to the sum of branch lengths. + The function \code{distRoot} computes the distance of a set of tips to + the root. Several distances can be used, defaulting to the sum of + branch lengths. } \usage{ distRoot(x, tips, method=c("patristic","nNodes","Abouheif","sumDD")) Modified: pkg/man/distTips.Rd =================================================================== --- pkg/man/distTips.Rd 2013-05-16 13:48:51 UTC (rev 192) +++ pkg/man/distTips.Rd 2013-05-20 16:33:39 UTC (rev 193) @@ -77,9 +77,12 @@ ## compare C and pure R code outputs x <- rtree(10) all.equal(as.matrix(distTips(x)), as.matrix(distTips(x, useC=FALSE))) -all.equal(as.matrix(distTips(x, meth="nNode")), as.matrix(distTips(x, meth="nNode", useC=FALSE))) -all.equal(as.matrix(distTips(x, meth="Abou")), as.matrix(distTips(x, meth="Abou", useC=FALSE))) -all.equal(as.matrix(distTips(x, meth="sumDD")), as.matrix(distTips(x, meth="sumDD", useC=FALSE))) +all.equal(as.matrix(distTips(x, meth="nNode")), + as.matrix(distTips(x, meth="nNode", useC=FALSE))) +all.equal(as.matrix(distTips(x, meth="Abou")), + as.matrix(distTips(x, meth="Abou", useC=FALSE))) +all.equal(as.matrix(distTips(x, meth="sumDD")), + as.matrix(distTips(x, meth="sumDD", useC=FALSE))) ## compare speed x <- rtree(50) Modified: pkg/man/lizards.Rd =================================================================== --- pkg/man/lizards.Rd 2013-05-16 13:48:51 UTC (rev 192) +++ pkg/man/lizards.Rd 2013-05-20 16:33:39 UTC (rev 193) @@ -3,13 +3,14 @@ \docType{data} \title{Phylogeny and quantitative traits of lizards} \description{ -This data set describes the phylogeny of 18 lizards as reported by Bauwens and D\'iaz-Uriarte (1997). -It also gives life-history traits corresponding to these 18 species. +This data set describes the phylogeny of 18 lizards as reported by +Bauwens and D\'iaz-Uriarte (1997). It also gives life-history traits +corresponding to these 18 species. } \usage{data(lizards)} \format{ \code{lizards} is a list containing the 3 following objects : -\describe{ +\describe{ \item{traits}{is a data frame with 18 species and 8 traits.} \item{hprA}{is a character string giving the phylogenetic tree (hypothesized phylogenetic relationships based on immunological distances) in Newick format.} \item{hprB}{is a character string giving the phylogenetic tree (hypothesized phylogenetic relationships based on morphological characteristics) in Newick format.} @@ -40,7 +41,8 @@ ## compute and plot principal components if(require(ade4)){ -liz.pca1 <- dudi.pca(lizards$traits, cent=TRUE, scale=TRUE, scannf=FALSE, nf=2) # PCA of traits +liz.pca1 <- dudi.pca(lizards$traits, cent=TRUE, + scale=TRUE, scannf=FALSE, nf=2) # PCA of traits myPC <- phylo4d(liz.tr, liz.pca1$li) # store PC in a phylo4d object varlab <- paste("Principal \ncomponent", 1:2) # make labels for PCs table.phylo4d(myPC, ratio=.8, var.lab=varlab) # plot the PCs Modified: pkg/man/maples.Rd =================================================================== --- pkg/man/maples.Rd 2013-05-16 13:48:51 UTC (rev 192) +++ pkg/man/maples.Rd 2013-05-20 16:33:39 UTC (rev 193) @@ -3,20 +3,24 @@ \docType{data} \title{Phylogeny and quantitative traits of flowers} \description{ -This data set describes the phylogeny of 17 flowers as reported by Ackerly and Donoghue (1998). It also gives 31 traits corresponding to these 17 species. +This data set describes the phylogeny of 17 flowers as reported by +Ackerly and Donoghue (1998). It also gives 31 traits corresponding to +these 17 species. } \usage{data(maples)} \format{ -\code{tithonia} is a list containing the 2 following objects : - - tre: a character string giving the phylogenetic tree in Newick format.\cr - - tab: a data frame with 17 species and 31 traits.\cr + \code{tithonia} is a list containing the 2 following objects : + - tre: a character string giving the phylogenetic tree in Newick + format.\cr + - tab: a data frame with 17 species and 31 traits.\cr } \source{ Data were obtained from the URL \url{http://www.stanford.edu/~dackerly/acerdata.html} (no longer maintained). } \references{ -Ackerly, D. D. and Donoghue, M.J. (1998) Leaf size, sappling allometry, and Corner's rules: phylogeny and correlated evolution in Maples (Acer). +Ackerly, D. D. and Donoghue, M.J. (1998) Leaf size, sappling allometry, +and Corner's rules: phylogeny and correlated evolution in Maples (Acer). \emph{American Naturalist}, \bold{152}, 767--791. } \note{ Modified: pkg/man/mjrochet.Rd =================================================================== --- pkg/man/mjrochet.Rd 2013-05-16 13:48:51 UTC (rev 192) +++ pkg/man/mjrochet.Rd 2013-05-20 16:33:39 UTC (rev 193) @@ -4,7 +4,9 @@ \docType{data} \title{Phylogeny and quantitative traits of teleos fishes} \description{ -This data set describes the phylogeny of 49 teleos fishes as reported by Rochet et al. (2000). It also gives life-history traits corresponding to these 49 species. +This data set describes the phylogeny of 49 teleos fishes as reported by +Rochet et al. (2000). It also gives life-history traits corresponding to +these 49 species. } \usage{data(mjrochet)} \format{ @@ -14,10 +16,11 @@ \item{tab}{is a data frame with 49 rows and 7 traits.} }} \details{ - Variables of \code{mjrochet$tab} are the following ones : tm (age at maturity (years)), - lm (length at maturity (cm)), l05 (length at 5 per cent survival (cm)), - t05 (time to 5 per cent survival (years)), fb (slope of the log-log fecundity-length relationship), - fm (fecundity the year of maturity), egg (volume of eggs (\eqn{mm^{3}}{mm^3})). + Variables of \code{mjrochet$tab} are the following ones : tm (age at + maturity (years)), lm (length at maturity (cm)), l05 (length at 5 per + cent survival (cm)), t05 (time to 5 per cent survival (years)), fb + (slope of the log-log fecundity-length relationship), fm (fecundity the + year of maturity), egg (volume of eggs (\eqn{mm^{3}}{mm^3})). } \source{ Data taken from: \cr @@ -33,9 +36,9 @@ Phylogenetic tree : \url{http://www.ifremer.fr/maerha/life_history.html} } \references{ -Rochet, M. J., Cornillon, P-A., Sabatier, R. and Pontier, D. (2000) -Comparative analysis of phylogenic and fishing effects in life history patterns of teleos fishes. -\emph{O?kos}, \bold{91}, 255--270. +Rochet, M. J., Cornillon, P-A., Sabatier, R. and Pontier, D. (2000) +Comparative analysis of phylogenic and fishing effects in life history +patterns of teleos fishes. \emph{O?kos}, \bold{91}, 255--270. } \note{ This dataset replaces the former version in ade4. Modified: pkg/man/orthobasis.Rd =================================================================== --- pkg/man/orthobasis.Rd 2013-05-16 13:48:51 UTC (rev 192) +++ pkg/man/orthobasis.Rd 2013-05-20 16:33:39 UTC (rev 193) @@ -21,8 +21,10 @@ \code{\link{proxTips}}. } \usage{ -me.phylo(x=NULL, prox=NULL, method=c("patristic","nNodes","oriAbouheif","Abouheif","sumDD"), a=1) -orthobasis.phylo(x=NULL, prox=NULL, method=c("patristic","nNodes","oriAbouheif","Abouheif","sumDD"), a=1) +me.phylo(x=NULL, prox=NULL, method=c("patristic","nNodes", + "oriAbouheif","Abouheif","sumDD"), a=1) +orthobasis.phylo(x=NULL, prox=NULL, method=c("patristic","nNodes", + "oriAbouheif","Abouheif","sumDD"), a=1) } \arguments{ \item{x}{A tree of class \code{\link[ape:read.tree]{phylo}}, @@ -96,7 +98,7 @@ myME <- me.phylo(tre, method="Abou") lm2 <- lm(neonatw ~ myME[,1] + afbw) # use for ME as covariable resid2 <- residuals(lm2) -orthogram(resid2, tre) # there is no longer phylogenetic autocorrelation +orthogram(resid2, tre) # there is no longer phylogenetic autocorrelation ## see the difference table.phylo4d(phylo4d(tre, cbind.data.frame(resid1, resid2))) Modified: pkg/man/orthogram.Rd =================================================================== --- pkg/man/orthogram.Rd 2013-05-16 13:48:51 UTC (rev 192) +++ pkg/man/orthogram.Rd 2013-05-20 16:33:39 UTC (rev 193) @@ -3,10 +3,12 @@ \alias{orthogram} \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, pattern in one quantitative trait. This implementation -replace the (deprecated) version from the \code{ade4} package.\cr +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, 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 @@ -43,23 +45,47 @@ must be one of "greater" (default), "less" or "two-sided"} } \details{ -The function computes the variance decomposition of a quantitative vector x on an orthonormal basis B. The variable is normalized given the uniform weight to eliminate problem of scales. -It plots the squared correlations \eqn{R^{2}}{R^2} between x and vectors of B (variance decomposition) and the cumulated squared correlations \eqn{SR^{2}}{SR^2} (cumulative decomposition). -The function also provides five non parametric tests to test the existence of autocorrelation. The tests derive from the five following statistics : - - R2Max=\eqn{\max(R^{2})}{max(R^2)}. It takes high value when a high part of the variability is explained by one score.\cr - - SkR2k=\eqn{\sum_{i=1}^{n-1}(iR^{2}_i)}{sum_i^(n-1) i*(R^2)_i}. It compares the part of variance explained by internal nodes to the one explained by end nodes.\cr - - Dmax=\eqn{\max_{m=1,...,n-1}(\sum_{j=1}^{m}R^{2}_j - \frac{m}{n-1})}{max_(m=1,...,n-1)(sum_(j=1)^m(R^2_j) - (m/n-1))}. It examines the accumulation of variance for a sequence of scores.\cr - - SCE=\eqn{\sum_{m=1}^{n-1} (\sum_{j=1}^{m}R^{2}_j - \frac{m}{n-1})^{2}}{sum_(m=1)^(n-1)(sum_(j=1)^m(R^2_j) - (m/n-1))^2}. It examines also the accumulation of variance for a sequence of scores.\cr - - ratio: depends of the parameter posinega. If posinega > 0, the statistic ratio exists and equals \eqn{\sum_{i=1}^{posinega}R^{2}_i}{sum_i (R^2)_i with i < posinega + 1}. It compares the part of variance explained by internal nodes to the one explained by end nodes when we can define how many vectors correspond to internal nodes. +The function computes the variance decomposition of a quantitative +vector x on an orthonormal basis B. The variable is normalized given the +uniform weight to eliminate problem of scales. It plots the squared +correlations \eqn{R^{2}}{R^2} between x and vectors of B (variance +decomposition) and the cumulated squared correlations \eqn{SR^{2}}{SR^2} +(cumulative decomposition). The function also provides five non +parametric tests to test the existence of autocorrelation. The tests +derive from the five following statistics : + + - R2Max=\eqn{\max(R^{2})}{max(R^2)}. It takes high value when a high + part of the variability is explained by one score.\cr + - SkR2k=\eqn{\sum_{i=1}^{n-1}(iR^{2}_i)}{sum_i^(n-1) i*(R^2)_i}. It + compares the part of variance explained by internal nodes to the + one explained by end nodes.\cr + - Dmax=\eqn{\max_{m=1,...,n-1}(\sum_{j=1}^{m}R^{2}_j - + \frac{m}{n-1})}{max_(m=1,...,n-1)(sum_(j=1)^m(R^2_j) - + (m/n-1))}. It examines the accumulation of variance for a sequence + of scores.\cr + - SCE=\eqn{\sum_{m=1}^{n-1} (\sum_{j=1}^{m}R^{2}_j - + \frac{m}{n-1})^{2}}{sum_(m=1)^(n-1)(sum_(j=1)^m(R^2_j) - + (m/n-1))^2}. It examines also the accumulation of variance for a + sequence of scores.\cr + - ratio: depends of the parameter posinega. If posinega > 0, the + statistic ratio exists and equals + \eqn{\sum_{i=1}^{posinega}R^{2}_i}{sum_i (R^2)_i with i < posinega + + 1}. It compares the part of variance explained by internal nodes + to the one explained by end nodes when we can define how many + vectors correspond to internal nodes. } \value{ -If (high.scores = 0), returns an object of class \code{'krandtest'} (randomization tests) corresponding to the five non parametric tests. \cr \cr -If (high.scores > 0), returns a list containg : +If (high.scores = 0), returns an object of class \code{'krandtest'} +(randomization tests) corresponding to the five non parametric +tests. \cr \cr +If (high.scores > 0), returns a list containg : \item{w}{: an object of class \code{'krandtest'} (randomization tests)} \item{scores.order}{: a vector which terms give labels of vectors that explain the larger part of variance} } \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. +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. } \author{ Original code: S?bastien Ollier and Daniel Chessel.\cr Modified: pkg/man/palm.Rd =================================================================== --- pkg/man/palm.Rd 2013-05-16 13:48:51 UTC (rev 192) +++ pkg/man/palm.Rd 2013-05-20 16:33:39 UTC (rev 193) @@ -4,7 +4,8 @@ \docType{data} \title{Phylogenetic and quantitative traits of amazonian palm trees} \description{ -This data set describes the phylogeny of 66 amazonian palm trees. It also gives 7 traits corresponding to these 66 species. +This data set describes the phylogeny of 66 amazonian palm trees. It +also gives 7 traits corresponding to these 66 species. } \usage{data(palm)} \format{ @@ -17,7 +18,9 @@ Variables of \code{palm$traits} are the following ones: \cr - rord: specific richness with five ordered levels\cr - h: height in meter (squared transform)\cr -- dqual: diameter at breast height in centimeter with five levels \code{sout : subterranean}, \code{ d1(0, 5 cm)}, \code{ d2(5, 15 cm)}, \code{ d3(15, 30 cm)} and \code{ d4(30, 100 cm)}\cr +- dqual: diameter at breast height in centimeter with five levels + \code{sout : subterranean}, \code{ d1(0, 5 cm)}, \code{ d2(5, 15 cm)}, + \code{ d3(15, 30 cm)} and \code{ d4(30, 100 cm)}\cr - vfruit: fruit volume in \eqn{mm^{3}}{mm^3} (logged transform)\cr - vgrain: seed volume in \eqn{mm^{3}}{mm^3} (logged transform)\cr - aire: spatial distribution area (\eqn{km^{2}}{km^2})\cr Modified: pkg/man/ppca.Rd =================================================================== --- pkg/man/ppca.Rd 2013-05-16 13:48:51 UTC (rev 192) +++ pkg/man/ppca.Rd 2013-05-20 16:33:39 UTC (rev 193) @@ -7,7 +7,8 @@ \alias{screeplot.ppca} \alias{plot.ppca} \title{Phylogenetic principal component analysis} -\description{These functions are designed to perform a phylogenetic principal +\description{ + These functions are designed to perform a phylogenetic principal component analysis (pPCA, Jombart et al. 2010) and to display the results. @@ -138,7 +139,8 @@ liz.tre <- read.tree(tex=lizards$hprA) liz.4d <- phylo4d(liz.tre, lizards$traits) par(mar=rep(.1,4)) -table.phylo4d(liz.4d,var.lab=c(names(lizards$traits),"ACP 1\n(\"size effect\")"),show.node=FALSE, cex.lab=1.2) +table.phylo4d(liz.4d,var.lab=c(names(lizards$traits), + "ACP 1\n(\"size effect\")"),show.node=FALSE, cex.lab=1.2) ## REMOVE DUPLICATED POPULATIONS @@ -147,7 +149,8 @@ ## CORRECT LABELS -lab <- c("Pa", "Ph", "Ll", "Lmca", "Lmcy", "Phha", "Pha", "Pb", "Pm", "Ae", "Tt", "Ts", "Lviv", "La", "Ls", "Lvir") +lab <- c("Pa", "Ph", "Ll", "Lmca", "Lmcy", "Phha", "Pha", + "Pb", "Pm", "Ae", "Tt", "Ts", "Lviv", "La", "Ls", "Lvir") tipLabels(liz.4d) <- lab @@ -187,7 +190,8 @@ ## FIGURE 1 par(mar=c(.1,2.4,2.1,1)) -table.phylo4d(obj.ppca, ratio=.7, var.lab=c("1st global PC", "1st local PC"), tip.label=myLab, box=FALSE,cex.lab=1.4, cex.sym=1.2, show.node.label=TRUE) +table.phylo4d(obj.ppca, ratio=.7, var.lab=c("1st global PC", "1st local + PC"), tip.label=myLab,box=FALSE,cex.lab=1.4, cex.sym=1.2, show.node.label=TRUE) add.scatter.eig(liz.ppca$eig,1,1,1,csub=1.2, posi="topleft", ratio=.23) Modified: pkg/man/procella.Rd =================================================================== --- pkg/man/procella.Rd 2013-05-16 13:48:51 UTC (rev 192) +++ pkg/man/procella.Rd 2013-05-20 16:33:39 UTC (rev 193) @@ -3,7 +3,8 @@ \docType{data} \title{Phylogeny and quantitative traits of birds} \description{ -This data set describes the phylogeny of 19 birds as reported by Bried et al. (2002). It also gives 6 traits corresponding to these 19 species. +This data set describes the phylogeny of 19 birds as reported by Bried +et al. (2002). It also gives 6 traits corresponding to these 19 species. } \usage{data(procella)} \format{ @@ -22,10 +23,12 @@ - col.size: an integer vector that describes the colony size (no nests monitored) } \references{ -Bried, J., Pontier, D. and Jouventin, P. (2002) Mate fidelity in monogamus birds: a re-examination of the Procellariiformes. +Bried, J., Pontier, D. and Jouventin, P. (2002) Mate fidelity in +monogamus birds: a re-examination of the Procellariiformes. \emph{Animal Behaviour}, \bold{65}, 235--246. -See a data description at \url{http://pbil.univ-lyon1.fr/R/pps/pps037.pdf} (in French). +See a data description at +\url{http://pbil.univ-lyon1.fr/R/pps/pps037.pdf} (in French). } \note{ This dataset replaces the former version in ade4. Modified: pkg/man/proxTips.Rd =================================================================== --- pkg/man/proxTips.Rd 2013-05-16 13:48:51 UTC (rev 192) +++ pkg/man/proxTips.Rd 2013-05-20 16:33:39 UTC (rev 193) @@ -94,9 +94,10 @@ \code{sumDD} refers to a phylogenetic proximity quite similar to that of Abouheif. We consider the same sets P and DDP. But instead of - taking the inverse of the product of all terms in DDP, this proximity computes the - inverse of the sum of all terms in DDP. This matrix was denoted 'M' in - Pavoine \emph{et al.} (2008), who reported that it is related to May's index (May, 1990). + taking the inverse of the product of all terms in DDP, this proximity + computes the inverse of the sum of all terms in DDP. This matrix was + denoted 'M' in Pavoine \emph{et al.} (2008), who reported that it is + related to May's index (May, 1990). } \author{ Thibaut Jombart \email{tjombart at imperial.ac.uk} } \seealso{\code{\link{distTips}} which computes several phylogenetic Modified: pkg/man/sp.tips.Rd =================================================================== --- pkg/man/sp.tips.Rd 2013-05-16 13:48:51 UTC (rev 192) +++ pkg/man/sp.tips.Rd 2013-05-20 16:33:39 UTC (rev 193) @@ -3,9 +3,9 @@ \title{Find the shortest path between tips of a tree} \description{ The function \code{sp.tips} finds the shortest path between tips of a - tree, identified as \code{tip1} and \code{tip2}. - This function applies to trees with the class \code{\link[ape:read.tree]{phylo}}, \linkS4class{phylo4} or - \linkS4class{phylo4d}. Several tips can be provided at a time. + tree, identified as \code{tip1} and \code{tip2}. This function + applies to trees with the class \code{\link[ape:read.tree]{phylo}}, + \linkS4class{phylo4} or \linkS4class{phylo4d}. Several tips can be provided at a time. } \usage{ sp.tips(x, tip1, tip2, useTipNames=FALSE, quiet=FALSE, include.mrca=TRUE) Modified: pkg/man/table.phylo4d.Rd =================================================================== --- pkg/man/table.phylo4d.Rd 2013-05-16 13:48:51 UTC (rev 192) +++ pkg/man/table.phylo4d.Rd 2013-05-20 16:33:39 UTC (rev 193) @@ -2,27 +2,31 @@ \alias{table.phylo4d} \title{Graphical display of phylogeny and traits} \description{ - This function represents traits onto the tips of - a phylogeny. Plotted objects must be valid \linkS4class{phylo4d} - objects (implemented by the \code{phylobase} package). Current version - allows plotting of a tree and one or more quantitative traits - (possibly containing missing data, represented by an 'x').\cr + This function represents traits onto the tips of a phylogeny. Plotted + objects must be valid \linkS4class{phylo4d} objects (implemented by + the \code{phylobase} package). Current version allows plotting of a + tree and one or more quantitative traits (possibly containing missing + data, represented by an 'x').\cr - The plot of phylogenies is performed by a call to \code{\link[ape]{plot.phylo}} - from the \code{ape} package. Hence, many of the arguments of - \code{\link[ape]{plot.phylo}} can be passed to \code{table.phylo4d}, - through the \dots argument, but their names must be complete. + The plot of phylogenies is performed by a call to + \code{\link[ape]{plot.phylo}} from the \code{ape} package. Hence, many + of the arguments of \code{\link[ape]{plot.phylo}} can be passed to + \code{table.phylo4d}, through the \dots argument, but their names must + be complete. For large trees, consider using \code{\link{bullseye}}. } \usage{ -table.phylo4d(x, treetype=c("phylogram","cladogram"), symbol=c("circles", "squares","colors"), - repVar=1:ncol(tdata(x, type="tip")), center=TRUE, scale=TRUE, legend=TRUE, grid=TRUE, box=TRUE, - show.tip.label=TRUE, show.node.label=TRUE, show.var.label=TRUE, - ratio.tree=1/3, font=3, - tip.label=tipLabels(x), var.label=colnames(tdata(x,type="tip")), - cex.symbol=1, cex.label=1, cex.legend=1, pch=20, col=heat.colors(100), - coord.legend=NULL, \dots) +table.phylo4d(x, treetype=c("phylogram","cladogram"), + symbol=c("circles", "squares","colors"), + repVar=1:ncol(tdata(x, type="tip")), center=TRUE, + scale=TRUE, legend=TRUE, grid=TRUE, box=TRUE, + show.tip.label=TRUE, show.node.label=TRUE, + show.var.label=TRUE, ratio.tree=1/3, font=3, + tip.label=tipLabels(x), + var.label=colnames(tdata(x,type="tip")), cex.symbol=1, + cex.label=1, cex.legend=1, pch=20, col=heat.colors(100), + coord.legend=NULL, \dots) } \arguments{ \item{x}{a \linkS4class{phylo4d} object} Modified: pkg/man/tithonia.Rd =================================================================== --- pkg/man/tithonia.Rd 2013-05-16 13:48:51 UTC (rev 192) +++ pkg/man/tithonia.Rd 2013-05-20 16:33:39 UTC (rev 193) @@ -3,7 +3,9 @@ \docType{data} \title{Phylogeny and quantitative traits of flowers} \description{ -This data set describes the phylogeny of 11 flowers as reported by Morales (2000). It also gives morphologic and demographic traits corresponding to these 11 species. +This data set describes the phylogeny of 11 flowers as reported by +Morales (2000). It also gives morphologic and demographic traits +corresponding to these 11 species. } \usage{data(tithonia)} \format{ Modified: pkg/man/treePart.Rd =================================================================== --- pkg/man/treePart.Rd 2013-05-16 13:48:51 UTC (rev 192) +++ pkg/man/treePart.Rd 2013-05-20 16:33:39 UTC (rev 193) @@ -27,7 +27,9 @@ } \author{ Thibaut Jombart \email{tjombart at imperial.ac.uk} } \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. +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{ @@ -62,7 +64,8 @@ ung.orthobas <- treePart(ung, res="orthobasis") ## comparison of the first 3 vectors [TRUNCATED] To get the complete diff run: svnlook diff /svnroot/adephylo -r 193