[Vegan-commits] r490 - in pkg: R inst

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sun Aug 31 19:04:27 CEST 2008


Author: jarioksa
Date: 2008-08-31 19:04:27 +0200 (Sun, 31 Aug 2008)
New Revision: 490

Modified:
   pkg/R/specaccum.R
   pkg/inst/ChangeLog
Log:
specaccum: remove empty species which broke sd estimation in method='exact'

Modified: pkg/R/specaccum.R
===================================================================
--- pkg/R/specaccum.R	2008-08-28 10:39:42 UTC (rev 489)
+++ pkg/R/specaccum.R	2008-08-31 17:04:27 UTC (rev 490)
@@ -4,6 +4,7 @@
 {
     x <- comm
     x <- as.matrix(x)
+    x <- x[, colSums(x) > 0]
     n <- nrow(x)
     p <- ncol(x)
     if (p == 1) {

Modified: pkg/inst/ChangeLog
===================================================================
--- pkg/inst/ChangeLog	2008-08-28 10:39:42 UTC (rev 489)
+++ pkg/inst/ChangeLog	2008-08-31 17:04:27 UTC (rev 490)
@@ -29,6 +29,10 @@
 	needs evaluate the community within calling function. (The
 	environment() drives me absolutely crazy, says J.O.)
 
+	* specaccum: empy (all zeros) species removed from input
+	data. These confused sd estimation in method = "exact" which gave
+	all NA.
+
 	* vegan-internal.Rd: brief documentation of internal functions for
 	developers with some guidelines of good practices.
 	



More information about the Vegan-commits mailing list