[Vegan-commits] r373 - in pkg: R inst

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed May 28 09:57:33 CEST 2008


Author: jarioksa
Date: 2008-05-28 09:57:33 +0200 (Wed, 28 May 2008)
New Revision: 373

Modified:
   pkg/R/plot.mso.R
   pkg/inst/ChangeLog
Log:
plot.mso passes graphical args to grapical functions

Modified: pkg/R/plot.mso.R
===================================================================
--- pkg/R/plot.mso.R	2008-05-27 15:49:32 UTC (rev 372)
+++ pkg/R/plot.mso.R	2008-05-28 07:57:33 UTC (rev 373)
@@ -1,4 +1,5 @@
-plot.mso <- function (x, alpha = 0.05, explained = FALSE, ...) 
+`plot.mso` <-
+    function (x, alpha = 0.05, explained = FALSE, ...) 
 {
     object.cca <- x
     if (is.data.frame(object.cca$vario)) {
@@ -12,7 +13,7 @@
         ymax <- max(vario[, -1:-3], na.rm = TRUE)
         b <- ncol(vario) - 3
         label <- c("", "", "", "Total variance", "Explained plus residual", 
-            "Residual variance", "Explained variance", "Conditioned variance")
+                   "Residual variance", "Explained variance", "Conditioned variance")
         par(omi = c(0.5, 0.5, 0, 0))
         if (is.numeric(object$CCA$rank)) {
             if (!explained) 
@@ -21,21 +22,21 @@
                 b <- b - 1
             plot(vario$Dist, vario$All, type = "n", lty = 1, 
                  pch = 3, xlab = "Distance", ylab = "Variance", 
-                 ylim = c(0, ymax), cex.lab = 1.2)
-            lines(vario$Dist, vario$All + z * vario$se, lty = 1)
-            lines(vario$Dist, vario$All - z * vario$se, lty = 1)
+                 ylim = c(0, ymax), cex.lab = 1.2, ...)
+            lines(vario$Dist, vario$All + z * vario$se, lty = 1, ...)
+            lines(vario$Dist, vario$All - z * vario$se, lty = 1, ...)
             lines(vario$Dist, vario$Sum, type = "b", lty = 2, 
-                  pch = 3)
+                  pch = 3, ...)
             for (i in 6:(b + 3)) {
                 lines(vario$Dist, vario[, i], type = "b", lty = 1, 
-                      pch = i - 6)
+                      pch = i - 6, ...)
                 points(x = 1.2 * grain,
-                       y = ymax - ymax * (b + 6 - i)/20, pch = i - 6)
+                       y = ymax - ymax * (b + 6 - i)/20, pch = i - 6, ...)
             }
             text(x = rep(2 * grain, b - 1), y = ymax - ymax * 
                  c(2:b)/20, label = label[c(2, b:3) + 3], pos = 4, 
-                 cex = 1.2)
-            points(x = 1.2 * grain, y = ymax - ymax * 2/20, pch = 3)
+                 cex = 1.2, ...)
+            points(x = 1.2 * grain, y = ymax - ymax * 2/20, pch = 3, ...)
             for (i in 2:b) {
                 lines(x = c(0.7, 1.1) * grain,
                       y = rep(ymax -  ymax * i/20, 2),
@@ -44,41 +45,41 @@
                       y = rep(ymax -  ymax * i/20, 2), lty = c(1, 2, 1, 1, 1)[i])
             }
             text(x = c(vario$Dist), y = rep(0, length(vario$Dist)), 
-                 label = c(vario$n), cex = 0.8)
+                 label = c(vario$n), cex = 0.8, ...)
             lines(x = rep(max(object$H)/2, 2), y = c(-10, ymax + 
-                                               10), lty = 3)
+                                               10), lty = 3, ...)
             text(x = 2 * grain, y = ymax - ymax/20, label = "C.I. for total variance", 
-                 pos = 4, cex = 1.2)
+                 pos = 4, cex = 1.2, ...)
             lines(x = c(0.7, 1.7) * grain, y = rep(ymax - ymax/20, 2),
-                  lty = 1)
+                  lty = 1, ...)
         }
         else {
             plot(vario$Dist, vario$All, type = "b", lty = 1, 
                  pch = 0, xlab = "Distance", ylab = "Variance", 
-                 ylim = c(0, ymax), cex.lab = 1.2)
-            lines(c(0, 10), rep(object$tot.chi, 2), lty = 5)
+                 ylim = c(0, ymax), cex.lab = 1.2, ...)
+            lines(c(0, 10), rep(object$tot.chi, 2), lty = 5, ...)
             lines(x = c(0.7, 1.7) * grain, y = rep(ymax - ymax * 
-                                           b/20, 2), lty = 5)
+                                           b/20, 2), lty = 5, ...)
             text(x = 2 * grain, y = ymax - ymax * b/20, label = "Global variance estimate", 
-                 pos = 4, cex = 1.2)
+                 pos = 4, cex = 1.2, ...)
             text(x = c(vario$Dist), y = rep(0, length(vario$Dist)), 
                  label = c(vario$n), cex = 0.8)
             lines(x = rep(max(object$H)/2, 2), y = c(-10, ymax + 
-                                               10), lty = 3)
+                                               10), lty = 3, ...)
             text(x = 2 * grain, y = ymax - ymax/20, label = "Total variance", 
-                 pos = 4, cex = 1.2)
+                 pos = 4, cex = 1.2, ...)
             lines(x = c(0.7, 1.7) * grain, y = rep(ymax - ymax/20, 
-                                           2), lty = 1)
+                                           2), lty = 1, ...)
         }
     }
     if (is.numeric(object$vario$CA.signif)) {
         a <- c(1:nrow(object$vario))[object$vario$CA.signif < 
                                      alpha]
-        points(vario$Dist[a], object$vario$CA[a], pch = 15)
+        points(vario$Dist[a], object$vario$CA[a], pch = 15, ...)
         points(x = 1.2 * grain, y = ymax - ymax * (b + 1)/20, 
-               pch = 15)
+               pch = 15, ...)
         text(x = 2 * grain, y = ymax - ymax * (b + 1)/20, pos = 4, 
-             cex = 1.2, label = c("Sign. autocorrelation"))
+             cex = 1.2, label = c("Sign. autocorrelation"), ...)
         if (is.numeric(object$CCA$rank)) {
             inflation <- 1 - weighted.mean(object$vario$CA, object$vario$n)/
                 weighted.mean(object$vario$CA[-a], 
@@ -89,3 +90,4 @@
     }
     invisible()
 }
+

Modified: pkg/inst/ChangeLog
===================================================================
--- pkg/inst/ChangeLog	2008-05-27 15:49:32 UTC (rev 372)
+++ pkg/inst/ChangeLog	2008-05-28 07:57:33 UTC (rev 373)
@@ -4,6 +4,8 @@
 
 Version 1.14-1 (opened May 22, 2008)
 
+	* plot.mso: passes extra arguments (...) to graphical functions.
+
 	* mite.xy: new data set with spatial coordinates for the Oribatid
 	mite data. From Pierre Legendre's web page.
 



More information about the Vegan-commits mailing list