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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sun Sep 26 16:48:29 CEST 2010


Author: jarioksa
Date: 2010-09-26 16:48:29 +0200 (Sun, 26 Sep 2010)
New Revision: 1319

Modified:
   pkg/vegan/R/decorana.R
Log:
use rowSums/colSums instead of apply()

Modified: pkg/vegan/R/decorana.R
===================================================================
--- pkg/vegan/R/decorana.R	2010-09-26 14:45:07 UTC (rev 1318)
+++ pkg/vegan/R/decorana.R	2010-09-26 14:48:29 UTC (rev 1319)
@@ -37,9 +37,9 @@
     }
     v <- attr(veg, "v")
     v.fraction <- attr(veg, "fraction")
-    adotj <- apply(veg, 2, sum)
+    adotj <- colSums(veg)
     adotj[adotj < Const3] <- Const3
-    aidot <- apply(veg, 1, sum)
+    aidot <- rowSums(veg)
     tot <- sum(adotj)
     yeig1 <- rep(1, nc)
     xeig1 <- rep(1, nr)



More information about the Vegan-commits mailing list