[Vegan-commits] r425 - in pkg: . R inst

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Jun 16 06:28:14 CEST 2008


Author: jarioksa
Date: 2008-06-16 06:28:14 +0200 (Mon, 16 Jun 2008)
New Revision: 425

Modified:
   pkg/DESCRIPTION
   pkg/R/scores.rda.R
   pkg/inst/ChangeLog
Log:
scores.rda scaling=0 returns unmodified scores (like documented) without general scaling constant

Modified: pkg/DESCRIPTION
===================================================================
--- pkg/DESCRIPTION	2008-06-12 15:16:23 UTC (rev 424)
+++ pkg/DESCRIPTION	2008-06-16 04:28:14 UTC (rev 425)
@@ -1,7 +1,7 @@
 Package: vegan
 Title: Community Ecology Package
-Version: 1.14-4
-Date: June 9, 2008
+Version: 1.14-5
+Date: June 16, 2008
 Author: Jari Oksanen, Roeland Kindt, Pierre Legendre, Bob O'Hara, Gavin L. Simpson, 
    Peter Solymos, M. Henry H. Stevens, Helene Wagner  
 Maintainer: Jari Oksanen <jari.oksanen at oulu.fi>

Modified: pkg/R/scores.rda.R
===================================================================
--- pkg/R/scores.rda.R	2008-06-12 15:16:23 UTC (rev 424)
+++ pkg/R/scores.rda.R	2008-06-16 04:28:14 UTC (rev 425)
@@ -33,24 +33,27 @@
                 v <- sweep(v, 1, x$colsum, "/")
                 v <- v * sqrt(x$tot.chi / (max(nrow(x$CA$u), nrow(x$CCA$u)) - 1 ))
             }
+            v <- const * v
         }
-        sol$species <- const * v
+        sol$species <- v
     }
     if ("sites" %in% take) {
         wa <- cbind(x$CCA$wa, x$CA$u)[, choices, drop=FALSE]
         if (scaling) {
             scal <- list(slam, 1, sqrt(slam))[[abs(scaling)]]
             wa <- sweep(wa, 2, scal, "*")
+            wa <- const * wa
         }
-        sol$sites <- const * wa
+        sol$sites <- wa
     }
     if ("constraints" %in% take) {
         u <- cbind(x$CCA$u, x$CA$u)[, choices, drop=FALSE]
         if (scaling) {
             scal <- list(slam, 1, sqrt(slam))[[abs(scaling)]]
             u <- sweep(u, 2, scal, "*")
+            u <- const * u
         }
-        sol$constraints <- const * u
+        sol$constraints <- u
     }
     if ("biplot" %in% take && !is.null(x$CCA$biplot)) {
         b <- matrix(0, nrow(x$CCA$biplot), length(choices))
@@ -70,8 +73,9 @@
             if (scaling) {
                 scal <- list(slam, 1, sqrt(slam))[[abs(scaling)]]
                 cn <- sweep(cn, 2, scal, "*")
+                cn <- const * cn
             }
-            sol$centroids <- const * cn
+            sol$centroids <- cn
         }
     }  
     if (length(sol) == 1) 

Modified: pkg/inst/ChangeLog
===================================================================
--- pkg/inst/ChangeLog	2008-06-12 15:16:23 UTC (rev 424)
+++ pkg/inst/ChangeLog	2008-06-16 04:28:14 UTC (rev 425)
@@ -2,8 +2,14 @@
 
 VEGAN DEVEL VERSIONS at http://r-forge.r-project.org/
 
-Version 1.14-4 (opened June 9, 2008)
+Version 1.14-5 (opened June 16, 2008)
 
+	* scores.rda: scaling = 0 returns now unmodified scores from the
+	object (like documented) without multiplying by the scaling
+	constant. 
+	
+Version 1.14-4 (closed June 12, 2008)
+
         * permatfull, permatswap and swapcount: functions to generate 
         unrestricted and restricted null model community data matrices
         under diferent constraints (preserving row/columnsums, 



More information about the Vegan-commits mailing list