[Picante-commits] r77 - in pkg: . R man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat May 31 09:32:44 CEST 2008


Author: skembel
Date: 2008-05-31 09:32:44 +0200 (Sat, 31 May 2008)
New Revision: 77

Removed:
   pkg/man/evolve.trait.Rd
Modified:
   pkg/DESCRIPTION
   pkg/R/evolve.trait.R
   pkg/R/utility.R
   pkg/man/Kcalc.Rd
   pkg/man/comm.phylo.cor.Rd
   pkg/man/cor.table.Rd
   pkg/man/matrix2sample.Rd
   pkg/man/mnnd.Rd
   pkg/man/mpd.Rd
   pkg/man/multiPhylosignal.Rd
   pkg/man/phylocom.Rd
   pkg/man/phylosignal.Rd
   pkg/man/picante-package.Rd
   pkg/man/pruning.Rd
   pkg/man/randomizeSample.Rd
   pkg/man/readsample.Rd
   pkg/man/sample2matrix.Rd
   pkg/man/ses.mnnd.Rd
   pkg/man/ses.mpd.Rd
   pkg/man/species.dist.Rd
   pkg/man/utility.Rd
   pkg/man/writesample.Rd
   pkg/man/writetraits.Rd
Log:
Added documentation for all functions, hid some utility functions, getting ready to submit to CRAN

Modified: pkg/DESCRIPTION
===================================================================
--- pkg/DESCRIPTION	2008-05-29 18:15:56 UTC (rev 76)
+++ pkg/DESCRIPTION	2008-05-31 07:32:44 UTC (rev 77)
@@ -1,8 +1,8 @@
 Package: picante
 Type: Package
 Title: Tools for integrating phylogenies and ecology
-Version: 0.1-1
-Date: 2008-4-16
+Version: 0.1-2
+Date: 2008-5-30
 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>, Cam Webb <cwebb at oeb.harvard.edu>
 Maintainer: Steve Kembel <skembel at berkeley.edu>
 Depends: ape, vegan

Modified: pkg/R/evolve.trait.R
===================================================================
--- pkg/R/evolve.trait.R	2008-05-29 18:15:56 UTC (rev 76)
+++ pkg/R/evolve.trait.R	2008-05-31 07:32:44 UTC (rev 77)
@@ -6,7 +6,7 @@
 }
 
 
-`evolve.trait` <-
+`.evolve.trait` <-
 function(phy,
 	x.root=0, #root value
 	sigma = 1, #brownian motion st. dev.

Modified: pkg/R/utility.R
===================================================================
--- pkg/R/utility.R	2008-05-29 18:15:56 UTC (rev 76)
+++ pkg/R/utility.R	2008-05-31 07:32:44 UTC (rev 77)
@@ -1,4 +1,4 @@
-`match.tree` <- function(phy, x, taxacol, traitcol, strict = FALSE) {
+`.match.tree` <- function(phy, x, taxacol, traitcol, strict = FALSE) {
 	# some data input error checking, all taxa in tree and x
 	# no missing data values
 	stopifnot(traitcol %in% names(x), taxacol %in% names(x),

Modified: pkg/man/Kcalc.Rd
===================================================================
--- pkg/man/Kcalc.Rd	2008-05-29 18:15:56 UTC (rev 76)
+++ pkg/man/Kcalc.Rd	2008-05-31 07:32:44 UTC (rev 77)
@@ -17,8 +17,17 @@
 \value{
   \item{K }{K statistic}
 }
-\references{ 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.}
+\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{ Simon Blomberg <s.blomberg1 at uq.edu.au> and David Ackerly <dackerly at berkeley.edu> }
 
 \seealso{ \code{\link{phylosignal}} }
+\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}

Modified: pkg/man/comm.phylo.cor.Rd
===================================================================
--- pkg/man/comm.phylo.cor.Rd	2008-05-29 18:15:56 UTC (rev 76)
+++ pkg/man/comm.phylo.cor.Rd	2008-05-31 07:32:44 UTC (rev 77)
@@ -15,7 +15,13 @@
   \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{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{weighted.sample.pool}{Randomize community data matrix by drawing species from sample pool with probability weighted by occurrence frequency}
+  }
   \item{runs}{ Number of runs (randomizations) }
 }
 \value{
@@ -27,11 +33,10 @@
     \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 et al. 2004, 2006 }
+\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> }
-\section{Warning }{ Weighted null model currently only works with presence-absence data. Convert your data before using this null model (e.g. \code{decostand(x,method="pa")})}
+\section{Warning }{ Weighted null model currently only works with presence-absence data. Convert your data to presence-absence before using this null model (e.g. \code{decostand(x,method="pa")})}
 \examples{
 data(phylocom)
-comm.phylo.cor(phylocom$sample, phylocom$phylo, metric="cij",null.model="sample.taxa.labels")
-}
+comm.phylo.cor(phylocom$sample, phylocom$phylo, metric="cij",null.model="sample.taxa.labels")}
 \keyword{univar}

Modified: pkg/man/cor.table.Rd
===================================================================
--- pkg/man/cor.table.Rd	2008-05-29 18:15:56 UTC (rev 76)
+++ pkg/man/cor.table.Rd	2008-05-31 07:32:44 UTC (rev 77)
@@ -7,7 +7,7 @@
 \usage{
 cor.table(x, cor.method = "pearson", cor.type=c("standard","contrast")) 
 }
-%- maybe also 'usage' for other objects documented here.
+
 \arguments{
   \item{x}{ Data frame of data points or contrasts at nodes }
   \item{cor.method}{ Correlation method (as \code{\link{cor}}) }
@@ -20,7 +20,7 @@
   \item{P}{P-values}
 }
 
-\references{ Garland et al. 1992 }
+\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}

Deleted: pkg/man/evolve.trait.Rd
===================================================================
--- pkg/man/evolve.trait.Rd	2008-05-29 18:15:56 UTC (rev 76)
+++ pkg/man/evolve.trait.Rd	2008-05-31 07:32:44 UTC (rev 77)
@@ -1,38 +0,0 @@
-\name{evolve.trait}
-\alias{evolve.trait}
-\title{ Trait evolution under various modes and tempos }
-\description{
-  Evolves traits under a variety of tempos and modes (Brownian, bounded Brownian, ACDC, OU, proportional Brownian)
-}
-\usage{
-evolve.trait(phy, x.root = 0, sigma = 1, trend = 0, bound = c(-10, 10), burst = rep(1, nrow(phy$edge)), pulse = 0, mu = rep(0, nrow(phy$edge)), theta = 1, gamma = 1, gamma.reset = 0, trait.mode = "Brownian", set.minbl = 1, show.plots = TRUE, use.color = FALSE, use.bl = TRUE, debug = FALSE)
-}
-\arguments{
-  \item{phy}{ ~~Describe \code{phy} here~~ }
-  \item{x.root}{ ~~Describe \code{x.root} here~~ }
-  \item{sigma}{ ~~Describe \code{sigma} here~~ }
-  \item{trend}{ ~~Describe \code{trend} here~~ }
-  \item{bound}{ ~~Describe \code{bound} here~~ }
-  \item{burst}{ ~~Describe \code{burst} here~~ }
-  \item{pulse}{ ~~Describe \code{pulse} here~~ }
-  \item{mu}{ ~~Describe \code{mu} here~~ }
-  \item{theta}{ ~~Describe \code{theta} here~~ }
-  \item{gamma}{ ~~Describe \code{gamma} here~~ }
-  \item{gamma.reset}{ ~~Describe \code{gamma.reset} here~~ }
-  \item{trait.mode}{ ~~Describe \code{trait.mode} here~~ }
-  \item{set.minbl}{ ~~Describe \code{set.minbl} here~~ }
-  \item{show.plots}{ ~~Describe \code{show.plots} here~~ }
-  \item{use.color}{ ~~Describe \code{use.color} here~~ }
-  \item{use.bl}{ ~~Describe \code{use.bl} here~~ }
-  \item{debug}{ ~~Describe \code{debug} here~~ }
-}
-\details{
-  ...
-}
-\value{
-  Vector of trait values for tips of phylo
-}
-
-\author{ David Ackerly <dackerly at berkeley.edu> and Steve Kembel <skembel at berkeley.edu>}
-\keyword{datagen}
-

Modified: pkg/man/matrix2sample.Rd
===================================================================
--- pkg/man/matrix2sample.Rd	2008-05-29 18:15:56 UTC (rev 76)
+++ pkg/man/matrix2sample.Rd	2008-05-31 07:32:44 UTC (rev 77)
@@ -16,6 +16,10 @@
 \value{
   Phylocom database-format community sample
 }
-\references{ Webb et al. 2007. Phylocom. }
+\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}

Modified: pkg/man/mnnd.Rd
===================================================================
--- pkg/man/mnnd.Rd	2008-05-29 18:15:56 UTC (rev 76)
+++ pkg/man/mnnd.Rd	2008-05-31 07:32:44 UTC (rev 77)
@@ -1,22 +1,21 @@
 \name{mnnd}
 \alias{mnnd}
-%- Also NEED an '\alias' for EACH other topic documented here.
 \title{ Mean nearest neighbour distance }
 \description{
-  Calculates MNND (mean nearest neighbour distance) for a community
+  Calculates MNND (mean nearest neighbour distance) for taxa in a community
 }
 \usage{
 mnnd(samp, dis)
 }
-%- maybe also 'usage' for other objects documented here.
+
 \arguments{
-  \item{samp}{ Phylocom sample file }
-  \item{dis}{ Interspecific (e.g. phylogenetic) distance matrix }
+  \item{samp}{ Community data matrix }
+  \item{dis}{ Interspecific distance matrix }
 }
 \value{
-	Vector of MNND values for each community
+	Vector of MNND values for each community.
 }
-\references{ Webb et al. 2002. ARES. }
+\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}

Modified: pkg/man/mpd.Rd
===================================================================
--- pkg/man/mpd.Rd	2008-05-29 18:15:56 UTC (rev 76)
+++ pkg/man/mpd.Rd	2008-05-31 07:32:44 UTC (rev 77)
@@ -10,13 +10,13 @@
 
 \arguments{
   \item{samp}{ Community data matrix }
-  \item{dis}{ Interspecific (e.g. phylogenetic) distance matrix }
+  \item{dis}{ Interspecific distance matrix }
 }
 
 \value{
   Vector of MPD values for each community
 }
-\references{ Webb et al. 2002. ARES. }
+\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}

Modified: pkg/man/multiPhylosignal.Rd
===================================================================
--- pkg/man/multiPhylosignal.Rd	2008-05-29 18:15:56 UTC (rev 76)
+++ pkg/man/multiPhylosignal.Rd	2008-05-31 07:32:44 UTC (rev 77)
@@ -8,12 +8,13 @@
 multiPhylosignal(x, phy, ...)
 }
 \arguments{
-  \item{x}{ Data frame of trait data with row names corresponding to tip.labels }
+  \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 phylosignal }
+  \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}

Modified: pkg/man/phylocom.Rd
===================================================================
--- pkg/man/phylocom.Rd	2008-05-29 18:15:56 UTC (rev 76)
+++ pkg/man/phylocom.Rd	2008-05-31 07:32:44 UTC (rev 77)
@@ -3,7 +3,7 @@
 \docType{data}
 \title{ Phylocom default data }
 \description{
-  Tree, community and trait data from the Phylocom 3.41 distribution
+  Tree, community and trait data from the Phylocom 4.0 distribution
 }
 \usage{data(phylocom)}
 \format{
@@ -14,7 +14,7 @@
 }
 
 \source{
-  Webb, C.O., Ackerly, D.D., and Kembel, S.W. 2007. Phylocom: software for the analysis of community phylogenetic structure and trait evolution. Version 3.41. http://www.phylodiversity.net/phylocom/.
+  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/.
 }
 
 \examples{

Modified: pkg/man/phylosignal.Rd
===================================================================
--- pkg/man/phylosignal.Rd	2008-05-29 18:15:56 UTC (rev 76)
+++ pkg/man/phylosignal.Rd	2008-05-31 07:32:44 UTC (rev 77)
@@ -8,7 +8,7 @@
 \usage{
 phylosignal(x, phy, reps = 999, ...)
 }
-%- maybe also 'usage' for other objects documented here.
+
 \arguments{
   \item{x}{ Trait vector (same order as phy\$tip.label) }
   \item{phy}{ phylo object }
@@ -22,9 +22,13 @@
   \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., T. Garland, Jr., and A. R. Ives. 2003. Testing for phylogenetic signal in comparative data: behavioral traits are more labile. Evolution 57:717-745. }
+\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)

Modified: pkg/man/picante-package.Rd
===================================================================
--- pkg/man/picante-package.Rd	2008-05-29 18:15:56 UTC (rev 76)
+++ pkg/man/picante-package.Rd	2008-05-31 07:32:44 UTC (rev 77)
@@ -12,11 +12,10 @@
 \tabular{ll}{
 Package: \tab picante\cr
 Type: \tab Package\cr
-Version: \tab 0.1-1\cr
-Date: \tab 2008-04-16\cr
+Version: \tab 0.1-2\cr
+Date: \tab 2008-05-30\cr
 License: \tab GPL v2\cr
 }
-More details forthcoming
 }
 \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>, Cam Webb <cwebb at oeb.harvard.edu>

Modified: pkg/man/pruning.Rd
===================================================================
--- pkg/man/pruning.Rd	2008-05-29 18:15:56 UTC (rev 76)
+++ pkg/man/pruning.Rd	2008-05-31 07:32:44 UTC (rev 77)
@@ -1,19 +1,19 @@
 \name{prune.sample}
 \alias{prune.sample}
 \alias{prune.missing}
-%- Also NEED an '\alias' for EACH other topic documented here.
+
 \title{ Prune tree to match community data or trait data }
 \description{
-  Prune a phylogenetic tree to include only species present in a community data set or with trait data}
+  Prune a phylogenetic tree to include only species present in a community data set or with non-missing trait data}
 \usage{
 prune.sample(samp, phylo)
 prune.missing(x, phylo)
 }
-%- maybe also 'usage' for other objects documented here.
+
 \arguments{
   \item{phylo}{ phylo object }
   \item{samp}{ Community data matrix }
-  \item{x}{ trait data }
+  \item{x}{ Vector of trait data }
 }
 
 \value{

Modified: pkg/man/randomizeSample.Rd
===================================================================
--- pkg/man/randomizeSample.Rd	2008-05-29 18:15:56 UTC (rev 76)
+++ pkg/man/randomizeSample.Rd	2008-05-31 07:32:44 UTC (rev 77)
@@ -1,6 +1,6 @@
 \name{randomizeSample}
 \alias{randomizeSample}
-%- Also NEED an '\alias' for EACH other topic documented here.
+
 \title{ Null models for community data matrix randomization}
 \description{
   Various null models for randomizing community data matrices
@@ -8,15 +8,22 @@
 \usage{
 randomizeSample(samp, null.model = c("frequency", "richness", "both"))
 }
-%- maybe also 'usage' for other objects documented here.
+
 \arguments{
   \item{samp}{ Community data matrix }
-  \item{null.model}{ Null model }
+  \item{null.model}{ Null model
+    \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{both}{Randomize community data matrix by drawing species from sample pool with probability weighted by occurrence frequency (maintains both species occurrence frequency and sample species richness)}
+  }
 }
 \value{
   Randomized community data matrix
 }
 \references{ Gotelli. 2000. Ecology. }
 \author{ Steve Kembel <skembel at berkeley.edu> }
-\section{Warning }{keepBoth (independent swap) works ONLY with presence-absence}
+\section{Warning }{ Null model \code{both} currently only works with presence-absence data. Convert your data to presence-absence before using this null model (e.g. \code{decostand(x,method="pa")})}
+\examples{
+data(phylocom)
+randomizeSample(phylocom$sample, null.model="richness")}
 \keyword{manip}

Modified: pkg/man/readsample.Rd
===================================================================
--- pkg/man/readsample.Rd	2008-05-29 18:15:56 UTC (rev 76)
+++ pkg/man/readsample.Rd	2008-05-31 07:32:44 UTC (rev 77)
@@ -1,6 +1,6 @@
 \name{readsample}
 \alias{readsample}
-%- Also NEED an '\alias' for EACH other topic documented here.
+
 \title{ Read Phylocom sample }
 \description{
   Reads a Phylocom sample file and converts to a community data matrix
@@ -8,7 +8,7 @@
 \usage{
 readsample(filename = "")
 }
-%- maybe also 'usage' for other objects documented here.
+
 \arguments{
   \item{filename}{ Phylocom sample file path }
 }
@@ -16,6 +16,6 @@
 \value{
   Community data matrix
 }
-\references{ Webb et al. 2007. Phylocom. }
+\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> and Cam Webb <cwebb at oeb.harvard.edu> }
 \keyword{IO}

Modified: pkg/man/sample2matrix.Rd
===================================================================
--- pkg/man/sample2matrix.Rd	2008-05-29 18:15:56 UTC (rev 76)
+++ pkg/man/sample2matrix.Rd	2008-05-31 07:32:44 UTC (rev 77)
@@ -1,18 +1,22 @@
 \name{sample2matrix}
 \alias{sample2matrix}
-%- Also NEED an '\alias' for EACH other topic documented here.
+
 \title{ Convert Phylocom sample to community data matrix }
 \description{
-  Convert Phylocom sample to community data matrix
+  Convert a Phylocom sample to community data matrix
 }
 \usage{
 sample2matrix(x)
 }
-%- maybe also 'usage' for other objects documented here.
+
 \arguments{
-  \item{x}{ Phylocom sample formatted data frame }
+  \item{x}{ Phylocom sample formatted data frame, a data frame with three columns:
+    \item{Column 1}{Community name}
+    \item{Column 2}{Species abundance}
+    \item{Column 3}{Species name}        
+  }
 }
 
-\references{ Webb et al. 2007. Phylocom. }
+\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> }
 \keyword{IO}

Modified: pkg/man/ses.mnnd.Rd
===================================================================
--- pkg/man/ses.mnnd.Rd	2008-05-29 18:15:56 UTC (rev 76)
+++ pkg/man/ses.mnnd.Rd	2008-05-31 07:32:44 UTC (rev 77)
@@ -1,27 +1,43 @@
 \name{ses.mnnd}
-\alias{nti}
 \alias{ses.mnnd}
 
-\title{ Nearest Taxon Index }
+\title{ Standardized effect size of MNND }
 \description{
-  Nearest Taxon Index of community phylogenetic structure
+  Standardized effect size of mean nearest neighbour distances in communities. When used with a phylogenetic distance matrix, equivalent to -1 times the Nearest Taxon Index (NTI).
 }
 \usage{
-ses.mnnd(samp, dis, null.model = c("taxa.labels", "sample.pool", "phylogeny.pool", "weighted.sample.pool"), runs = 99)
+ses.mnnd(samp, dis, null.model = c("taxa.labels", "sample.pool",
+    "phylogeny.pool", "weighted.sample.pool"), runs = 99)
 }
 
 \arguments{
   \item{samp}{ Community data matrix }
-  \item{dis}{ Cophenetic phylogenetic distance matrix }
-  \item{null.model}{ Choice of null models }
+  \item{dis}{ Distance matrix (generally a phylogenetic distance matrix)}
+  \item{null.model}{ Null model to use 
+    \item{taxa.labels}{Shuffle distance matrix labels (across all taxa included in distance matrix)}
+    \item{sample.pool}{Randomize community data matrix by drawing species from pool of species occurring in at least one community (sample pool) with equal probability}  
+    \item{phylogeny.pool}{Randomize community data matrix by drawing species from pool of species occurring in the distance matrix (phylogeny pool) with equal probability}  
+    \item{weighted.sample.pool}{Randomize community data matrix by drawing species from sample pool with probability weighted by occurrence frequency}
+  }
   \item{runs}{ Number of randomizations }
 }
 
 \value{
-  Data frame of results
+  A data frame of results for each community
+  \item{ntaxa}{Number of taxa in community}
+  \item{mpd.obs}{Observed MNND in community}
+  \item{mpd.rand.mean}{Mean MNND in null communities}
+  \item{mpd.rand.sd}{Standard deviation of MNND in null communities}
+  \item{mpd.obs.rank}{Rank of observed MNND vs. null communities}
+  \item{mpd.obs.z}{Standardized effect size of MNND vs. null communities (= mpd.obs - mpd.rand.mean / mpd.rand.sd, equivalent to -NTI)}
+  \item{mpd.obs.p}{P-value (quantile) of observed MNND vs. null communities (= mpd.obs.rank / runs + 1)}
+  \item{runs}{Number of randomizations}  
 }
-\references{ Webb et al. 2002, 2007 }
+\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> }
 \section{Warning }{Weighted sample pool null ONLY works with presence-absence data} 
 \seealso{ \code{\link{mnnd}} }
+\examples{
+data(phylocom)
+ses.mnnd(phylocom$sample, cophenetic(phylocom$phylo),null.model="taxa.labels")}
 \keyword{univar}

Modified: pkg/man/ses.mpd.Rd
===================================================================
--- pkg/man/ses.mpd.Rd	2008-05-29 18:15:56 UTC (rev 76)
+++ pkg/man/ses.mpd.Rd	2008-05-31 07:32:44 UTC (rev 77)
@@ -1,27 +1,43 @@
 \name{ses.mpd}
-\alias{nri}
 \alias{ses.mpd}
-%- Also NEED an '\alias' for EACH other topic documented here.
-\title{ Net Relatedness Index }
+
+\title{ Standardized effect size of mpd }
 \description{
-  Net Relatedness Index of community phylogenetic structure
+  Standardized effect size of mean pairwise distances in communities. When used with a phylogenetic distance matrix, equivalent to -1 times the Nearest Relative Index (NRI).
 }
 \usage{
-ses.mpd(samp, dis, null.model = c("taxa.labels", "sample.pool", "phylogeny.pool", "weighted.sample.pool"), runs = 99)
+ses.mpd(samp, dis, null.model = c("taxa.labels", "sample.pool",
+    "phylogeny.pool", "weighted.sample.pool"), runs = 99)
 }
-%- maybe also 'usage' for other objects documented here.
+
 \arguments{
   \item{samp}{ Community data matrix }
-  \item{dis}{ Cophenetic phylogenetic distance matrix }
-  \item{null.model}{ Choice of null models }
+  \item{dis}{ Distance matrix (generally a phylogenetic distance matrix)}
+  \item{null.model}{ Null model to use 
+    \item{taxa.labels}{Shuffle distance matrix labels (across all taxa included in distance matrix)}
+    \item{sample.pool}{Randomize community data matrix by drawing species from pool of species occurring in at least one community (sample pool) with equal probability}  
+    \item{phylogeny.pool}{Randomize community data matrix by drawing species from pool of species occurring in the distance matrix (phylogeny pool) with equal probability}  
+    \item{weighted.sample.pool}{Randomize community data matrix by drawing species from sample pool with probability weighted by occurrence frequency}
+  }
   \item{runs}{ Number of randomizations }
 }
 
 \value{
-  Data frame of results
+  A data frame of results for each community
+  \item{ntaxa}{Number of taxa in community}
+  \item{mpd.obs}{Observed mpd in community}
+  \item{mpd.rand.mean}{Mean mpd in null communities}
+  \item{mpd.rand.sd}{Standard deviation of mpd in null communities}
+  \item{mpd.obs.rank}{Rank of observed mpd vs. null communities}
+  \item{mpd.obs.z}{Standardized effect size of mpd vs. null communities (= mpd.obs - mpd.rand.mean / mpd.rand.sd, equivalent to -NRI)}
+  \item{mpd.obs.p}{P-value (quantile) of observed mpd vs. null communities (= mpd.obs.rank / runs + 1)}
+  \item{runs}{Number of randomizations}  
 }
-\references{ Webb et al. 2002, 2007 }
+\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> }
 \section{Warning }{Weighted sample pool null ONLY works with presence-absence data} 
 \seealso{ \code{\link{mpd}} }
+\examples{
+data(phylocom)
+ses.mpd(phylocom$sample, cophenetic(phylocom$phylo),null.model="taxa.labels")}
 \keyword{univar}

Modified: pkg/man/species.dist.Rd
===================================================================
--- pkg/man/species.dist.Rd	2008-05-29 18:15:56 UTC (rev 76)
+++ pkg/man/species.dist.Rd	2008-05-31 07:32:44 UTC (rev 77)
@@ -1,9 +1,9 @@
 \name{species.dist}
 \alias{species.dist}
-%- Also NEED an '\alias' for EACH other topic documented here.
-\title{ Compute various indices of species co-occurrence }
+
+\title{ Species co-occurrence distances}
 \description{
-  Compute various indices of species co-occurrence
+  Compute interspecific distances based on patterns of species co-occurrence in communities
 }
 
 \usage{
@@ -12,14 +12,22 @@
 
 \arguments{
   \item{x}{ Community data matrix }
-  \item{metric}{ Distance metric to use (COij, Jaccard, ROij) }
+  \item{metric}{ 
+    \item{cij}{ Schoener's index of co-occurrence }
+    \item{jaccard}{ Jaccard index of co-occurrence }
+    \item{checkerboard}{ Checkerboard index of co-occurrence }
+    \item{roij}{ ROij index of co-occurrence }    
+  }
 }
 
 \value{
-  dist object
+  A \code{dist} object with co-occurrences among all species pairs
 }
 
 \author{ Steve Kembel <skembel at berkeley.edu> }
-
+\references{
+Hardy, O. In press. Testing the spatial phylogenetic structure of local communities : 
+statistical performances of different null models and test statistics on a locally neutral community. Journal of Ecology.
+}
 \seealso{ \code{\link[vegan]{vegdist}} }
 \keyword{univar}

Modified: pkg/man/utility.Rd
===================================================================
--- pkg/man/utility.Rd	2008-05-29 18:15:56 UTC (rev 76)
+++ pkg/man/utility.Rd	2008-05-31 07:32:44 UTC (rev 77)
@@ -21,25 +21,20 @@
 sortColumns(x)
 sortRows(x)
 taxaShuffle(x)
-match.tree(phy, x, taxacol, traitcol, strict = FALSE)
 }
 
 \arguments{
     \item{phy}{ phylo object }
     \item{x}{ A data.frame, matrix or dist object }
     \item{colID}{ Numeric or character ID of column to include }
-  \item{int.node}{ internal node number }
-  \item{return.names}{ TRUE or FALSE }
-  \item{scaled}{ Scale contrasts by branch length }
-  \item{taxacol} {column with taxa names}
-  \item{traitcol} {column with trait values}
-  \item{strict} {logical indicating whether matching should be strict or not}
-  \item{...}{Additional arguments}
+    \item{int.node}{ internal node number }
+    \item{return.names}{ TRUE or FALSE }
+    \item{scaled}{ Scale contrasts by branch length }
+    \item{...}{Additional arguments}
 }
 
 \value{
   \item{df2vec}{A named vector}
-  \item{match.tree}{ ?????????????}
   \item{internal2tips}{Vector of tips descended from a node}
   \item{node.age}{Phylo object with phylo\$ages vector of node ages corresponding to phylo\$edge}
   \item{phylo2phylog}{An ade4 phylog}
@@ -53,5 +48,5 @@
   Various utility functions for manipulating trees, data, etc.
 }
 
-\author{ Steven Kembel <skembel at berkeley.edu>, David Ackerly <dackerly at berkeley.edu> }
+\author{ Steven Kembel <skembel at berkeley.edu>, Peter Cowan <pdc at berkeley.edu>, David Ackerly <dackerly at berkeley.edu> }
 \keyword{manip}

Modified: pkg/man/writesample.Rd
===================================================================
--- pkg/man/writesample.Rd	2008-05-29 18:15:56 UTC (rev 76)
+++ pkg/man/writesample.Rd	2008-05-31 07:32:44 UTC (rev 77)
@@ -1,9 +1,9 @@
 \name{writesample}
 \alias{writesample}
-%- Also NEED an '\alias' for EACH other topic documented here.
+
 \title{ Write a Phylocom community sample file }
 \description{
-  Write a Phylocom community sample file
+  Write a community data matrix to a Phylocom community sample file
 }
 \usage{
 writesample(community, filename = "")
@@ -13,6 +13,6 @@
   \item{community}{ Community data matrix }
   \item{filename}{ Filename path }
 }
-\references{ Webb et al. 2007. Phylocom. }
+\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> }
 \keyword{file}

Modified: pkg/man/writetraits.Rd
===================================================================
--- pkg/man/writetraits.Rd	2008-05-29 18:15:56 UTC (rev 76)
+++ pkg/man/writetraits.Rd	2008-05-31 07:32:44 UTC (rev 77)
@@ -12,10 +12,10 @@
 \arguments{
   \item{trt}{ Data frame containing trait data }
   \item{file}{ Filename path }
-  \item{bin}{ Vector index of trait columns to be treated as binary  }
+  \item{bin}{ Vector index of trait columns to be treated as binary }
   \item{sigd}{ Significant digits for output }
 }
 
-\references{ Webb et al. 2007. Phylocom. }
+\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{ David Ackerly <dackerly at berkeley.edu> and Steve Kembel <skembel at berkeley.edu> }
 \keyword{file}



More information about the Picante-commits mailing list