[Vegan-commits] r896 - pkg/vegan/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Jul 15 22:46:09 CEST 2009


Author: psolymos
Date: 2009-07-15 22:46:09 +0200 (Wed, 15 Jul 2009)
New Revision: 896

Modified:
   pkg/vegan/R/indpower.R
Log:
as.matrix interfered with ifelse, thus separated

Modified: pkg/vegan/R/indpower.R
===================================================================
--- pkg/vegan/R/indpower.R	2009-07-15 20:09:43 UTC (rev 895)
+++ pkg/vegan/R/indpower.R	2009-07-15 20:46:09 UTC (rev 896)
@@ -1,7 +1,8 @@
 indpower <-
 function(x, type=0)
 {
-    x <- as.matrix(ifelse(x > 0, 1, 0))
+    x <- as.matrix(x)
+    x <- ifelse(x > 0, 1, 0)
     if (NCOL(x) < 2)
         stop("provide at least 2 columns for 'x'")
     if (!(type %in% 0:2))



More information about the Vegan-commits mailing list