[Vegan-commits] r2965 - in pkg/vegan: R data inst man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Sep 23 15:09:35 CEST 2015


Author: jarioksa
Date: 2015-09-23 15:09:34 +0200 (Wed, 23 Sep 2015)
New Revision: 2965

Added:
   pkg/vegan/data/BCI.env.rda
Modified:
   pkg/vegan/R/metaMDS.R
   pkg/vegan/R/monoMDS.R
   pkg/vegan/inst/NEWS.Rd
   pkg/vegan/man/BCI.Rd
Log:
Merge branch 'cran-2.3' into r-forge-svn-local

Modified: pkg/vegan/R/metaMDS.R
===================================================================
--- pkg/vegan/R/metaMDS.R	2015-09-21 06:37:06 UTC (rev 2964)
+++ pkg/vegan/R/metaMDS.R	2015-09-23 13:09:34 UTC (rev 2965)
@@ -16,7 +16,7 @@
     ## metaMDS was written for community data which should be all
     ## positive. Check this here, and set arguments so that they are
     ## suitable for non-negative data.
-    if (any(autotransform, noshare > 0, wascores) && any(comm < 0)) {
+    if (any(autotransform, noshare > 0, wascores) && any(comm < 0, na.rm=TRUE)) {
         warning("'comm' has negative data: 'autotransform', 'noshare' and 'wascores' set to FALSE")
         wascores <- FALSE
         autotransform <- FALSE

Modified: pkg/vegan/R/monoMDS.R
===================================================================
--- pkg/vegan/R/monoMDS.R	2015-09-21 06:37:06 UTC (rev 2964)
+++ pkg/vegan/R/monoMDS.R	2015-09-23 13:09:34 UTC (rev 2965)
@@ -10,7 +10,7 @@
           && ncol(dist) == nrow(dist)
           && isTRUE(all.equal(dist[lower.tri(dist)], t(dist)[lower.tri(dist)]))))
         stop("'dist' must be a distance object (class \"dist\") or a symmetric square matrix")
-    if (any(dist < -sqrt(.Machine$double.eps)))
+    if (any(dist < -sqrt(.Machine$double.eps), na.rm = TRUE))
         warning("some dissimilarities are negative -- is this intentional?")
     ## match.arg
     model <- match.arg(model)

Added: pkg/vegan/data/BCI.env.rda
===================================================================
--- pkg/vegan/data/BCI.env.rda	                        (rev 0)
+++ pkg/vegan/data/BCI.env.rda	2015-09-23 13:09:34 UTC (rev 2965)
@@ -0,0 +1,2 @@
+‹      r‰0âŠàb```b`fbb`b2Y˜€#'fwröÔKÍ+c``rÙ€˜ˆ•%6¿—š¿0-YM-åL-ÍM$}™8Zf6q´l2q´œ6‘ôgâhùÝÄÐðxÑ»÷ðGàëVG½û+!ôƒBýÐB?b„Уêè¡'¼ xa`à|4<0Ì?Ã3ÃüÃ4À˜‘:æ ßl9©e©9Å@– X"Ê”lg£é`MÎI,†i€“–˜\’_dýC
+0ÆáAÞgúæc¦$ˆ3ºJX ]^bn*,èØ`ÊCC|õ\Ñy~ÁPo at QjrfAfIbIf~TÓgÈìŽé©zɉ%0®{j~N~z%çq¥$–$꥝‚æ<΢ür=˜AqÈÔÀ F¿0ü ë,‹  
\ No newline at end of file

Modified: pkg/vegan/inst/NEWS.Rd
===================================================================
--- pkg/vegan/inst/NEWS.Rd	2015-09-21 06:37:06 UTC (rev 2964)
+++ pkg/vegan/inst/NEWS.Rd	2015-09-23 13:09:34 UTC (rev 2965)
@@ -42,6 +42,9 @@
       addition, the deparsed expression for \code{comm} is now robust to
       long expressions.  Reported by Richard Telford.
 
+      \item \code{metaMDS} and \code{monoMDS} did not accept missing
+      values in dissimilarities.
+
       \item Function \code{rarecurve} did not check its input and this
       could cause confusing error messages. Now function checks that
       input data are integers that can be interpreted as counts on
@@ -67,6 +70,11 @@
      results of constrained ordination (\code{cca}, \code{rda},
      \code{capscale}) and further analysed with \code{permustats}
      function.
+
+     \item Added environmental data set \code{BCI.env} to the Barro
+     Colorado Island tree data. Most useful variables are the UTM
+     coordinates of sample plots. Other variables are constant or nearly
+     constant and of little use in normal analysis.
      
    }
   } % new features and functions

Modified: pkg/vegan/man/BCI.Rd
===================================================================
--- pkg/vegan/man/BCI.Rd	2015-09-21 06:37:06 UTC (rev 2964)
+++ pkg/vegan/man/BCI.Rd	2015-09-23 13:09:34 UTC (rev 2965)
@@ -1,12 +1,17 @@
 \encoding{UTF-8}
 \name{BCI}
 \alias{BCI}
+\alias{BCI.env}
 \docType{data}
 \title{Barro Colorado Island Tree Counts}
 \description{
-  Tree counts in 1-hectare plots in the Barro Colorado Island.
+  Tree counts in 1-hectare plots in the Barro Colorado Island and
+  associated site information.
 }
-\usage{data(BCI)}
+\usage{
+data(BCI)
+data(BCI.env)
+}
 \format{
   
   A data frame with 50 plots (rows) of 1 hectare with counts of trees
@@ -17,6 +22,18 @@
   \url{http://datadryad.org/resource/doi:10.5061/dryad.63q27} (Zanne
   et al., 2014).
 
+  For \code{BCI.env}, a data frame with 50 plots (rows) and six site
+  variables:
+
+  \describe{
+    \item{\code{UTM.EW}: }{UTM coordinates (zone 17N) East-West}
+    \item{\code{UTM.NS}: }{UTM coordinates (zone 17N) North-South}
+    \item{\code{Precipitation}: }{Precipitation in mm per year}
+    \item{\code{Elevation}: }{Elevation in m above sea level}
+    \item{\code{Age.cat}: }{Forest age category}
+    \item{\code{Geology}: }{The Underlying geological formation}
+  }
+
  }
 \details{
   Data give the numbers of trees at least 10 cm in
@@ -27,9 +44,12 @@
   The data frame contains only the Barro Colorado Island subset of the
   original data.
 
-  The quadrats are located in a regular grid. See \code{examples} for the
-  coordinates. 
+  The quadrats are located in a regular grid. See \code{BCI.env} for the
+  coordinates.
 
+  A full description of the site information in \code{BCI.env} is given
+  in Pyke et al (2001)
+
 }
 \source{
   \url{http://www.sciencemag.org/cgi/content/full/295/5555/666/DC1}
@@ -52,14 +72,14 @@
   of angiosperms into freezing environments. \emph{Nature}
   doi:10.1038/nature12872 (published online Dec 22, 2013).
 
+  Pyke, C. R., Condit, R., Aguilar, S., & Lao, S. (2001). Floristic
+  composition across a climatic gradient in a neotropical lowland
+  forest. \emph{Journal of Vegetation Science} 12, 553--566.
+  doi:10.2307/3237007 
+
 }
-\seealso{\code{\link[BiodiversityR]{BCI.env}} in \pkg{BiodiversityR}
-  package for environmental data  (coordinates are given below in the
-  \code{examples}).}  
 \examples{
-data(BCI)
-## UTM Coordinates (in metres)
-UTM.EW <- rep(seq(625754, 626654, by=100), each=5)
-UTM.NS <- rep(seq(1011569,  1011969, by=100), len=50)
+data(BCI, BCI.env)
+head(BCI.env)
 }
 \keyword{datasets}



More information about the Vegan-commits mailing list