[Picante-commits] r175 - tags tags/0.5-3 tags/0.5-3/R tags/0.5-3/man www

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Jan 28 01:54:41 CET 2009


Author: skembel
Date: 2009-01-28 01:54:40 +0100 (Wed, 28 Jan 2009)
New Revision: 175

Added:
   tags/0.5-3/
   tags/0.5-3/DESCRIPTION
   tags/0.5-3/R/phylosor.R
   tags/0.5-3/R/species.dist.R
   tags/0.5-3/man/comm.phylo.cor.Rd
   tags/0.5-3/man/cor.table.Rd
   tags/0.5-3/man/evolve.brownian.Rd
   tags/0.5-3/man/matrix2sample.Rd
   tags/0.5-3/man/mnnd.Rd
   tags/0.5-3/man/mpd.Rd
   tags/0.5-3/man/multiPhylosignal.Rd
   tags/0.5-3/man/phylosignal.Rd
   tags/0.5-3/man/phylosor.Rd
   tags/0.5-3/man/phylosor.rnd.Rd
   tags/0.5-3/man/picante-package.Rd
   tags/0.5-3/man/pruning.Rd
   tags/0.5-3/man/randomizeSample.Rd
   tags/0.5-3/man/readsample.Rd
   tags/0.5-3/man/sample2matrix.Rd
   tags/0.5-3/man/ses.mnnd.Rd
   tags/0.5-3/man/ses.mpd.Rd
   tags/0.5-3/man/species.dist.Rd
   tags/0.5-3/man/utility.Rd
   tags/0.5-3/man/writesample.Rd
   tags/0.5-3/man/writetraits.Rd
Removed:
   tags/0.5-3/DESCRIPTION
   tags/0.5-3/R/species.dist.R
   tags/0.5-3/man/comm.phylo.cor.Rd
   tags/0.5-3/man/cor.table.Rd
   tags/0.5-3/man/evolve.brownian.Rd
   tags/0.5-3/man/matrix2sample.Rd
   tags/0.5-3/man/mnnd.Rd
   tags/0.5-3/man/mpd.Rd
   tags/0.5-3/man/multiPhylosignal.Rd
   tags/0.5-3/man/phylosignal.Rd
   tags/0.5-3/man/picante-package.Rd
   tags/0.5-3/man/pruning.Rd
   tags/0.5-3/man/randomizeSample.Rd
   tags/0.5-3/man/readsample.Rd
   tags/0.5-3/man/sample2matrix.Rd
   tags/0.5-3/man/ses.mnnd.Rd
   tags/0.5-3/man/ses.mpd.Rd
   tags/0.5-3/man/species.dist.Rd
   tags/0.5-3/man/utility.Rd
   tags/0.5-3/man/writesample.Rd
   tags/0.5-3/man/writetraits.Rd
Modified:
   www/index.php
Log:
Update webpage and tag version 0.5-3 for release

Copied: tags/0.5-3 (from rev 168, pkg)

Deleted: tags/0.5-3/DESCRIPTION
===================================================================
--- pkg/DESCRIPTION	2008-11-06 18:29:44 UTC (rev 168)
+++ tags/0.5-3/DESCRIPTION	2009-01-28 00:54:40 UTC (rev 175)
@@ -1,11 +0,0 @@
-Package: picante
-Type: Package
-Title: Tools for integrating phylogenies and ecology
-Version: 0.4-0
-Date: 2008-8-22
-Author: Steve Kembel <skembel at berkeley.edu>, David Ackerly <dackerly at berkeley.edu>, Simon Blomberg <s.blomberg1 at uq.edu.au>, Peter Cowan <pdc at berkeley.edu>, Matthew Helmus <mrhelmus at wisc.edu>, Cam Webb <cwebb at oeb.harvard.edu>
-Maintainer: Steve Kembel <skembel at berkeley.edu>
-Depends: ape, vegan
-Suggests: brglm, circular
-Description: Phylocom integration, community analyses, null-models, traits and evolution in R
-License: GPL-2

Copied: tags/0.5-3/DESCRIPTION (from rev 174, pkg/DESCRIPTION)
===================================================================
--- tags/0.5-3/DESCRIPTION	                        (rev 0)
+++ tags/0.5-3/DESCRIPTION	2009-01-28 00:54:40 UTC (rev 175)
@@ -0,0 +1,11 @@
+Package: picante
+Type: Package
+Title: R tools for integrating phylogenies and ecology
+Version: 0.5-3
+Date: 2009-1-27
+Author: Steven Kembel <skembel at uoregon.edu>, David Ackerly <dackerly at berkeley.edu>, Simon Blomberg <s.blomberg1 at uq.edu.au>, Peter Cowan <pdc at berkeley.edu>, Matthew Helmus <mrhelmus at wisc.edu>, Helene Morlon  <morlon.helene at gmail.com>, Campbell Webb <cwebb at oeb.harvard.edu>
+Maintainer: Steven Kembel <skembel at uoregon.edu>
+Depends: ape, vegan, nlme
+Suggests: brglm, circular
+Description: Phylocom integration, community analyses, null-models, traits and evolution in R
+License: GPL-2

Copied: tags/0.5-3/R/phylosor.R (from rev 174, pkg/R/phylosor.R)
===================================================================
--- tags/0.5-3/R/phylosor.R	                        (rev 0)
+++ tags/0.5-3/R/phylosor.R	2009-01-28 00:54:40 UTC (rev 175)
@@ -0,0 +1,114 @@
+phylosor=function(samp,tree)
+{
+	s=nrow(samp)
+	phylodist=matrix(NA,s,s)
+	rownames(phylodist)=rownames(samp)
+	colnames(phylodist)=rownames(samp)
+	
+	for (l in 1:(s-1))
+	{
+		pdl=.pdshort(samp[l,],tree)
+		for (k in (l+1):s)
+		{
+			pdk=.pdshort(samp[k,],tree)
+			pdtot=.pdshort((samp[l,]+samp[k,]),tree)
+			pdsharedlk=pdl+pdk-pdtot
+			phylodist[k,l]=2*pdsharedlk/(pdl+pdk)
+			}
+			}
+			return(as.dist(phylodist))
+}			
+phylosor.rnd=function(samp,tree,cstSor=TRUE,null.model=c("taxa.labels","frequency","richness","independentswap","trialswap"),runs=999,iterations=1000)
+
+{
+	
+	Res=list()
+			
+	if (cstSor==TRUE)
+	{
+		if (null.model=="taxa.labels")
+		{
+			for (r in 1:runs)
+			{
+				Res<-c(Res,list(.phylosor.taxaShuffle(samp,tree)))}
+			}
+			
+			else if (null.model=="richness")
+			{
+				for (r in 1:runs)
+				{Res<-c(Res,list(.phylosor.richness(samp,tree)))}
+				}
+				
+				else stop("This null model does not maintain Sorensen similarity: use cstSor=FALSE, or choose an other null model")
+				}
+	
+	else
+	{
+		if (null.model=="taxa.labels") 
+		{
+			warning("This null model maintains Sorensen similarity")
+			for (r in 1:runs)
+			{
+				Res<-c(Res,list(.phylosor.taxaShuffle(samp,tree)))
+			}
+			}
+			
+			else
+			for (r in 1:runs)
+			{
+				Res<-c(Res,list(phylosor(randomizeSample(samp, null.model),tree)))
+			}
+			}
+
+return(Res)
+}
+	
+
+##########################################################################################
+.phylosor.taxaShuffle=function(samp,tree)
+	{
+		sampr=samp
+		colnames(sampr)=sample(colnames(samp))
+		return(phylosor(sampr,tree))
+		}
+
+##########################################################################################
+.phylosor.richness=function(samp,tree)
+{
+	s=nrow(samp)
+	phylodist=matrix(NA,s,s)
+	rownames(phylodist)=rownames(samp)
+	colnames(phylodist)=rownames(samp)
+	
+	for (l in 1:(s-1))
+	{
+		for (k in (l+1):s)
+		{
+			sampr=samp
+			colnames(sampr)=sample(colnames(samp))
+			pdl=.pdshort(sampr[l,],tree)
+			pdk=.pdshort(sampr[k,],tree)
+			pdtot=.pdshort((sampr[l,]+sampr[k,]),tree)
+			pdsharedlk=pdl+pdk-pdtot
+			phylodist[k,l]=2*pdsharedlk/(pdl+pdk)
+			}
+			}
+			return(as.dist(phylodist))
+}			
+
+#############################################################################################		
+	
+.pdshort=function(comm,tree)
+{
+
+	nbspecies=length(comm)
+	species = names(comm)
+	index = species[comm == 0]
+        if (length(index) >= (nbspecies - 1)) 
+        {PD <- NA}
+        else {
+            sub.tree <- drop.tip(tree, index)
+            PD <- sum(sub.tree$edge.length)}
+            return(PD)}
+
+

Deleted: tags/0.5-3/R/species.dist.R
===================================================================
--- pkg/R/species.dist.R	2008-11-06 18:29:44 UTC (rev 168)
+++ tags/0.5-3/R/species.dist.R	2009-01-28 00:54:40 UTC (rev 175)
@@ -1,44 +0,0 @@
-`species.dist` <-
-function (x, metric=c("cij","jaccard","checkerboard","roij")) {
-	metric <- match.arg(metric)
-    if (identical(metric,"checkerboard")) {
-        #Gotelli 2000: Checker = Sum (Si - Q)(Sk - Q) / ((R*(R-1))/2)
-        #where Si = total for row(species) i, R = num rows(spp), Q = num sites where both spp present
-        x <- decostand(x,method="pa")
-        Nsites <- dim(x)[1]
-        S <- apply(x,2,sum)
-        R <- length(S)
-        Checker.ij <- matrix(nrow=R,ncol=R,dimnames=list(colnames(x),colnames(x)))
-        for (i in 1:R) {
-            for (j in 1:R) {
-                Q <- sum(x[,i]*x[,j])
-                Checker.ij[i,j] <- ((S[i] - Q)*(S[j] - Q)) / ((R*(R-1))/2)
-            }
-        }
-        return(as.dist(Checker.ij))
-    }
-    if (identical(metric,"cij")) {
-        #Schoener index of co-occurrence
-        x <- decostand(x,method="total",MARGIN=2)
-        return(1 - (0.5 * dist(t(x),method="manhattan")))
-    }    
-    if (identical(metric,"jaccard")) {    
-        return( 1 - vegdist(t(sortColumns(x)), method = "jaccard"))
-    }
-    if (identical(metric,"roij")) {
-        #Hardy's standardized version of checkerboard
-        #roij = (Pij - Pi*Pj)/(Pi*Pj)
-        x <- as.matrix(decostand(x,method="pa"))
-        Nsites <- dim(x)[1]
-        P <- apply(x,2,sum) / Nsites
-        N <- length(P)
-        roij <- matrix(nrow=N,ncol=N,dimnames=list(colnames(x),colnames(x)))
-        for (i in 1:N-1) {
-            for (j in (i+1):N) {
-                Pij <- sum(x[,i]*x[,j])/Nsites
-                roij[i,j] <- ((Pij - (P[i]*P[j]))/(P[i]*P[j]))
-            }
-        }
-        return(as.dist(t(roij)))
-    }
-}

Copied: tags/0.5-3/R/species.dist.R (from rev 171, pkg/R/species.dist.R)
===================================================================
--- tags/0.5-3/R/species.dist.R	                        (rev 0)
+++ tags/0.5-3/R/species.dist.R	2009-01-28 00:54:40 UTC (rev 175)
@@ -0,0 +1,44 @@
+`species.dist` <-
+function (x, metric=c("cij","jaccard","checkerboard","doij")) {
+	metric <- match.arg(metric)
+    if (identical(metric,"checkerboard")) {
+        #Gotelli 2000: Checker = Sum (Si - Q)(Sk - Q) / ((R*(R-1))/2)
+        #where Si = total for row(species) i, R = num rows(spp), Q = num sites where both spp present
+        x <- decostand(x,method="pa")
+        Nsites <- dim(x)[1]
+        S <- apply(x,2,sum)
+        R <- length(S)
+        Checker.ij <- matrix(nrow=R,ncol=R,dimnames=list(colnames(x),colnames(x)))
+        for (i in 1:R) {
+            for (j in 1:R) {
+                Q <- sum(x[,i]*x[,j])
+                Checker.ij[i,j] <- ((S[i] - Q)*(S[j] - Q)) / ((R*(R-1))/2)
+            }
+        }
+        return(as.dist(Checker.ij))
+    }
+    if (identical(metric,"cij")) {
+        #Schoener index of co-occurrence
+        x <- decostand(x,method="total",MARGIN=2)
+        return(1 - (0.5 * dist(t(x),method="manhattan")))
+    }    
+    if (identical(metric,"jaccard")) {    
+        return( 1 - vegdist(t(sortColumns(x)), method = "jaccard"))
+    }
+    if (identical(metric,"doij")) {
+        #Hardy's standardized version of checkerboard
+        #doij = (Pij - Pi*Pj)/(Pi*Pj)
+        x <- as.matrix(decostand(x,method="pa"))
+        Nsites <- dim(x)[1]
+        P <- apply(x,2,sum) / Nsites
+        N <- length(P)
+        roij <- matrix(nrow=N,ncol=N,dimnames=list(colnames(x),colnames(x)))
+        for (i in 1:N-1) {
+            for (j in (i+1):N) {
+                Pij <- sum(x[,i]*x[,j])/Nsites
+                roij[i,j] <- ((Pij - (P[i]*P[j]))/(P[i]*P[j]))
+            }
+        }
+        return(as.dist(t(roij)))
+    }
+}

Deleted: tags/0.5-3/man/comm.phylo.cor.Rd
===================================================================
--- pkg/man/comm.phylo.cor.Rd	2008-11-06 18:29:44 UTC (rev 168)
+++ tags/0.5-3/man/comm.phylo.cor.Rd	2009-01-28 00:54:40 UTC (rev 175)
@@ -1,43 +0,0 @@
-\name{comm.phylo.cor}
-\alias{comm.phylo.cor}
-
-\title{ Correlations between species co-occurrence and phylogenetic distances }
-\description{
-  Calculates measures of community phylogenetic structure (correlation between co-occurrence and phylogenetic distance) to patterns expected under various null models
-}
-\usage{
-comm.phylo.cor(samp, phylo, metric = c("cij", "checkerboard", "jaccard", "roij"),
-    null.model = c("sample.taxa.labels", "pool.taxa.labels",
-        "frequency", "richness", "independentswap","trialswap"), runs = 999, ...)
-}
-\arguments{
-  \item{samp}{ Community data matrix }
-  \item{phylo}{ Phylogenetic tree }
-  \item{metric}{ Metric of co-occurrence to use (see \code{\link{species.dist}})}
-  \item{null.model}{ Null model to use:
-        \item{sample.taxa.labels}{Shuffle phylogeny tip labels (only within set of taxa present in community data)}
-        \item{pool.taxa.labels}{Shuffle phylogeny tip labels (across all taxa included in phylogenetic tree)}
-        \item{frequency}{Randomize community data matrix abundances within species (maintains species occurence frequency)}
-        \item{richness}{Randomize community data matrix abundances within samples (maintains sample species richness)}
-        \item{independentswap}{Randomize community data matrix maintaining species occurrence frequency and site richnessing using independent swap}
-        \item{trialswap}{Randomize community data matrix maintaining species occurrence frequency and site richnessing using trial swap}     
-  }
-  \item{runs}{ Number of runs (randomizations) }
-  \item{...}{ Additional arguments to \link{randomizeSample}}
-}
-\value{
-    A list with elements:
-    \item{obs.corr }{ Observed co-occurrence/phylogenetic distance correlation}
-    \item{obs.corr.p}{ P-value of observed correlation (standard P-value for correlation coefficient, not based on comparison with randomizations)}
-    \item{obs.rank}{ Rank of observed correlation vs. random}
-    \item{runs}{ Number of runs (randomizations) }
-    \item{obs.rand.p}{ P-value of observed correlation vs. randomizations (= obs.rank / (runs + 1))}
-    \item{random.corrs}{A vector of random correlation calculated for each run}
-}
-\references{ Cavender-Bares J., D.A. Ackerly, D. Baum and F.A. Bazzaz. 2004. Phylogenetic overdispersion in Floridian oak communities, American Naturalist, 163(6):823-843. }
-\author{ Steve Kembel <skembel at berkeley.edu> }
-\seealso{ \code{\link{randomizeSample}} }
-\examples{
-data(phylocom)
-comm.phylo.cor(phylocom$sample, phylocom$phylo, metric="cij",null.model="sample.taxa.labels")}
-\keyword{univar}

Copied: tags/0.5-3/man/comm.phylo.cor.Rd (from rev 171, pkg/man/comm.phylo.cor.Rd)
===================================================================
--- tags/0.5-3/man/comm.phylo.cor.Rd	                        (rev 0)
+++ tags/0.5-3/man/comm.phylo.cor.Rd	2009-01-28 00:54:40 UTC (rev 175)
@@ -0,0 +1,47 @@
+\name{comm.phylo.cor}
+\alias{comm.phylo.cor}
+
+\title{ Correlations between species co-occurrence and phylogenetic distances }
+\description{
+  Calculates measures of community phylogenetic structure (correlation between co-occurrence and phylogenetic distance) to patterns expected under various null models
+}
+\usage{
+comm.phylo.cor(samp, phylo, metric = c("cij", "checkerboard", "jaccard", "roij"),
+    null.model = c("sample.taxa.labels", "pool.taxa.labels",
+        "frequency", "richness", "independentswap","trialswap"), runs = 999, ...)
+}
+\arguments{
+  \item{samp}{ Community data matrix }
+  \item{phylo}{ Phylogenetic tree }
+  \item{metric}{ Metric of co-occurrence to use (see \code{\link{species.dist}})}
+  \item{null.model}{ Null model to use (see Details section for description) }
+  \item{runs}{ Number of runs (randomizations) }
+  \item{...}{ Additional arguments to \link{randomizeSample}}
+}
+\value{
+    A list with elements:
+    \item{obs.corr }{ Observed co-occurrence/phylogenetic distance correlation}
+    \item{obs.corr.p}{ P-value of observed correlation (standard P-value for correlation coefficient, not based on comparison with randomizations)}
+    \item{obs.rank}{ Rank of observed correlation vs. random}
+    \item{runs}{ Number of runs (randomizations) }
+    \item{obs.rand.p}{ P-value of observed correlation vs. randomizations (= obs.rank / (runs + 1))}
+    \item{random.corrs}{A vector of random correlation calculated for each run}
+}
+\details{
+Currently implemented null models (arguments to null.model):
+\describe{
+        \item{sample.taxa.labels}{Shuffle phylogeny tip labels (only within set of taxa present in community data)}
+        \item{pool.taxa.labels}{Shuffle phylogeny tip labels (across all taxa included in phylogenetic tree)}
+        \item{frequency}{Randomize community data matrix abundances within species (maintains species occurence frequency)}
+        \item{richness}{Randomize community data matrix abundances within samples (maintains sample species richness)}
+        \item{independentswap}{Randomize community data matrix maintaining species occurrence frequency and site richnessing using independent swap}
+        \item{trialswap}{Randomize community data matrix maintaining species occurrence frequency and site richnessing using trial swap}     
+    }
+}
+\references{ Cavender-Bares J., D.A. Ackerly, D. Baum and F.A. Bazzaz. 2004. Phylogenetic overdispersion in Floridian oak communities, American Naturalist, 163(6):823-843. }
+\author{ Steven Kembel <skembel at uoregon.edu> }
+\seealso{ \code{\link{randomizeSample}} }
+\examples{
+data(phylocom)
+comm.phylo.cor(phylocom$sample, phylocom$phylo, metric="cij",null.model="sample.taxa.labels")}
+\keyword{univar}

Deleted: tags/0.5-3/man/cor.table.Rd
===================================================================
--- pkg/man/cor.table.Rd	2008-11-06 18:29:44 UTC (rev 168)
+++ tags/0.5-3/man/cor.table.Rd	2009-01-28 00:54:40 UTC (rev 175)
@@ -1,26 +0,0 @@
-\name{cor.table}
-\alias{cor.table}
-\title{ Table of correlations and P-values }
-\description{
-  Table of correlations with associated P-values and df, can be used with regular or independent contrast data
-}
-\usage{
-cor.table(x, cor.method = "pearson", cor.type=c("standard","contrast")) 
-}
-
-\arguments{
-  \item{x}{ Data frame of data points or contrasts at nodes }
-  \item{cor.method}{ Correlation method (as \code{\link[stats]{cor}}) }
-  \item{cor.type}{ Are data \code{standard} or independent \code{contrast} values?}
-}
-
-\value{
-  \item{r}{Correlation values}
-  \item{df}{Degrees of freedom}
-  \item{P}{P-values}
-}
-
-\references{ Garland, T., Jr., P. H. Harvey, and A. R. Ives. 1992. Procedures for the analysis of comparative data using phylogenetically independent contrasts. Systematic Biology 41:18-32. }
-
-\author{ Steve Kembel <skembel at berkeley.edu> }
-\keyword{univar}

Copied: tags/0.5-3/man/cor.table.Rd (from rev 169, pkg/man/cor.table.Rd)
===================================================================
--- tags/0.5-3/man/cor.table.Rd	                        (rev 0)
+++ tags/0.5-3/man/cor.table.Rd	2009-01-28 00:54:40 UTC (rev 175)
@@ -0,0 +1,26 @@
+\name{cor.table}
+\alias{cor.table}
+\title{ Table of correlations and P-values }
+\description{
+  Table of correlations with associated P-values and df, can be used with regular or independent contrast data
+}
+\usage{
+cor.table(x, cor.method = "pearson", cor.type=c("standard","contrast")) 
+}
+
+\arguments{
+  \item{x}{ Data frame of data points or contrasts at nodes }
+  \item{cor.method}{ Correlation method (as \code{\link[stats]{cor}}) }
+  \item{cor.type}{ Are data \code{standard} or independent \code{contrast} values?}
+}
+
+\value{
+  \item{r}{Correlation values}
+  \item{df}{Degrees of freedom}
+  \item{P}{P-values}
+}
+
+\references{ Garland, T., Jr., P. H. Harvey, and A. R. Ives. 1992. Procedures for the analysis of comparative data using phylogenetically independent contrasts. Systematic Biology 41:18-32. }
+
+\author{ Steven Kembel <skembel at uoregon.edu> }
+\keyword{univar}

Deleted: tags/0.5-3/man/evolve.brownian.Rd
===================================================================
--- pkg/man/evolve.brownian.Rd	2008-11-06 18:29:44 UTC (rev 168)
+++ tags/0.5-3/man/evolve.brownian.Rd	2009-01-28 00:54:40 UTC (rev 175)
@@ -1,20 +0,0 @@
-\name{evolve.brownian}
-\alias{evolve.brownian}
-\title{ Trait evolution under Brownian motion }
-\description{
-  Trait evolution under Brownian motion model
-}
-\usage{
-evolve.brownian(phy, value = 0, var = 1)
-}
-
-\arguments{
-  \item{phy}{ phylo object }
-  \item{value}{ mean }
-  \item{var}{ variance }
-}
-\value{
-  Vector of trait values with names corresponding to phylo\$tip.label
-}
-\author{ David Ackerly <dackerly at berkeley.edu> and Steve Kembel <skembel at berkeley.edu> }
-\keyword{datagen}

Copied: tags/0.5-3/man/evolve.brownian.Rd (from rev 169, pkg/man/evolve.brownian.Rd)
===================================================================
--- tags/0.5-3/man/evolve.brownian.Rd	                        (rev 0)
+++ tags/0.5-3/man/evolve.brownian.Rd	2009-01-28 00:54:40 UTC (rev 175)
@@ -0,0 +1,20 @@
+\name{evolve.brownian}
+\alias{evolve.brownian}
+\title{ Trait evolution under Brownian motion }
+\description{
+  Trait evolution under Brownian motion model
+}
+\usage{
+evolve.brownian(phy, value = 0, var = 1)
+}
+
+\arguments{
+  \item{phy}{ phylo object }
+  \item{value}{ mean }
+  \item{var}{ variance }
+}
+\value{
+  Vector of trait values with names corresponding to phylo\$tip.label
+}
+\author{ David Ackerly <dackerly at berkeley.edu> and Steven Kembel <skembel at uoregon.edu> }
+\keyword{datagen}

Deleted: tags/0.5-3/man/matrix2sample.Rd
===================================================================
--- pkg/man/matrix2sample.Rd	2008-11-06 18:29:44 UTC (rev 168)
+++ tags/0.5-3/man/matrix2sample.Rd	2009-01-28 00:54:40 UTC (rev 175)
@@ -1,25 +0,0 @@
-\name{matrix2sample}
-\alias{matrix2sample}
-
-\title{ Convert community data matrix to Phylocom sample }
-\description{
-  Converts a community data matrix to a Phylocom database-format community sample
-}
-\usage{
-matrix2sample(z)
-}
-%- maybe also 'usage' for other objects documented here.
-\arguments{
-  \item{z}{ Community data matrix }
-}
-
-\value{
-  Phylocom database-format community sample
-}
-\references{ Webb, C.O., Ackerly, D.D., and Kembel, S.W. 2008. Phylocom: software for the analysis of phylogenetic community structure and trait evolution. Version 4.0.1. \url{http://www.phylodiversity.net/phylocom/}.}
-\author{ Steve Kembel <skembel at berkeley.edu> and Cam Webb <cwebb at oeb.harvard.edu> }
-\examples{
-data(phylocom)
-matrix2sample(phylocom$sample)
-}
-\keyword{manip}

Copied: tags/0.5-3/man/matrix2sample.Rd (from rev 169, pkg/man/matrix2sample.Rd)
===================================================================
--- tags/0.5-3/man/matrix2sample.Rd	                        (rev 0)
+++ tags/0.5-3/man/matrix2sample.Rd	2009-01-28 00:54:40 UTC (rev 175)
@@ -0,0 +1,25 @@
+\name{matrix2sample}
+\alias{matrix2sample}
+
+\title{ Convert community data matrix to Phylocom sample }
+\description{
+  Converts a community data matrix to a Phylocom database-format community sample
+}
+\usage{
+matrix2sample(z)
+}
+%- maybe also 'usage' for other objects documented here.
+\arguments{
+  \item{z}{ Community data matrix }
+}
+
+\value{
+  Phylocom database-format community sample
+}
+\references{ Webb, C.O., Ackerly, D.D., and Kembel, S.W. 2008. Phylocom: software for the analysis of phylogenetic community structure and trait evolution. Version 4.0.1. \url{http://www.phylodiversity.net/phylocom/}.}
+\author{ Steven Kembel <skembel at uoregon.edu> and Cam Webb <cwebb at oeb.harvard.edu> }
+\examples{
+data(phylocom)
+matrix2sample(phylocom$sample)
+}
+\keyword{manip}

Deleted: tags/0.5-3/man/mnnd.Rd
===================================================================
--- pkg/man/mnnd.Rd	2008-11-06 18:29:44 UTC (rev 168)
+++ tags/0.5-3/man/mnnd.Rd	2009-01-28 00:54:40 UTC (rev 175)
@@ -1,21 +0,0 @@
-\name{mnnd}
-\alias{mnnd}
-\title{ Mean nearest neighbour distance }
-\description{
-  Calculates MNND (mean nearest neighbour distance) for taxa in a community
-}
-\usage{
-mnnd(samp, dis)
-}
-
-\arguments{
-  \item{samp}{ Community data matrix }
-  \item{dis}{ Interspecific distance matrix }
-}
-\value{
-	Vector of MNND values for each community.
-}
-\references{ Webb, C., D. Ackerly, M. McPeek, and M. Donoghue. 2002. Phylogenies and community ecology. Annual Review of Ecology and Systematics 33:475-505. }
-\author{ Steve Kembel <skembel at berkeley.edu> }
-\seealso{ \code{\link{ses.mnnd}} }
-\keyword{univar}

Copied: tags/0.5-3/man/mnnd.Rd (from rev 169, pkg/man/mnnd.Rd)
===================================================================
--- tags/0.5-3/man/mnnd.Rd	                        (rev 0)
+++ tags/0.5-3/man/mnnd.Rd	2009-01-28 00:54:40 UTC (rev 175)
@@ -0,0 +1,21 @@
+\name{mnnd}
+\alias{mnnd}
+\title{ Mean nearest neighbour distance }
+\description{
+  Calculates MNND (mean nearest neighbour distance) for taxa in a community
+}
+\usage{
+mnnd(samp, dis)
+}
+
+\arguments{
+  \item{samp}{ Community data matrix }
+  \item{dis}{ Interspecific distance matrix }
+}
+\value{
+	Vector of MNND values for each community.
+}
+\references{ Webb, C., D. Ackerly, M. McPeek, and M. Donoghue. 2002. Phylogenies and community ecology. Annual Review of Ecology and Systematics 33:475-505. }
+\author{ Steven Kembel <skembel at uoregon.edu> }
+\seealso{ \code{\link{ses.mnnd}} }
+\keyword{univar}

Deleted: tags/0.5-3/man/mpd.Rd
===================================================================
--- pkg/man/mpd.Rd	2008-11-06 18:29:44 UTC (rev 168)
+++ tags/0.5-3/man/mpd.Rd	2009-01-28 00:54:40 UTC (rev 175)
@@ -1,22 +0,0 @@
-\name{mpd}
-\alias{mpd}
-\title{ Mean pairwise distance }
-\description{
-  Calculates mean pairwise distance for a community
-}
-\usage{
-mpd(samp, dis)
-}
-
-\arguments{
-  \item{samp}{ Community data matrix }
-  \item{dis}{ Interspecific distance matrix }
-}
-
-\value{
-  Vector of MPD values for each community
-}
-\references{ Webb, C., D. Ackerly, M. McPeek, and M. Donoghue. 2002. Phylogenies and community ecology. Annual Review of Ecology and Systematics 33:475-505. }
-\author{ Steve Kembel <skembel at berkeley.edu> }
-\seealso{ \code{\link{ses.mpd}}}
-\keyword{univar}

Copied: tags/0.5-3/man/mpd.Rd (from rev 169, pkg/man/mpd.Rd)
===================================================================
--- tags/0.5-3/man/mpd.Rd	                        (rev 0)
+++ tags/0.5-3/man/mpd.Rd	2009-01-28 00:54:40 UTC (rev 175)
@@ -0,0 +1,22 @@
+\name{mpd}
+\alias{mpd}
+\title{ Mean pairwise distance }
+\description{
+  Calculates mean pairwise distance for a community
+}
+\usage{
+mpd(samp, dis)
+}
+
+\arguments{
+  \item{samp}{ Community data matrix }
+  \item{dis}{ Interspecific distance matrix }
+}
+
+\value{
+  Vector of MPD values for each community
+}
+\references{ Webb, C., D. Ackerly, M. McPeek, and M. Donoghue. 2002. Phylogenies and community ecology. Annual Review of Ecology and Systematics 33:475-505. }
+\author{ Steven Kembel <skembel at uoregon.edu> }
+\seealso{ \code{\link{ses.mpd}}}
+\keyword{univar}

Deleted: tags/0.5-3/man/multiPhylosignal.Rd
===================================================================
--- pkg/man/multiPhylosignal.Rd	2008-11-06 18:29:44 UTC (rev 168)
+++ tags/0.5-3/man/multiPhylosignal.Rd	2009-01-28 00:54:40 UTC (rev 175)
@@ -1,20 +0,0 @@
-\name{multiPhylosignal}
-\alias{multiPhylosignal}
-\title{ Calculates phylogenetic signal for data.frame of traits }
-\description{
-  Calculates phylogenetic signal for data.frame of traits. Traits may have missing values in which case the tree will be pruned prior to calculating phylogenetic signal for each trait.
-}
-\usage{
-multiPhylosignal(x, phy, ...)
-}
-\arguments{
-  \item{x}{ Data frame of trait data (traits in columns) with row names corresponding to tip.labels}
-  \item{phy}{ phylo object }
-  \item{...}{ Additional arguments to \link{phylosignal} }
-}
-\value{
-  Returns a data frame with phylogenetic signal results for each trait
-}
-\section{Warning }{ Assumes that trait data are sorted in the same order as phylo tip.label }
-\author{ Steve Kembel <skembel at berkeley.edu> }
-\keyword{univar}

Copied: tags/0.5-3/man/multiPhylosignal.Rd (from rev 169, pkg/man/multiPhylosignal.Rd)
===================================================================
--- tags/0.5-3/man/multiPhylosignal.Rd	                        (rev 0)
+++ tags/0.5-3/man/multiPhylosignal.Rd	2009-01-28 00:54:40 UTC (rev 175)
@@ -0,0 +1,20 @@
+\name{multiPhylosignal}
+\alias{multiPhylosignal}
+\title{ Calculates phylogenetic signal for data.frame of traits }
+\description{
+  Calculates phylogenetic signal for data.frame of traits. Traits may have missing values in which case the tree will be pruned prior to calculating phylogenetic signal for each trait.
+}
+\usage{
+multiPhylosignal(x, phy, ...)
+}
+\arguments{
+  \item{x}{ Data frame of trait data (traits in columns) with row names corresponding to tip.labels}
+  \item{phy}{ phylo object }
+  \item{...}{ Additional arguments to \link{phylosignal} }
+}
+\value{
+  Returns a data frame with phylogenetic signal results for each trait
+}
+\section{Warning }{ Assumes that trait data are sorted in the same order as phylo tip.label }
+\author{ Steven Kembel <skembel at uoregon.edu> }
+\keyword{univar}

Deleted: tags/0.5-3/man/phylosignal.Rd
===================================================================
--- pkg/man/phylosignal.Rd	2008-11-06 18:29:44 UTC (rev 168)
+++ tags/0.5-3/man/phylosignal.Rd	2009-01-28 00:54:40 UTC (rev 175)
@@ -1,37 +0,0 @@
-\name{phylosignal}
-\alias{phylosignal}
-
-\title{ Measure phylogenetic signal }
-\description{
-  Calculates K statistic of phylogenetic signal as well as P-value based on variance of phylogenetically independent contrasts relative to tip shuffling randomization.
-}
-\usage{
-phylosignal(x, phy, reps = 999, ...)
-}
-
-\arguments{
-  \item{x}{ Trait vector (same order as phy\$tip.label) }
-  \item{phy}{ phylo object }
-  \item{reps}{ Number of randomizations }
-  \item{...}{ Additional arguments passed to pic }
-}
-\value{
- Data frame with columns:
-  \item{K }{K statistic}
-  \item{PIC.variance }{Mean observed PIC variance}
-  \item{PIC.variance.P }{P-value of observed vs. random variance of PICs}
-   \item{PIC.variance.z }{Z-score of observed vs. random variance of PICs}
-}
-\references{ 
-Blomberg, S. P., and T. Garland, Jr. 2002. Tempo and mode in evolution: phylogenetic inertia, adaptation and comparative methods. Journal of Evolutionary Biology 15:899-910.
-
-Blomberg, S. P., T. Garland, Jr., and A. R. Ives. 2003. Testing for phylogenetic signal in comparative data: behavioral traits are more labile. Evolution 57:717-745. }
-\author{ Steve Kembel <skembel at berkeley.edu> }
-\seealso{ \code{\link{Kcalc}} }
-\section{Warning }{ Assumes that trait data are sorted in the same order as phylo\$tip.label }
-\examples{
-randtree <- rcoal(20)
-randtraits <- evolve.brownian(randtree)
-phylosignal(randtraits[randtree$tip.label],randtree)
-}
-\keyword{univar}
\ No newline at end of file

Copied: tags/0.5-3/man/phylosignal.Rd (from rev 169, pkg/man/phylosignal.Rd)
===================================================================
--- tags/0.5-3/man/phylosignal.Rd	                        (rev 0)
+++ tags/0.5-3/man/phylosignal.Rd	2009-01-28 00:54:40 UTC (rev 175)
@@ -0,0 +1,37 @@
+\name{phylosignal}
+\alias{phylosignal}
+
+\title{ Measure phylogenetic signal }
+\description{
+  Calculates K statistic of phylogenetic signal as well as P-value based on variance of phylogenetically independent contrasts relative to tip shuffling randomization.
+}
+\usage{
+phylosignal(x, phy, reps = 999, ...)
+}
+
+\arguments{
+  \item{x}{ Trait vector (same order as phy\$tip.label) }
+  \item{phy}{ phylo object }
+  \item{reps}{ Number of randomizations }
+  \item{...}{ Additional arguments passed to pic }
+}
+\value{
+ Data frame with columns:
+  \item{K }{K statistic}
+  \item{PIC.variance }{Mean observed PIC variance}
+  \item{PIC.variance.P }{P-value of observed vs. random variance of PICs}
+   \item{PIC.variance.z }{Z-score of observed vs. random variance of PICs}
+}
+\references{ 
+Blomberg, S. P., and T. Garland, Jr. 2002. Tempo and mode in evolution: phylogenetic inertia, adaptation and comparative methods. Journal of Evolutionary Biology 15:899-910.
+
+Blomberg, S. P., T. Garland, Jr., and A. R. Ives. 2003. Testing for phylogenetic signal in comparative data: behavioral traits are more labile. Evolution 57:717-745. }
+\author{ Steven Kembel <skembel at uoregon.edu> }
+\seealso{ \code{\link{Kcalc}} }
+\section{Warning }{ Assumes that trait data are sorted in the same order as phylo\$tip.label }
+\examples{
+randtree <- rcoal(20)
+randtraits <- evolve.brownian(randtree)
+phylosignal(randtraits[randtree$tip.label],randtree)
+}
+\keyword{univar}
\ No newline at end of file

Copied: tags/0.5-3/man/phylosor.Rd (from rev 174, pkg/man/phylosor.Rd)
===================================================================
--- tags/0.5-3/man/phylosor.Rd	                        (rev 0)
+++ tags/0.5-3/man/phylosor.Rd	2009-01-28 00:54:40 UTC (rev 175)
@@ -0,0 +1,21 @@
+\name{phylosor}
+\alias{phylosor}
+
+\title{Phylogenetic index of beta-diversity PhyloSor}
+\description{Fraction of branch-length shared between two communities}
+\usage{
+phylosor(samp, tree)    
+}
+
+\arguments{
+  \item{samp}{ Community data matrix }
+  \item{tree}{ Object of class phylo}
+}
+\value{Distance matrix reporting the PhyloSor index of similarity between communities: fraction of branch-length shared}
+\references{Bryant, J.B., Lamanna, C., Morlon, H., Kerkhoff, A.J., Enquist, B.J., Green, J.L. 2008. Microbes on mountainsides: Contrasting elevational patterns of bacterial and plant diversity. Proceedings of the National Academy of Sciences 105 Supplement 1: 1505-11511}
+\author{ Helene Morlon <morlon.helene at gmail.com> and Steven Kembel <skembel at uoregon.edu> }
+\seealso{ \code{\link{phylosor.rnd}}}
+\examples{
+data(phylocom)
+phylosor(phylocom$sample, phylocom$phylo)}
+\keyword{univar}

Copied: tags/0.5-3/man/phylosor.rnd.Rd (from rev 174, pkg/man/phylosor.rnd.Rd)
===================================================================
--- tags/0.5-3/man/phylosor.rnd.Rd	                        (rev 0)
+++ tags/0.5-3/man/phylosor.rnd.Rd	2009-01-28 00:54:40 UTC (rev 175)
@@ -0,0 +1,44 @@
+\name{phylosor.rnd}
+\alias{phylosor.rnd}
+
+\title{ Null PhyloSor values of phylogenetic beta-diversity }
+\description{
+  PhyloSor values obtained by randomization for different choices of null models
+}
+\usage{
+phylosor.rnd(samp,tree, cstSor=TRUE, null.model=c("taxa.labels",
+    "frequency","richness","independentswap","trialswap"),
+    runs=999, iterations=1000)
+}
+
+\arguments{
+  \item{ samp }{ Community data matrix }
+  \item{ tree }{ Object of class phylo}
+  \item{ cstSor }{ TRUE if the Sorensen similarity should be kept constant across communities. FALSE otherwise }
+  \item{ null.model }{ Null model to use (see Details section) }
+  \item{ runs }{ Number of randomizations }
+  \item{ iterations }{ Number of iterations to use for each randomization (for independent swap and trial null models) }
+}
+
+\value{
+  A list of length the number of runs. Each element of the list is a distance matrix containing the PhyloSor values of phylogenetic beta-diversity obtained by randomization
+}
+\details{
+Currently implemented null models (arguments to null.model):
+\describe{
+    \item{taxa.labels}{ Shuffle community data matrix labels. Maintains species richness in each community and species shared between communities. Should be used with cstSor=TRUE}
+    \item{frequency}{ Randomize community data matrix abundances within species (maintains species occurence frequency). Does not maintain species richness in communities nor species shared between communities. Can only be used with cstSor=FALSE}
+    \item{richness}{ With cstSor=TRUE: For each pair of community, maintains species richness in each community and species shared between communities. Sample in the species pool with equal probability;
+    With cstSor=FALSE: Maintains species richness in each community, does not maintain species shared between communities. Sample in the species pool with equal probability}
+    \item{independentswap}{ Randomize community data matrix with the independent swap algorithm (Gotelli 2000) maintaining species occurrence frequency and sample species richness. Can only be used with cstSor=FALSE}
+    \item{trialswap}{ Randomize community data matrix with the trial-swap algorithm (Miklos & Podani 2004) maintaining species occurrence frequency and sample species richness. Can only be used with cstSor=FALSE}
+    }
+}
[TRUNCATED]

To get the complete diff run:
    svnlook diff /svnroot/picante -r 175


More information about the Picante-commits mailing list