[Vegan-commits] r1071 - in pkg/vegan: R inst
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sat Nov 28 23:10:00 CET 2009
Author: jarioksa
Date: 2009-11-28 23:09:59 +0100 (Sat, 28 Nov 2009)
New Revision: 1071
Modified:
pkg/vegan/R/bstick.cca.R
pkg/vegan/inst/ChangeLog
Log:
bstick.cca refuses to handle capscale result with negative eigenvalues, because I have no clue how to do this
Modified: pkg/vegan/R/bstick.cca.R
===================================================================
--- pkg/vegan/R/bstick.cca.R 2009-11-18 16:34:26 UTC (rev 1070)
+++ pkg/vegan/R/bstick.cca.R 2009-11-28 22:09:59 UTC (rev 1071)
@@ -5,7 +5,11 @@
stop("'n' not of class \"cca\" or \"rda\"")
if(!is.null(n$CCA))
stop("'bstick' only for unconstrained models.")
- ## need to select appropriate total invertia
+ ## No idea how to define bstick for capscale with negative
+ ## eigenvalues
+ if (inherits(n, "capscale") && !is.null(n$CA$imaginary.rank))
+ stop("'bstick' cannot be used for 'capscale' with imaginary component")
+ ## need to select appropriate total inertia
tot.chi <- n$CA$tot.chi
n.comp <- n$CA$rank
res <- bstick.default(n.comp, tot.chi, ...)
Modified: pkg/vegan/inst/ChangeLog
===================================================================
--- pkg/vegan/inst/ChangeLog 2009-11-18 16:34:26 UTC (rev 1070)
+++ pkg/vegan/inst/ChangeLog 2009-11-28 22:09:59 UTC (rev 1071)
@@ -9,6 +9,10 @@
* spandepth: New function to find the depths of nodes in a
spanning tree from spantree() function. Per request of
W. E. Sharp.
+
+ * bstick: refuses to analyse capscale() models with imaginary
+ components because I have no idea how to do it. Reported by
+ Richard Telford, Bergen.
Version 1.16-32 (closed November 13, 2009)
More information about the Vegan-commits
mailing list