[Vegan-commits] r849 - in pkg/vegan: R inst
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue Jun 2 10:04:37 CEST 2009
Author: jarioksa
Date: 2009-06-02 10:04:30 +0200 (Tue, 02 Jun 2009)
New Revision: 849
Modified:
pkg/vegan/R/RsquareAdj.R
pkg/vegan/inst/ChangeLog
Log:
RsquareAdj.cca returns value of R2, but NA for adjusted R2
Modified: pkg/vegan/R/RsquareAdj.R
===================================================================
--- pkg/vegan/R/RsquareAdj.R 2009-06-01 09:23:02 UTC (rev 848)
+++ pkg/vegan/R/RsquareAdj.R 2009-06-02 08:04:30 UTC (rev 849)
@@ -29,7 +29,11 @@
RsquareAdj.cca <-
function(x, ...)
{
- NA
+ R2 <- x$CCA$tot.chi/x$tot.chi
+ m <- x$CCA$rank
+ n <- 1 + m + x$CA$rank + ifelse(is.null(x$pCCA), 0, x$pCCA$rank)
+ radj <- NA
+ list(r.squared = R2, adj.r.squared = radj)
}
## Linear model: take the result from the summary
@@ -48,4 +52,3 @@
else
NA
}
-
Modified: pkg/vegan/inst/ChangeLog
===================================================================
--- pkg/vegan/inst/ChangeLog 2009-06-01 09:23:02 UTC (rev 848)
+++ pkg/vegan/inst/ChangeLog 2009-06-02 08:04:30 UTC (rev 849)
@@ -4,6 +4,8 @@
Version 1.16-19 (opened May 14, 2009)
+ * RsquareAdj.cca: returns R2, but no adjusted R2 (which is NA).
+
* kendall.global: fixed a bug that caused incorrect counts of ties
in large data sets.
More information about the Vegan-commits
mailing list