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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Aug 12 18:23:46 CEST 2009


Author: jarioksa
Date: 2009-08-12 18:23:46 +0200 (Wed, 12 Aug 2009)
New Revision: 918

Modified:
   pkg/vegan/R/specpool2vect.R
Log:
simpler specpool2vect (internal beauty)

Modified: pkg/vegan/R/specpool2vect.R
===================================================================
--- pkg/vegan/R/specpool2vect.R	2009-08-12 16:00:20 UTC (rev 917)
+++ pkg/vegan/R/specpool2vect.R	2009-08-12 16:23:46 UTC (rev 918)
@@ -3,7 +3,5 @@
 {
     pool <- attr(X, "pool")
     index <- match.arg(index)
-    sel <- paste("X", index, sep = "$")
-    sel <- eval(parse(text=sel))
-    sel[pool]
+    X[[index]][pool]
 }



More information about the Vegan-commits mailing list