[Ecopd-commits] r41 - pkg/inst/unitTests

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Oct 21 05:18:55 CEST 2009


Author: regetz
Date: 2009-10-21 05:18:55 +0200 (Wed, 21 Oct 2009)
New Revision: 41

Modified:
   pkg/inst/unitTests/runit.indices.R
Log:
updated siteBySpecies unit test to reflect new options


Modified: pkg/inst/unitTests/runit.indices.R
===================================================================
--- pkg/inst/unitTests/runit.indices.R	2009-10-21 03:18:14 UTC (rev 40)
+++ pkg/inst/unitTests/runit.indices.R	2009-10-21 03:18:55 UTC (rev 41)
@@ -60,7 +60,13 @@
     20, 20), .Dim = c(5L, 3L), .Dimnames =
     list(c("Taraxacum_officinale", "Silybum_marianum", "Centaurea_alba",
     "Torilis_arvensis", "Trifolium_repens"), c("A", "B", "C")))
-  checkIdentical(siteBySpecies(comtrees), target)
+  checkIdentical(siteBySpecies(comtrees), t(target))
+  checkIdentical(siteBySpecies(comtrees, transpose=TRUE), target)
+  # presence/absence only
+  target[] <- 1
+  checkIdentical(siteBySpecies(comtrees, presence=TRUE, transpose=TRUE),
+    target)
+
 }
 
 test.richness <- function() {



More information about the Ecopd-commits mailing list