[Vegan-commits] r1340 - in pkg/vegan: . R inst

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Nov 1 14:20:43 CET 2010


Author: jarioksa
Date: 2010-11-01 14:20:43 +0100 (Mon, 01 Nov 2010)
New Revision: 1340

Modified:
   pkg/vegan/DESCRIPTION
   pkg/vegan/R/summary.prc.R
   pkg/vegan/inst/ChangeLog
Log:
prc folded coefficients wrongly: reported & fixed by Cajo ter Braak

Modified: pkg/vegan/DESCRIPTION
===================================================================
--- pkg/vegan/DESCRIPTION	2010-10-21 08:05:43 UTC (rev 1339)
+++ pkg/vegan/DESCRIPTION	2010-11-01 13:20:43 UTC (rev 1340)
@@ -1,7 +1,7 @@
 Package: vegan
 Title: Community Ecology Package
-Version: 1.18-14
-Date: October 15, 2010
+Version: 1.18-15
+Date: November 1, 2010
 Author: Jari Oksanen, F. Guillaume Blanchet, Roeland Kindt, Pierre Legendre, 
    R. B. O'Hara, Gavin L. Simpson, Peter Solymos, M. Henry H. Stevens, 
    Helene Wagner  

Modified: pkg/vegan/R/summary.prc.R
===================================================================
--- pkg/vegan/R/summary.prc.R	2010-10-21 08:05:43 UTC (rev 1339)
+++ pkg/vegan/R/summary.prc.R	2010-11-01 13:20:43 UTC (rev 1340)
@@ -1,5 +1,5 @@
-"summary.prc" <-
-    function (object, axis = 1, scaling = 2, digits = 4, ...) 
+`summary.prc` <-
+    function (object, axis = 1, scaling = 2, digits = 4, ...)
 {
     species <- drop(scores(object, scaling = scaling, display="sp", choices=axis))
     b <- coef(object)[, axis]
@@ -8,12 +8,12 @@
     lenb <- length(b)
     b <- b[-(1:(2 * prnk))]
     bx <- b[1:(lentreat - 1)]
-    by <- b[lentreat:length(b)]
+    by <- b[lentreat:length(b)] + rep(bx, each = length(object$terminfo$xlev[[1]])-1)
     b <- cbind(bx, matrix(by, nrow = lentreat - 1, byrow = TRUE))
     rownames(b) <- (object$terminfo$xlev[[2]])[-1]
     colnames(b) <- object$terminfo$xlev[[1]]
-    out <- list(sp = species, coefficients = b, names = names(object$terminfo$xlev), 
-                corner = (object$terminfo$xlev[[2]])[1], call = object$call, 
+    out <- list(sp = species, coefficients = b, names = names(object$terminfo$xlev),
+                corner = (object$terminfo$xlev[[2]])[1], call = object$call,
                 digits = digits)
     class(out) <- "summary.prc"
     out

Modified: pkg/vegan/inst/ChangeLog
===================================================================
--- pkg/vegan/inst/ChangeLog	2010-10-21 08:05:43 UTC (rev 1339)
+++ pkg/vegan/inst/ChangeLog	2010-11-01 13:20:43 UTC (rev 1340)
@@ -2,8 +2,13 @@
 
 VEGAN DEVEL VERSIONS at http://r-forge.r-project.org/
 
-Version 1.18-14 (opened October 15, 2010)
+Version 1.18-15 (opened November 1, 2010)
 
+	* prc: coefficients folded in a wrong way. Diagnosed, reported and
+	fixed by Cajo ter Braak.
+
+Version 1.18-14 (closed November 1, 2010)
+
 	* treedist: works now with zero-height trees (for instance, only
 	one item in a tree).  Function gained a new argument 'relative'
 	(defaults TRUE): if FALSE, finds raw dissimilarities of tree



More information about the Vegan-commits mailing list