[Vegan-commits] r2018 - in pkg/vegan: . R inst man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sun Dec 11 19:30:07 CET 2011


Author: jarioksa
Date: 2011-12-11 19:30:06 +0100 (Sun, 11 Dec 2011)
New Revision: 2018

Added:
   pkg/vegan/R/nestedbetasor.R
Modified:
   pkg/vegan/NAMESPACE
   pkg/vegan/inst/ChangeLog
   pkg/vegan/man/betadiver.Rd
   pkg/vegan/man/nestedtemp.Rd
Log:
implement decomposition of multiple Jaccard & Sorensen into turnover and
nestedness components following Baselga (Global Ecol Biogeog 19, 134-143; 2010)


Modified: pkg/vegan/NAMESPACE
===================================================================
--- pkg/vegan/NAMESPACE	2011-12-06 17:51:55 UTC (rev 2017)
+++ pkg/vegan/NAMESPACE	2011-12-11 18:30:06 UTC (rev 2018)
@@ -13,7 +13,7 @@
 goodness, hiersimu, humpfit, indpower, inertcomp, initMDS,
 intersetcor, isomapdist, isomap, linestack, mantel, meandist,
 metaMDSdist, metaMDSiter, metaMDSredist, MDSrotate, metaMDS, monoMDS,
-mrpp, msoplot, mso, multipart, make.commsim, nestedchecker,
+mrpp, msoplot, mso, multipart, make.commsim, nestedbetajac, nestedbetasor, nestedchecker,
 nesteddisc, nestedn0, nestednodf, nestedtemp, nullmodel, oecosimu,
 ordiR2step, ordiarrows, ordicloud, ordicluster, ordiellipse, ordigrid,
 ordihull, ordilabel, ordiplot3d, ordiplot, ordipointlabel, ordiresids,

Added: pkg/vegan/R/nestedbetasor.R
===================================================================
--- pkg/vegan/R/nestedbetasor.R	                        (rev 0)
+++ pkg/vegan/R/nestedbetasor.R	2011-12-11 18:30:06 UTC (rev 2018)
@@ -0,0 +1,31 @@
+`nestedbetasor` <-
+    function(comm)
+{
+    beta <- betadiver(comm, method = NA)
+    b <- beta$b
+    c <- beta$c
+    diffbc <- sum(abs(b-c))
+    sumbc <- sum(b+c)
+    bmin <- sum(pmin(b, c))
+    a <- sum(comm) - sum(colSums(comm) > 0)
+    simpson <- bmin/(bmin + a)
+    nest <- a/(bmin + a) * diffbc/(2*a + sumbc)
+    sorensen <- sumbc/(2*a + sumbc)
+    c(turnover = simpson, nestedness = nest, sorensen = sorensen)
+}
+
+`nestedbetajac` <-
+    function(comm)
+{
+    beta <- betadiver(comm, method = NA)
+    b <- beta$b
+    c <- beta$c
+    diffbc <- sum(abs(b-c))
+    sumbc <- sum(b+c)
+    bmin <- sum(pmin(b, c))
+    a <- sum(comm) - sum(colSums(comm) > 0)
+    simpson <- 2*bmin/(2*bmin + a)
+    nest <- a/(2*bmin + a) * diffbc/(a + sumbc)
+    jaccard <- sumbc/(a + sumbc)
+    c(turnover = simpson, nestedness = nest, jaccard = jaccard)
+}

Modified: pkg/vegan/inst/ChangeLog
===================================================================
--- pkg/vegan/inst/ChangeLog	2011-12-06 17:51:55 UTC (rev 2017)
+++ pkg/vegan/inst/ChangeLog	2011-12-11 18:30:06 UTC (rev 2018)
@@ -10,6 +10,12 @@
 	https://stat.ethz.ch/pipermail/r-sig-ecology/2011-November/002525.html
 	The behaviour is now corrected in ordimedian() which will return NA
 	for empty factor levels. 
+
+	* nestedbetasor, nestedbetajac: New functions that implement
+	decomposition of Sorensen and Jaccard beta diversities into
+	components of turnover and nestedness following Baselga (Global
+	Ecology and Biogeography 19, 134-143; 2010). These are documented
+	with nestedness indices and are ready to be used with oecosimu().
 	
 	* rarecurve: new function to draw rarefaction curves for each
 	plot, optionally with sample size vertical and corresponding

Modified: pkg/vegan/man/betadiver.Rd
===================================================================
--- pkg/vegan/man/betadiver.Rd	2011-12-06 17:51:55 UTC (rev 2017)
+++ pkg/vegan/man/betadiver.Rd	2011-12-11 18:30:06 UTC (rev 2018)
@@ -98,20 +98,34 @@
   with a warning. }
 
 \references{
-Koleff, P., Gaston, K.J. and Lennon, J.J. (2003) Measuring beta
-diversity for presence-absence data. \emph{Journal of Animal Ecology}
-72, 367--382.
 
-Whittaker, R.H. (1960) Vegetation of Siskiyou mountains, Oregon and
- California. \emph{Ecological Monographs} 30, 279--338.
+  Baselga, A. (2010) Partitioning the turnover and nestedness
+  components of beta diversity. \emph{Global Ecology and Biogeography}
+  19, 134--143.
+
+  Koleff, P., Gaston, K.J. and Lennon, J.J. (2003) Measuring beta
+  diversity for presence-absence data. \emph{Journal of Animal
+  Ecology} 72, 367--382.
+
+  Whittaker, R.H. (1960) Vegetation of Siskiyou mountains, Oregon and
+  California. \emph{Ecological Monographs} 30, 279--338.
+
  }
+
 \author{Jari Oksanen }
 \section{Warning }{Some indices return similarities instead of dissimilarities.} 
 
 \seealso{ \code{\link{designdist}} for an alternative to implement all
-these functions, \code{\link{vegdist}} for some canned alternatives,
-and \code{\link{betadisper}}, \code{\link{adonis}},
-\code{\link{mantel}} for analysing beta diversity objects.}
+  these functions, \code{\link{vegdist}} for some canned alternatives,
+  and \code{\link{betadisper}}, \code{\link{adonis}},
+  \code{\link{mantel}} for analysing beta diversity objects.
+  Functions \code{\link{nestedbetasor}} and
+  \code{\link{nestedbetajac}} implement decomposition beta diversity
+  measures (\enc{Sørensen}{Sorensen} and Jaccard) into turnover and
+  nestedness components following Baselga (2010).
+}
+
+
 \examples{
 ## Raw data and plotting
 data(sipoo)

Modified: pkg/vegan/man/nestedtemp.Rd
===================================================================
--- pkg/vegan/man/nestedtemp.Rd	2011-12-06 17:51:55 UTC (rev 2017)
+++ pkg/vegan/man/nestedtemp.Rd	2011-12-11 18:30:06 UTC (rev 2018)
@@ -5,6 +5,8 @@
 \alias{nestedn0}
 \alias{nesteddisc}
 \alias{nestednodf}
+\alias{nestedbetasor}
+\alias{nestedbetajac}
 \alias{plot.nestedtemp}
 
 \title{ Nestedness Indices for Communities of Islands or Patches }
@@ -22,6 +24,8 @@
 nesteddisc(comm)
 nestedtemp(comm, ...)
 nestednodf(comm, order = TRUE, weighted = FALSE)
+nestedbetasor(comm)
+nestedbetajac(comm)
 \method{plot}{nestedtemp}(x, kind = c("temperature", "incidence"),
     col=rev(heat.colors(100)),  names = FALSE, ...)
 }
@@ -106,8 +110,22 @@
   al. 2008). With \code{weighted = TRUE}, the function finds the
   weighted version of the index (Almeida-Neto & Ulrich,
   2011). However, this requires quantitative null models for adequate
-  testing.}
+  testing.
 
+  Functions \code{nestedbetasor} and \code{nestedbetajac} find
+  multiple-site dissimilarities and decompose these into components of
+  turnover and nestedness following Baselga (2010). This can be seen
+  as a decomposition of beta diversity (see \code{\link{betadiver}}).
+  Function \code{nestedbetasor} uses \enc{Sørensen}{Sorensen}
+  dissimilarity and the turnover component is Simpson dissimilarity
+  (Baselga 2010), and \code{nestedbetajac} uses analogous methods with
+  the Jaccard index. The functions return a vector of three items:
+  turnover, nestedness and their sum which is the multiple
+  \enc{Sørensen}{Sorensen} or Jaccard dissimilarity. The last one is
+  the total beta diversity (Baselga 2010).
+
+}
+
 \value{
   The result returned by a nestedness function contains an item called
   \code{statistic}, but the other components differ among functions. The
@@ -130,6 +148,10 @@
   disorder in the distribution of species in fragmented
   habitat. \emph{Oecologia} 96, 373--382.
 
+  Baselga, A. (2010). Partitioning the turnover and nestedness
+  components of beta diversity. \emph{Global Ecol. Biogeog.} 19,
+  134--143.
+
   Brualdi, R.A. & Sanderson, J.G. (1999). Nested species subsets, gaps,
   and discrepancy. \emph{Oecologia} 119, 256--264.
 



More information about the Vegan-commits mailing list