[Vegan-commits] r1620 - in pkg/vegan: R inst tests/Examples

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon May 30 18:03:32 CEST 2011


Author: jarioksa
Date: 2011-05-30 18:03:31 +0200 (Mon, 30 May 2011)
New Revision: 1620

Modified:
   pkg/vegan/R/print.cca.R
   pkg/vegan/inst/ChangeLog
   pkg/vegan/tests/Examples/vegan-Ex.Rout.save
Log:
do not print Proportions if there is only unconstrained component in cca/rda/capscale

Modified: pkg/vegan/R/print.cca.R
===================================================================
--- pkg/vegan/R/print.cca.R	2011-05-30 15:32:40 UTC (rev 1619)
+++ pkg/vegan/R/print.cca.R	2011-05-30 16:03:31 UTC (rev 1620)
@@ -24,6 +24,9 @@
     rownames(tbl) <- rn[c(TRUE, !is.null(x$CA$imaginary.chi), !is.null(x$pCCA),
                           !is.null(x$CCA),  !is.null(x$CA),
                           !is.null(x$CA$imaginary.chi))]
+    ## Remove "Proportion" if only one component
+    if (is.null(x$CCA) && is.null(x$pCCA))
+        tbl <- tbl[,-2]
     printCoefmat(tbl, digits = digits, na.print = "")
     cat("Inertia is", x$inertia, "\n")
     if (!is.null(x$CCA$alias))

Modified: pkg/vegan/inst/ChangeLog
===================================================================
--- pkg/vegan/inst/ChangeLog	2011-05-30 15:32:40 UTC (rev 1619)
+++ pkg/vegan/inst/ChangeLog	2011-05-30 16:03:31 UTC (rev 1620)
@@ -10,6 +10,11 @@
 	specified originally, and if they become zero rank because of
 	aliasing etc, they are returned as zero components (instead of
 	NULL). 
+
+	* print of cca/rda/capscale: do not "Proportion" column in
+	unconstrained ordination which only has one component. However,
+	this will be printed also with zero pCCA or CCA (but not with
+	NULL). 
 	
 Version 1.18-31 (closed May 30, 2011)
 

Modified: pkg/vegan/tests/Examples/vegan-Ex.Rout.save
===================================================================
--- pkg/vegan/tests/Examples/vegan-Ex.Rout.save	2011-05-30 15:32:40 UTC (rev 1619)
+++ pkg/vegan/tests/Examples/vegan-Ex.Rout.save	2011-05-30 16:03:31 UTC (rev 1620)
@@ -22,7 +22,7 @@
 > source(file.path(R.home("share"), "R", "examples-header.R"))
 > options(warn = 1)
 > library('vegan')
-This is vegan 1.18-31
+This is vegan 1.18-32
 > 
 > assign(".oldSearch", search(), pos = 'CheckExEnv')
 > cleanEx()
@@ -1535,11 +1535,11 @@
 Call: capscale(formula = varespec ~ 1, distance = "bray", metaMDSdist =
 TRUE)
 
-               Inertia Proportion Rank
-Total          2.54753                
-Real Total     2.59500    1.00000     
-Unconstrained  2.59500    1.00000   19
-Imaginary     -0.04747               4
+               Inertia Rank
+Total          2.54753     
+Real Total     2.59500     
+Unconstrained  2.59500   19
+Imaginary     -0.04747    4
 Inertia is squared Bray distance 
 
 Eigenvalues for unconstrained axes:
@@ -3717,9 +3717,9 @@
 Call: mso(object.cca = mite.cca, object.xy = mite.xy, grain = 1,
 permutations = 100)
 
-              Inertia Proportion Rank
-Total           1.164      1.000     
-Unconstrained   1.164      1.000   34
+              Inertia Rank
+Total           1.164     
+Unconstrained   1.164   34
 Inertia is mean squared contingency coefficient 
 
 Eigenvalues for unconstrained axes:
@@ -4624,7 +4624,7 @@
 
 Formula:
 y ~ s(x1, x2, k = knots)
-<environment: 0x103842ff0>
+<environment: 0x103145468>
 
 Estimated degrees of freedom:
 6.2955  total = 7.295494 
@@ -4640,7 +4640,7 @@
 
 Formula:
 y ~ s(x1, x2, k = knots)
-<environment: 0x1064d7840>
+<environment: 0x1063106e0>
 
 Estimated degrees of freedom:
 4.9207  total = 5.920718 
@@ -4796,7 +4796,7 @@
 
 Formula:
 y ~ s(x1, x2, k = knots)
-<environment: 0x1065bb200>
+<environment: 0x106d80540>
 
 Estimated degrees of freedom:
 8.9275  total = 9.927492 
@@ -4809,7 +4809,7 @@
 
 Formula:
 y ~ s(x1, x2, k = knots)
-<environment: 0x106934d90>
+<environment: 0x1063f4df0>
 
 Estimated degrees of freedom:
 7.7529  total = 8.75294 
@@ -4822,7 +4822,7 @@
 
 Formula:
 y ~ s(x1, x2, k = knots)
-<environment: 0x106aabad0>
+<environment: 0x10706ab18>
 
 Estimated degrees of freedom:
 8.8962  total = 9.89616 
@@ -5928,9 +5928,9 @@
 > cca(fitted(mod))
 Call: cca(X = fitted(mod))
 
-              Inertia Proportion Rank
-Total          0.5109     1.0000     
-Unconstrained  0.5109     1.0000    4
+              Inertia Rank
+Total          0.5109     
+Unconstrained  0.5109    4
 Inertia is mean squared contingency coefficient 
 
 Eigenvalues for unconstrained axes:
@@ -5940,9 +5940,9 @@
 > cca(residuals(mod))
 Call: cca(X = residuals(mod))
 
-              Inertia Proportion Rank
-Total          0.9761     1.0000     
-Unconstrained  0.9761     1.0000   12
+              Inertia Rank
+Total          0.9761     
+Unconstrained  0.9761   12
 Inertia is mean squared contingency coefficient 
 
 Eigenvalues for unconstrained axes:
@@ -7383,9 +7383,9 @@
 > mod0
 Call: rda(formula = dune ~ 1, data = dune.env)
 
-              Inertia Proportion Rank
-Total           84.12       1.00     
-Unconstrained   84.12       1.00   19
+              Inertia Rank
+Total           84.12     
+Unconstrained   84.12   19
 Inertia is variance 
 
 Eigenvalues for unconstrained axes:
@@ -7520,7 +7520,7 @@
 
 Formula:
 y ~ s(x1, x2, k = knots)
-<environment: 0x107b2d8d8>
+<environment: 0x108058578>
 
 Estimated degrees of freedom:
 2  total = 3 
@@ -7997,7 +7997,7 @@
 > ### * <FOOTER>
 > ###
 > cat("Time elapsed: ", proc.time() - get("ptime", pos = 'CheckExEnv'),"\n")
-Time elapsed:  134.739 1.544 138.186 0 0 
+Time elapsed:  116.809 1.693 128.077 0 0 
 > grDevices::dev.off()
 null device 
           1 



More information about the Vegan-commits mailing list