[Picante-commits] r131 - branches/gsoc/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Jul 9 08:17:49 CEST 2008


Author: mrhelmus
Date: 2008-07-09 08:17:49 +0200 (Wed, 09 Jul 2008)
New Revision: 131

Modified:
   branches/gsoc/R/specaccum.psr.R
Log:
Fixed Bug: added na.rm=TRUE to deal with the NAs returned by psv

Modified: branches/gsoc/R/specaccum.psr.R
===================================================================
--- branches/gsoc/R/specaccum.psr.R	2008-07-09 02:37:51 UTC (rev 130)
+++ branches/gsoc/R/specaccum.psr.R	2008-07-09 06:17:49 UTC (rev 131)
@@ -35,8 +35,8 @@
     perm[, i]<-r.x
   }
   sites <- 1:n
-  specaccum <- apply(perm, 1, mean)
-  sdaccum <- apply(perm, 1, sd)
+  specaccum <- apply(perm, 1, mean, na.rm=TRUE)
+  sdaccum <- apply(perm, 1, sd, na.rm=TRUE)
   out <- list(call = match.call(), method = method, sites = sites, richness = specaccum, sd = sdaccum, perm = perm)
   class(out) <- "specaccum"
   out



More information about the Picante-commits mailing list