[Vegan-commits] r1020 - pkg/vegan/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Sep 22 09:23:14 CEST 2009


Author: jarioksa
Date: 2009-09-22 09:23:14 +0200 (Tue, 22 Sep 2009)
New Revision: 1020

Modified:
   pkg/vegan/R/print.oecosimu.R
Log:
quantiles reflect two-sides/one-sides hypotheses in oecosimu

Modified: pkg/vegan/R/print.oecosimu.R
===================================================================
--- pkg/vegan/R/print.oecosimu.R	2009-09-21 17:24:40 UTC (rev 1019)
+++ pkg/vegan/R/print.oecosimu.R	2009-09-22 07:23:14 UTC (rev 1020)
@@ -21,7 +21,11 @@
         NextMethod("print", x)
         cat("\n")
     }
-    qu <- apply(x$oecosimu$simulated, 1, quantile, probs=c(0.025, 0.5, 0.975))
+    probs <- switch(x$oecosimu$alternative,
+                    two.sided = c(0.025, 0.5, 0.975),
+                    less = c(0, 0.5, 0.95),
+                    greater = c(0.05, 0.5, 1))
+    qu <- apply(x$oecosimu$simulated, 1, quantile, probs=probs)
     m <- cbind("statistic" = x$oecosimu$statistic,
                "z" = x$oecosimu$z, t(qu),
                "Pr(sim.)"=x$oecosimu$pval)



More information about the Vegan-commits mailing list