[Vegan-commits] r2319 - in pkg/vegan: R man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Oct 9 18:54:31 CEST 2012


Author: psolymos
Date: 2012-10-09 18:54:31 +0200 (Tue, 09 Oct 2012)
New Revision: 2319

Modified:
   pkg/vegan/R/clamtest.R
   pkg/vegan/man/clamtest.Rd
Log:
bugfix and Rd clarification for clamtest

Modified: pkg/vegan/R/clamtest.R
===================================================================
--- pkg/vegan/R/clamtest.R	2012-10-09 16:11:20 UTC (rev 2318)
+++ pkg/vegan/R/clamtest.R	2012-10-09 16:54:31 UTC (rev 2319)
@@ -97,7 +97,7 @@
     tmp <- ifelse(cbind(gen, specY, specX, sr), 1, 0)
     types <- c("Generalist", paste("Specialist", glabel[1], sep="_"),
         paste("Specialist", glabel[2], sep="_"), "Too_rare")
-    classes <- as.factor((1:4)[rowSums(tmp*col(tmp))])
+    classes <- as.factor((1:4)[rowSums(tmp*col(tmp))], levels=1:4)
     levels(classes) <- c("Generalist", paste("Specialist", glabel[1], sep="_"),
         paste("Specialist", glabel[2], sep="_"), "Too_rare")
     tab <- data.frame(Species=spp, y=Y, x=X, Classes=classes)

Modified: pkg/vegan/man/clamtest.Rd
===================================================================
--- pkg/vegan/man/clamtest.Rd	2012-10-09 16:11:20 UTC (rev 2318)
+++ pkg/vegan/man/clamtest.Rd	2012-10-09 16:54:31 UTC (rev 2319)
@@ -24,7 +24,8 @@
 }
   \item{groups}{
 A vector identifying the two habitats. Must have exactly
-two unique values or levels.
+two unique values or levels. Habitat IDs in the grouping vector
+must match corresponding rows in the community matrix \code{comm}.
 }
   \item{coverage.limit}{
 Integer, the sample coverage based correction 



More information about the Vegan-commits mailing list