[Vegan-commits] r247 - pkg/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Feb 28 07:49:30 CET 2008


Author: jarioksa
Date: 2008-02-28 07:49:30 +0100 (Thu, 28 Feb 2008)
New Revision: 247

Modified:
   pkg/R/bstick.princomp.R
Log:
bstick extracted wrong number of sticks from princomp results (reported by Guy Yollin)

Modified: pkg/R/bstick.princomp.R
===================================================================
--- pkg/R/bstick.princomp.R	2008-02-25 12:24:21 UTC (rev 246)
+++ pkg/R/bstick.princomp.R	2008-02-28 06:49:30 UTC (rev 247)
@@ -4,7 +4,7 @@
     if(!inherits(n, "princomp"))
         stop("'n' not of class \"princomp\"")
     tot.chi <- sum(n$sdev^2)
-    n.comp <- n$n.obs
+    n.comp <- length(n$sdev)
     res <- bstick.default(n.comp, tot.chi, ...)
     names(res) <- dimnames(n$loadings)[[2]]
     res



More information about the Vegan-commits mailing list