[Distr-commits] r688 - in branches/distr-2.3/pkg/distr: R man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Nov 23 18:16:57 CET 2010


Author: ruckdeschel
Date: 2010-11-23 18:16:56 +0100 (Tue, 23 Nov 2010)
New Revision: 688

Modified:
   branches/distr-2.3/pkg/distr/R/internals-qqplot.R
   branches/distr-2.3/pkg/distr/R/qqplot.R
   branches/distr-2.3/pkg/distr/man/internals-qqplot.Rd
   branches/distr-2.3/pkg/distr/man/qqplot.Rd
Log:
[distr] qqplot gains arguments legend.pref and legend.postf to pre/ap-pend text before/after legend text

Modified: branches/distr-2.3/pkg/distr/R/internals-qqplot.R
===================================================================
--- branches/distr-2.3/pkg/distr/R/internals-qqplot.R	2010-11-23 15:33:24 UTC (rev 687)
+++ branches/distr-2.3/pkg/distr/R/internals-qqplot.R	2010-11-23 17:16:56 UTC (rev 688)
@@ -188,7 +188,8 @@
                     col.sCI, lty.sCI, lwd.sCI, pch.sCI, cex.sCI,
                     n,exact.sCI=(n<100),exact.pCI=(n<100), nosym.pCI = FALSE,
                     with.legend = TRUE, legend.bg = "white",
-                    legend.pos = "topleft", legend.cex = 0.8){
+                    legend.pos = "topleft", legend.cex = 0.8,
+                    legend.pref = "", legend.postf = ""){
 
    x <- sort(unique(x))
    if("gaps" %in% names(getSlots(class(D))))
@@ -239,14 +240,16 @@
    if(with.legend){
       if( qqb$err["pw"] ||  qqb$err["sim"] ){
          expression1 <- substitute(
-            nosym0~"pointw."~ex.p~alpha==alpha0~"%- conf. interval",
-            list(ex.p = if(exact.pCI) "exact" else "asympt.",
-                 alpha0 = alpha*100,
+            legpf~nosym0~"pointw."~ex.p~alpha==alpha0~"%- conf. interval"~legpof,
+            list(legpf = legend.pref, legpof = legend.postf,
+                 ex.p = if(exact.pCI) "exact" else "asympt.",
+                 alpha0 = round(alpha*100,2),
                  nosym0 = if(nosym.pCI&&exact.pCI) "shortest asymm." else "symm"))
          expression2 <- substitute(
-            "simult."~ex.s~alpha==alpha0~"%- conf. interval",
-            list(ex.s = if(exact.sCI) "exact" else "asympt.",
-                 alpha0 = alpha*100))
+            legpf~"simult."~ex.s~alpha==alpha0~"%- conf. interval"~legpof,
+            list(legpf = legend.pref, legpof = legend.postf,
+                 ex.s = if(exact.sCI) "exact" else "asympt.",
+                 alpha0 = round(alpha*100,2)))
 
          lcl <- list()
          if(!qqb$err["sim"]){
@@ -291,9 +294,9 @@
     mcl$col.lbl <- mcl$cex.lbl  <- mcl$adj.lbl <- NULL
     mcl$exp.cex2.pch <- mcl$exp.cex2.lbl <- NULL
     mcl$exp.fadcol.pch <- mcl$exp.fadcol.lbl <- NULL
-    mcl$nosym.pCI <- mcl$n.CI <- mcl$n.adj <-NULL
-    mcl$legend.cex <- mcl$with.legend <- mcl$legend.bg <-NULL
-    mcl$legend.pos <- NULL
+    mcl$nosym.pCI <- mcl$n.CI <- mcl$n.adj <- NULL
+    mcl$legend.cex <- mcl$with.legend <- mcl$legend.bg <- NULL
+    mcl$legend.pos <- legend.pref <- legend.postf <- NULL
 mcl}
 
 

Modified: branches/distr-2.3/pkg/distr/R/qqplot.R
===================================================================
--- branches/distr-2.3/pkg/distr/R/qqplot.R	2010-11-23 15:33:24 UTC (rev 687)
+++ branches/distr-2.3/pkg/distr/R/qqplot.R	2010-11-23 17:16:56 UTC (rev 688)
@@ -17,7 +17,8 @@
     cex.pch = par("cex"), col.pch = par("col"),
     jit.fac = 0, check.NotInSupport = TRUE,
     col.NotInSupport = "red", with.legend = TRUE, legend.bg = "white",
-    legend.pos = "topleft", legend.cex = 0.8){
+    legend.pos = "topleft", legend.cex = 0.8, legend.pref = "", 
+    legend.postf = ""){
 
     mc <- match.call(call = sys.call(sys.parent(1)))
     if(missing(xlab)) mc$xlab <- as.character(deparse(mc$x))
@@ -103,7 +104,8 @@
                   n, exact.sCI = exact.sCI, exact.pCI = exact.pCI,
                   nosym.pCI = nosym.pCI, with.legend = with.legend,
                   legend.bg = legend.bg, legend.pos = legend.pos,
-                  legend.cex = legend.cex)
+                  legend.cex = legend.cex, legend.pref = legend.pref,
+                  legend.postf = legend.postf)
        }
     }
     return(ret)

Modified: branches/distr-2.3/pkg/distr/man/internals-qqplot.Rd
===================================================================
--- branches/distr-2.3/pkg/distr/man/internals-qqplot.Rd	2010-11-23 15:33:24 UTC (rev 687)
+++ branches/distr-2.3/pkg/distr/man/internals-qqplot.Rd	2010-11-23 17:16:56 UTC (rev 688)
@@ -39,7 +39,7 @@
                     n,exact.sCI=(n<100),exact.pCI=(n<100),
                     nosym.pCI = FALSE, with.legend = TRUE,
                     legend.bg = "white", legend.pos = "topleft",
-                    legend.cex = 0.8)
+                    legend.cex = 0.8, legend.pref = "", legend.postf = "")
 
 .deleteItemsMCL(mcl)
 .distrExInstalled
@@ -87,6 +87,8 @@
 \item{legend.bg}{background color for the legend}
 \item{legend.pos}{position for the legend}
 \item{legend.cex}{magnification factor for the legend}
+\item{legend.pref}{character to be prepended to legend text}
+\item{legend.postf}{character to be appended to legend text}
 \item{mcl}{arguments in call as a list}
 }
 

Modified: branches/distr-2.3/pkg/distr/man/qqplot.Rd
===================================================================
--- branches/distr-2.3/pkg/distr/man/qqplot.Rd	2010-11-23 15:33:24 UTC (rev 687)
+++ branches/distr-2.3/pkg/distr/man/qqplot.Rd	2010-11-23 17:16:56 UTC (rev 688)
@@ -23,7 +23,8 @@
     cex.pch = par("cex"), col.pch = par("col"),
     jit.fac = 0, check.NotInSupport = TRUE,
     col.NotInSupport = "red", with.legend = TRUE, legend.bg = "white",
-    legend.pos = "topleft", legend.cex = 0.8)
+    legend.pos = "topleft", legend.cex = 0.8, legend.pref = "", 
+    legend.postf = "")
 \S4method{qqplot}{ANY,ANY}(x, y,
     plot.it = TRUE, xlab = deparse(substitute(x)),
     ylab = deparse(substitute(y)), ...)
@@ -75,6 +76,8 @@
 \item{legend.bg}{background color for the legend}
 \item{legend.pos}{position for the legend}
 \item{legend.cex}{magnification factor for the legend}
+\item{legend.pref}{character to be prepended to legend text}
+\item{legend.postf}{character to be appended to legend text}
 }
 
 \description{



More information about the Distr-commits mailing list