[Vegan-commits] r1376 - pkg/vegan/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Thu Nov 18 08:48:48 CET 2010
Author: jarioksa
Date: 2010-11-18 08:48:45 +0100 (Thu, 18 Nov 2010)
New Revision: 1376
Modified:
pkg/vegan/R/vif.cca.R
Log:
qr.X needs pivoting
Modified: pkg/vegan/R/vif.cca.R
===================================================================
--- pkg/vegan/R/vif.cca.R 2010-11-17 19:43:15 UTC (rev 1375)
+++ pkg/vegan/R/vif.cca.R 2010-11-18 07:48:45 UTC (rev 1376)
@@ -6,7 +6,7 @@
names(out)[Q$pivot] <- colnames(Q$qr)
rank <- Q$rank
V <- chol2inv(Q$qr, size = rank)
- X <- qr.X(Q)[, 1:rank,drop=FALSE]
+ X <- qr.X(Q)[, Q$pivot[1:rank], drop=FALSE]
Vi <- crossprod(X)
v1 <- diag(V)
v2 <- diag(Vi)
More information about the Vegan-commits
mailing list