[Vegan-commits] r2953 - in pkg/vegan: . R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed Jul 15 09:20:33 CEST 2015
Author: jarioksa
Date: 2015-07-15 09:20:33 +0200 (Wed, 15 Jul 2015)
New Revision: 2953
Modified:
pkg/vegan/NAMESPACE
pkg/vegan/R/rarecurve.R
Log:
Merge branch 'cran-2.3' into r-forge-svn-local
Modified: pkg/vegan/NAMESPACE
===================================================================
--- pkg/vegan/NAMESPACE 2015-06-16 11:43:02 UTC (rev 2952)
+++ pkg/vegan/NAMESPACE 2015-07-15 07:20:33 UTC (rev 2953)
@@ -73,8 +73,9 @@
import(stats)
import(graphics)
import(permute)
-importFrom(utils, head, tail, str)
+importFrom(utils, browseURL, combn, flush.console, head, object.size, tail, str)
importFrom(tools, Rd2txt, startDynamicHelp)
+import(grDevices) ## too many functions to be listed separately
import(lattice)
importFrom(parallel, mclapply, makeCluster, stopCluster, clusterEvalQ,
parApply, parLapply, parSapply, parRapply, parCapply)
Modified: pkg/vegan/R/rarecurve.R
===================================================================
--- pkg/vegan/R/rarecurve.R 2015-06-16 11:43:02 UTC (rev 2952)
+++ pkg/vegan/R/rarecurve.R 2015-07-15 07:20:33 UTC (rev 2953)
@@ -12,6 +12,13 @@
lty <- par("lty")
tot <- rowSums(x)
S <- specnumber(x)
+ ## remove empty rows or we fail
+ if (any(S <= 1)) {
+ message("empty rows removed")
+ x <- x[S > 0,, drop =FALSE]
+ tot <- tot[S > 0]
+ S <- S[S > 0]
+ }
nr <- nrow(x)
## rep col and lty to appropriate length
col <- rep(col, length.out = nr)
More information about the Vegan-commits
mailing list