From noreply at r-forge.r-project.org Thu Jan 15 23:46:56 2015 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Thu, 15 Jan 2015 23:46:56 +0100 (CET) Subject: [Distr-commits] r987 - in branches/distr-2.6/pkg/distr: R inst man Message-ID: <20150115224656.B21261876A8@r-forge.r-project.org> Author: ruckdeschel Date: 2015-01-15 23:46:56 +0100 (Thu, 15 Jan 2015) New Revision: 987 Modified: branches/distr-2.6/pkg/distr/R/plot-methods.R branches/distr-2.6/pkg/distr/R/plot-methods_LebDec.R branches/distr-2.6/pkg/distr/R/qqplot.R branches/distr-2.6/pkg/distr/inst/NEWS branches/distr-2.6/pkg/distr/man/plot-methods.Rd branches/distr-2.6/pkg/distr/man/qqplot.Rd Log: [distr] plot methods gain argument withSubst to control pattern substitution in titles and axis lables; qqplot now also offers pattern substitution Modified: branches/distr-2.6/pkg/distr/R/plot-methods.R =================================================================== --- branches/distr-2.6/pkg/distr/R/plot-methods.R 2014-12-04 19:14:13 UTC (rev 986) +++ branches/distr-2.6/pkg/distr/R/plot-methods.R 2015-01-15 22:46:56 UTC (rev 987) @@ -10,7 +10,7 @@ col.vert = par("col"), col.main = par("col.main"), col.inner = par("col.main"), col.sub = par("col.sub"), cex.points = 2.0, pch.u = 21, pch.a = 16, mfColRow = TRUE, - to.draw.arg = NULL){ + to.draw.arg = NULL, withSubst = TRUE){ xc <- match.call(call = sys.call(sys.parent(1)))$x ### manipulating the ... - argument @@ -101,7 +101,8 @@ } else paramstring <- qparamstring <- nparamstring <- "" - .mpresubs <- function(inx) + .mpresubs <- if(withSubst){ + function(inx) .presubs(inx, c("%C", "%D", "%N", "%P", "%Q", "%A"), c(as.character(class(x)[1]), as.character(date()), @@ -109,7 +110,8 @@ paramstring, qparamstring, as.character(deparse(xc)))) - + }else function(inx) inx + xlab0 <- list("d"="x", "p"="q", "q"="p") iL <- 1:length(to.draw) .mp2 <- function(dlb = dots$xlab, lb0 = list("d"="x", "p"="q", "q"="p")){ @@ -370,7 +372,7 @@ col.main = par("col.main"), col.inner = par("col.main"), col.sub = par("col.sub"), cex.points = 2.0, pch.u = 21, pch.a = 16, mfColRow = TRUE, - to.draw.arg = NULL){ + to.draw.arg = NULL, withSubst = TRUE){ xc <- match.call(call = sys.call(sys.parent(1)))$x ### manipulating the ... - argument @@ -465,14 +467,16 @@ else paramstring <- qparamstring <- nparamstring <- "" - .mpresubs <- function(inx) + .mpresubs <- if(withSubst){ + function(inx) .presubs(inx, c("%C", "%D", "%N", "%P", "%Q", "%A"), - c(as.character(class(x)[1]), - as.character(date()), - nparamstring, - paramstring, + c(as.character(class(x)[1]), + as.character(date()), + nparamstring, + paramstring, qparamstring, as.character(deparse(xc)))) + }else function(inx) inx xlab0 <- list("d"="x", "p"="q", "q"="p") iL <- 1:length(to.draw) Modified: branches/distr-2.6/pkg/distr/R/plot-methods_LebDec.R =================================================================== --- branches/distr-2.6/pkg/distr/R/plot-methods_LebDec.R 2014-12-04 19:14:13 UTC (rev 986) +++ branches/distr-2.6/pkg/distr/R/plot-methods_LebDec.R 2015-01-15 22:46:56 UTC (rev 987) @@ -11,7 +11,8 @@ col.hor = par("col"), col.vert = par("col"), col.main = par("col.main"), col.inner = par("col.main"), col.sub = par("col.sub"), cex.points = 2.0, - pch.u = 21, pch.a = 16, mfColRow = TRUE, to.draw.arg = NULL){ + pch.u = 21, pch.a = 16, mfColRow = TRUE, to.draw.arg = NULL, + withSubst = TRUE){ mc <- as.list(match.call(call = sys.call(sys.parent(1)), expand.dots = TRUE)[-1]) do.call(getMethod("plot", @@ -30,7 +31,8 @@ col.hor = par("col"), col.vert = par("col"), col.main = par("col.main"), col.inner = par("col.main"), col.sub = par("col.sub"), cex.points = 2.0, - pch.u = 21, pch.a = 16, mfColRow = TRUE, to.draw.arg = NULL){ + pch.u = 21, pch.a = 16, mfColRow = TRUE, to.draw.arg = NULL, + withSubst = TRUE){ mc <- match.call(call = sys.call(sys.parent(1)), expand.dots = TRUE)[-1] xc <- mc$x @@ -206,7 +208,9 @@ } else paramstring <- qparamstring <- nparamstring <- "" - .mpresubs <- function(inx) + + .mpresubs <- if(withSubst){ + function(inx) .presubs(inx, c("%C", "%D", "%N", "%P", "%Q", "%A"), c(as.character(class(x)[1]), as.character(date()), @@ -214,6 +218,7 @@ paramstring, qparamstring, as.character(deparse(xc)))) + }else function(inx)inx .mp2 <- function(dlb = dots$xlab, lb0 = list(list("p"="q", "q"="p"), list("d"="x", "p"="q", "q"="p"), Modified: branches/distr-2.6/pkg/distr/R/qqplot.R =================================================================== --- branches/distr-2.6/pkg/distr/R/qqplot.R 2014-12-04 19:14:13 UTC (rev 986) +++ branches/distr-2.6/pkg/distr/R/qqplot.R 2015-01-15 22:46:56 UTC (rev 987) @@ -18,16 +18,27 @@ jit.fac = 0, check.NotInSupport = TRUE, col.NotInSupport = "red", with.legend = TRUE, legend.bg = "white", legend.pos = "topleft", legend.cex = 0.8, legend.pref = "", - legend.postf = "", legend.alpha = alpha.CI, debug = FALSE){ + legend.postf = "", legend.alpha = alpha.CI, debug = FALSE, withSubst = TRUE){ mc <- match.call(call = sys.call(sys.parent(1))) - if(missing(xlab)) mc$xlab <- as.character(deparse(mc$x)) - if(missing(ylab)) mc$ylab <- as.character(deparse(mc$y)) + xcc <- as.character(deparse(mc$x)) + ycc <- as.character(deparse(mc$y)) + if(missing(xlab)) mc$xlab <- xcc + if(missing(ylab)) mc$ylab <- ycc + mcl <- as.list(mc)[-1] mcl$withSweave <- NULL mcl$mfColRow <- NULL mcl$debug <- NULL + .mpresubs <- if(withSubst){ + function(inx) + .presubs(inx, c("%C", "%A", "%D" ), + c(as.character(class(x)[1]), + as.character(date()), + xcc)) + }else function(inx) inx + force(x) pp <- ppoints(n) @@ -66,6 +77,15 @@ mcl$cex <- .makeLenAndOrder(cex.pch,ord.x) mcl$col <- .makeLenAndOrder(col.pch,ord.x) + mcl$xlab <- .mpresubs(mcl$xlab) + mcl$ylab <- .mpresubs(mcl$ylab) + + if (!is.null(eval(mcl$main))) + mcl$main <- .mpresubs(eval(mcl$main)) + if (!is.null(eval(mcl$sub))) + mcl$sub <- .mpresubs(eval(mcl$sub)) + + if (!withSweave){ devNew(width = width, height = height) } Modified: branches/distr-2.6/pkg/distr/inst/NEWS =================================================================== --- branches/distr-2.6/pkg/distr/inst/NEWS 2014-12-04 19:14:13 UTC (rev 986) +++ branches/distr-2.6/pkg/distr/inst/NEWS 2015-01-15 22:46:56 UTC (rev 987) @@ -18,7 +18,11 @@ + added generating function "EmpiricalDistribution" which is a simple wrapper to function "DiscreteDistribution" + arguments panel.first, panel.last for plot-methods can now be lists ++ qqplot gains pattern substitution like plot in titles and x/y axis lables ++ pattern substitution can now be switched on and off in all plot + functions according to argument withSubst + under the hood: -qqplot: Modified: branches/distr-2.6/pkg/distr/man/plot-methods.Rd =================================================================== --- branches/distr-2.6/pkg/distr/man/plot-methods.Rd 2014-12-04 19:14:13 UTC (rev 986) +++ branches/distr-2.6/pkg/distr/man/plot-methods.Rd 2015-01-15 22:46:56 UTC (rev 987) @@ -19,7 +19,7 @@ col.points = par("col"), col.vert = par("col"), col.main = par("col.main"), col.inner = par("col.main"), col.sub = par("col.sub"), cex.points = 2.0, pch.u = 21, pch.a = 16, mfColRow = TRUE, - to.draw.arg = NULL) + to.draw.arg = NULL, withSubst = TRUE) \S4method{plot}{DiscreteDistribution,missing}(x, width = 10, height = 5.5, withSweave = getdistrOption("withSweave"), xlim = NULL, ylim = NULL, verticals = TRUE, do.points = TRUE, main = FALSE, inner = TRUE, sub = FALSE, @@ -28,7 +28,7 @@ col.points = par("col"), col.hor = par("col"), col.vert = par("col"), col.main = par("col.main"), col.inner = par("col.main"), col.sub = par("col.sub"), cex.points = 2.0, pch.u = 21, pch.a = 16, - mfColRow = TRUE, to.draw.arg = NULL) + mfColRow = TRUE, to.draw.arg = NULL, withSubst = TRUE) \S4method{plot}{AffLinUnivarLebDecDistribution,missing}(x, width = 10, height = 5.5, withSweave = getdistrOption("withSweave"), xlim = NULL, ylim = NULL, ngrid = 1000, verticals = TRUE, do.points = TRUE, main = FALSE, @@ -37,7 +37,7 @@ col.points = par("col"), col.hor = par("col"), col.vert = par("col"), col.main = par("col.main"), col.inner = par("col.main"), col.sub = par("col.sub"), cex.points = 2.0, pch.u = 21, pch.a = 16, - mfColRow = TRUE, to.draw.arg = NULL) + mfColRow = TRUE, to.draw.arg = NULL, withSubst = TRUE) \S4method{plot}{UnivarLebDecDistribution,missing}(x, width = 10, height = 14.5, withSweave = getdistrOption("withSweave"), xlim = NULL, ylim = NULL, ngrid = 1000, verticals = TRUE, do.points = TRUE, main = FALSE, @@ -46,7 +46,7 @@ col.points = par("col"), col.hor = par("col"), col.vert = par("col"), col.main = par("col.main"), col.inner = par("col.main"), col.sub = par("col.sub"), cex.points = 2.0, pch.u = 21, pch.a = 16, - mfColRow = TRUE, to.draw.arg = NULL) + mfColRow = TRUE, to.draw.arg = NULL, withSubst = TRUE) \S4method{plot}{DistrList,missing}(x, y, ...) \S4method{plot}{CompoundDistribution,missing}(x, y, ...) } @@ -127,6 +127,8 @@ for c.d.f. and quantile function of the composed distribution and the respective three panels for the absolutely continuous and the discrete part, respectively; } + \item{withSubst}{logical; if \code{TRUE} (default) pattern substitution for + titles and lables is used; otherwise no substitution is used. } \item{\dots}{addtional arguments for \code{plot} --- see \code{\link[graphics]{plot}}, \code{\link[graphics]{plot.default}}, @@ -164,7 +166,8 @@ and a "generated on "-tag in case of \code{sub}. Of course, if \code{main} / \code{inner} / \code{sub} are \code{character}, this is used for the title; in case of \code{inner} it is then checked whether it -has length 3. In all title arguments, the following patterns are substituted: +has length 3. In all title and axis label arguments, if \code{withSubst} is \code{TRUE}, +the following patterns are substituted: \describe{ \item{\code{"\%C"}}{class of argument \code{x}} \item{\code{"\%P"}}{parameters of \code{x} in form of a comma-separated list of @@ -249,6 +252,9 @@ ### the next ylab argument is just for illustration purposes plot(Chisq(),mfColRow = FALSE,to.draw.arg="d", xlab="x",ylab=list(expression(paste(lambda,"-density of \%C(\%P)")))) +## substitution can be switched off +plot(Chisq(),mfColRow = FALSE,to.draw.arg="d", + xlab="x",ylab=list(expression(paste(lambda,"-density of \%C(\%P)"))), withSubst=FALSE) plot(Chisq(), log = "xy", ngrid = 100) Ch <- Chisq(); setgaps(Ch); plot(Ch, do.points = FALSE) setgaps(Ch, exactq = 3); plot(Ch, verticals = FALSE) Modified: branches/distr-2.6/pkg/distr/man/qqplot.Rd =================================================================== --- branches/distr-2.6/pkg/distr/man/qqplot.Rd 2014-12-04 19:14:13 UTC (rev 986) +++ branches/distr-2.6/pkg/distr/man/qqplot.Rd 2015-01-15 22:46:56 UTC (rev 987) @@ -24,7 +24,7 @@ jit.fac = 0, check.NotInSupport = TRUE, col.NotInSupport = "red", with.legend = TRUE, legend.bg = "white", legend.pos = "topleft", legend.cex = 0.8, legend.pref = "", - legend.postf = "", legend.alpha = alpha.CI, debug = FALSE) + legend.postf = "", legend.alpha = alpha.CI, debug = FALSE, withSubst = TRUE) \S4method{qqplot}{ANY,ANY}(x, y, plot.it = TRUE, xlab = deparse(substitute(x)), ylab = deparse(substitute(y)), ...) @@ -80,6 +80,8 @@ \item{legend.postf}{character to be appended to legend text} \item{legend.alpha}{nominal coverage probability} \item{debug}{logical; if \code{TRUE} additional output to debug confidence bounds.} +\item{withSubst}{logical; if \code{TRUE} (default) pattern substitution for + titles and lables is used; otherwise no substitution is used. } } \description{ @@ -91,7 +93,14 @@ Graphical parameters may be given as arguments to \code{qqplot}. The \pkg{stats} function is just the method for signature \code{x=ANY,y=ANY}. + In all title and axis label arguments, if \code{withSubst} is \code{TRUE}, + the following patterns are substituted: +\describe{ +\item{\code{"\%C"}}{class of argument \code{x}} +\item{\code{"\%A"}}{deparsed argument \code{x}} +\item{\code{"\%D"}}{time/date-string when the plot was generated} } +} \details{ \describe{ \item{qqplot}{\code{signature(x = "ANY", y = "ANY")}: function \code{qqplot} from From noreply at r-forge.r-project.org Thu Jan 15 23:55:02 2015 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Thu, 15 Jan 2015 23:55:02 +0100 (CET) Subject: [Distr-commits] r988 - in branches/distr-2.6/pkg/distrDoc: inst vignettes Message-ID: <20150115225502.C3DBD1876D5@r-forge.r-project.org> Author: ruckdeschel Date: 2015-01-15 23:55:02 +0100 (Thu, 15 Jan 2015) New Revision: 988 Modified: branches/distr-2.6/pkg/distrDoc/inst/NEWS branches/distr-2.6/pkg/distrDoc/vignettes/distr.Rnw Log: [distrDoc] mention that pattern substitution can now be switched on and off in all plot functions according to argument withSubst Modified: branches/distr-2.6/pkg/distrDoc/inst/NEWS =================================================================== --- branches/distr-2.6/pkg/distrDoc/inst/NEWS 2015-01-15 22:46:56 UTC (rev 987) +++ branches/distr-2.6/pkg/distrDoc/inst/NEWS 2015-01-15 22:55:02 UTC (rev 988) @@ -16,6 +16,8 @@ + updated CITATION file + removed some outdated references from uni-bayreuth + updated references in vignette distr.Rnw ++ mention that pattern substitution can now be switched on and off in all plot + functions according to argument withSubst under the hood + added svn-properties to distr.Rnw Modified: branches/distr-2.6/pkg/distrDoc/vignettes/distr.Rnw =================================================================== --- branches/distr-2.6/pkg/distrDoc/vignettes/distr.Rnw 2015-01-15 22:46:56 UTC (rev 987) +++ branches/distr-2.6/pkg/distrDoc/vignettes/distr.Rnw 2015-01-15 22:55:02 UTC (rev 988) @@ -1341,6 +1341,7 @@ slot \code{param} of argument \code{x} \item[\%D] time/date at which plot is/was generated \end{itemize} +This substitution can be switched off by means of argument \code{withSubst}. As usual you may control title sizes and colors with \code{cex.main} / \code{cex.inner} / \code{cex.sub} respectively with \code{col} / \code{col.main} / \code{col.inner} / \code{col.sub}. Additionally From noreply at r-forge.r-project.org Fri Jan 16 00:00:37 2015 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Fri, 16 Jan 2015 00:00:37 +0100 (CET) Subject: [Distr-commits] r989 - in branches/distr-2.6/pkg/distrMod: R inst man Message-ID: <20150115230037.6E71818795B@r-forge.r-project.org> Author: ruckdeschel Date: 2015-01-16 00:00:35 +0100 (Fri, 16 Jan 2015) New Revision: 989 Modified: branches/distr-2.6/pkg/distrMod/R/AllPlot.R branches/distr-2.6/pkg/distrMod/R/qqplot.R branches/distr-2.6/pkg/distrMod/R/returnlevelplot.R branches/distr-2.6/pkg/distrMod/inst/NEWS branches/distr-2.6/pkg/distrMod/man/L2ParamFamily-class.Rd branches/distr-2.6/pkg/distrMod/man/qqplot.Rd branches/distr-2.6/pkg/distrMod/man/returnlevelplot.Rd Log: [distrMod] plot methods gain argument withSubst to control pattern substitution in titles and axis lables; qqplot and returnlevelplot now also offer pattern substitution Modified: branches/distr-2.6/pkg/distrMod/R/AllPlot.R =================================================================== --- branches/distr-2.6/pkg/distrMod/R/AllPlot.R 2015-01-15 22:55:02 UTC (rev 988) +++ branches/distr-2.6/pkg/distrMod/R/AllPlot.R 2015-01-15 23:00:35 UTC (rev 989) @@ -11,9 +11,18 @@ main = FALSE, inner = TRUE, sub = FALSE, col.inner = par("col.main"), cex.inner = 0.8, bmar = par("mar")[1], tmar = par("mar")[3], ..., - mfColRow = TRUE, to.draw.arg = NULL){ + mfColRow = TRUE, to.draw.arg = NULL, withSubst= TRUE){ xc <- match.call(call = sys.call(sys.parent(1)))$x + xcc <- as.character(deparse(xc)) + .mpresubs <- if(withSubst){ + function(inx) + .presubs(inx, c("%C", "%A", "%D" ), + c(as.character(class(x)[1]), + as.character(date()), + xcc)) + }else function(inx)inx + dots <- match.call(call = sys.call(sys.parent(1)), expand.dots = FALSE)$"..." @@ -127,11 +136,6 @@ subL <- FALSE lineT <- NA - .mpresubs <- function(inx) - .presubs(inx, c("%C", "%D", "%A"), - c(as.character(class(x)[1]), - as.character(date()), - as.character(deparse(xc)))) if (hasArg(main)){ mainL <- TRUE Modified: branches/distr-2.6/pkg/distrMod/R/qqplot.R =================================================================== --- branches/distr-2.6/pkg/distrMod/R/qqplot.R 2015-01-15 22:55:02 UTC (rev 988) +++ branches/distr-2.6/pkg/distrMod/R/qqplot.R 2015-01-15 23:00:35 UTC (rev 989) @@ -91,17 +91,27 @@ legend.pref = "", ## prefix for legend text legend.postf = "", ## postfix for legend text legend.alpha = alpha.CI, ## nominal level of CI - debug = FALSE ## shall additional debug output be printed out? + debug = FALSE, ## shall additional debug output be printed out? + withSubst = TRUE ){ ## return value as in stats::qqplot mc <- match.call(call = sys.call(sys.parent(1))) - if(missing(xlab)){ xlab <- mc$xlab <- as.character(deparse(mc$x))} - if(missing(ylab)){ ylab <- mc$ylab <- as.character(deparse(mc$y))} + xcc <- as.character(deparse(mc$x)) + ycc <- as.character(deparse(mc$y)) + if(missing(xlab)){ xlab <- mc$xlab <- xcc} + if(missing(ylab)){ ylab <- mc$ylab <- ycc} mcl <- as.list(mc)[-1] force(x) if(is.null(mcl$datax)) datax <- FALSE if(!datax){ mcl$ylab <- xlab; mcl$xlab <- ylab} + .mpresubs <- if(withSubst){ + function(inx) + .presubs(inx, c("%C", "%A", "%D" ), + c(as.character(class(x)[1]), + as.character(date()), + xcc)) + }else function(inx)inx xj <- x if(any(.isReplicated(x))) xj[.isReplicated(x)] <- jitter(x[.isReplicated(x)], factor=jit.fac) @@ -161,6 +171,14 @@ mcl$cex <- cex.pch mcl$col <- col.pch + mcl$xlab <- .mpresubs(mcl$xlab) + mcl$ylab <- .mpresubs(mcl$ylab) + + if (!is.null(eval(mcl$main))) + mcl$main <- .mpresubs(eval(mcl$main)) + if (!is.null(eval(mcl$sub))) + mcl$sub <- .mpresubs(eval(mcl$sub)) + if (!withSweave){ devNew(width = width, height = height) } Modified: branches/distr-2.6/pkg/distrMod/R/returnlevelplot.R =================================================================== --- branches/distr-2.6/pkg/distrMod/R/returnlevelplot.R 2015-01-15 22:55:02 UTC (rev 988) +++ branches/distr-2.6/pkg/distrMod/R/returnlevelplot.R 2015-01-15 23:00:35 UTC (rev 989) @@ -66,11 +66,22 @@ legend.pref = "", ## prefix for legend text legend.postf = "", ## postfix for legend text legend.alpha = alpha.CI, ## nominal level of CI - debug = FALSE ## shall additional debug output be printed out? + debug = FALSE, ## shall additional debug output be printed out? + withSubst = TRUE ){ ## return value as in stats::qqplot MaxOrPOT <- match.arg(MaxOrPOT) mc <- match.call(call = sys.call(sys.parent(1))) + xcc <- as.character(deparse(mc$x)) + + .mpresubs <- if(withSubst){ + function(inx) + .presubs(inx, c("%C", "%A", "%D" ), + c(as.character(class(x)[1]), + as.character(date()), + xcc)) + }else function(inx)inx + if(missing(xlab)) mc$xlab <- paste(gettext("Return level of"), as.character(deparse(mc$x))) if(missing(ylab)) mc$ylab <- gettext("Return period (years)") Modified: branches/distr-2.6/pkg/distrMod/inst/NEWS =================================================================== --- branches/distr-2.6/pkg/distrMod/inst/NEWS 2015-01-15 22:55:02 UTC (rev 988) +++ branches/distr-2.6/pkg/distrMod/inst/NEWS 2015-01-15 23:00:35 UTC (rev 989) @@ -17,6 +17,10 @@ + arguments panel.first, panel.last for plot-methods can now be lists + introduced returnlevelplot, a generalization of the respective diagnostic plot facility of package ismev ++ qqplot and returnlevelplot gain pattern substitution like plot in + titles and x/y axis lables ++ pattern substitution can now be switched on and off in all plot + functions according to argument withSubst GENERAL ENHANCEMENTS: Modified: branches/distr-2.6/pkg/distrMod/man/L2ParamFamily-class.Rd =================================================================== --- branches/distr-2.6/pkg/distrMod/man/L2ParamFamily-class.Rd 2015-01-15 22:55:02 UTC (rev 988) +++ branches/distr-2.6/pkg/distrMod/man/L2ParamFamily-class.Rd 2015-01-15 23:00:35 UTC (rev 989) @@ -154,7 +154,7 @@ main = FALSE, inner = TRUE, sub = FALSE, col.inner = par("col.main"), cex.inner = 0.8, bmar = par("mar")[1], tmar = par("mar")[3], ..., - mfColRow = TRUE, to.draw.arg = NULL) + mfColRow = TRUE, to.draw.arg = NULL, withSubst = TRUE) } where \describe{ \item{x}{object of class \code{"L2ParamFamily"}} \item{withSweave}{logical: if \code{TRUE} (for working with \command{Sweave}) @@ -191,18 +191,28 @@ \code{dimnr} running through the number of rows of the trafo matrix. } + \item{withSubst}{logical; if \code{TRUE} (default) pattern substitution for + titles and lables is used; otherwise no substitution is used. } + \item{\dots}{addtional arguments for \code{plot} --- see \code{\link[graphics]{plot}}, \code{\link[graphics]{plot.default}}, \code{\link[stats]{plot.stepfun}} } } - if \code{\dots} contains argument \code{ylim}, this may either be + If \code{\dots} contains argument \code{ylim}, this may either be as in \code{plot.default} (i.e. a vector of length 2) or a vector of length 4, where the first two elements are the values for \code{ylim} in panels "d.c" and "d.d", and the last two elements are the values for \code{ylim} resp. \code{xlim} in panels "p", "p.c", "p.d" and "q", "q.c", "q.d". + In all title and axis label arguments, if \code{withSubst} is \code{TRUE}, + the following patterns are substituted: + \describe{ + \item{\code{"\%C"}}{class of argument \code{x}} + \item{\code{"\%A"}}{deparsed argument \code{x}} + \item{\code{"\%D"}}{time/date-string when the plot was generated} + } In addition, argument \code{\dots} may contain arguments \code{panel.first}, \code{panel.last}, i.e., hook expressions to be evaluated at the very beginning Modified: branches/distr-2.6/pkg/distrMod/man/qqplot.Rd =================================================================== --- branches/distr-2.6/pkg/distrMod/man/qqplot.Rd 2015-01-15 22:55:02 UTC (rev 988) +++ branches/distr-2.6/pkg/distrMod/man/qqplot.Rd 2015-01-15 23:00:35 UTC (rev 989) @@ -24,7 +24,7 @@ with.legend = TRUE, legend.bg = "white", legend.pos = "topleft", legend.cex = 0.8, legend.pref = "", legend.postf = "", legend.alpha = alpha.CI, - debug = FALSE) + debug = FALSE, withSubst = TRUE) \S4method{qqplot}{ANY,ProbFamily}(x, y, n = length(x), withIdLine = TRUE, withConf = TRUE, withConf.pw = withConf, withConf.sim = withConf, @@ -120,6 +120,8 @@ \item{legend.postf}{character to be appended to legend text} \item{legend.alpha}{nominal coverage probability} \item{debug}{logical; if \code{TRUE} additional output to debug confidence bounds.} +\item{withSubst}{logical; if \code{TRUE} (default) pattern substitution for + titles and axis lables is used; otherwise no substitution is used. } } \description{ We generalize function \code{\link[stats:qqnorm]{qqplot}} from package \pkg{stats} to @@ -131,7 +133,14 @@ it can use an argument \code{ParamFamily} to conclude on the model distribution. Graphical parameters may be given as arguments to \code{qqplot}. + In all title and label arguments, if \code{withSubst} is \code{TRUE}, + the following patterns are substituted: +\describe{ +\item{\code{"\%C"}}{class of argument \code{x}} +\item{\code{"\%A"}}{deparsed argument \code{x}} +\item{\code{"\%D"}}{time/date-string when the plot was generated} } +} \value{ As for function \code{\link[stats:qqnorm]{qqplot}} from package \pkg{stats}: a list with components Modified: branches/distr-2.6/pkg/distrMod/man/returnlevelplot.Rd =================================================================== --- branches/distr-2.6/pkg/distrMod/man/returnlevelplot.Rd 2015-01-15 22:55:02 UTC (rev 988) +++ branches/distr-2.6/pkg/distrMod/man/returnlevelplot.Rd 2015-01-15 23:00:35 UTC (rev 989) @@ -27,7 +27,7 @@ with.legend = TRUE, legend.bg = "white", legend.pos = "topleft", legend.cex = 0.8, legend.pref = "", legend.postf = "", legend.alpha = alpha.CI, - debug = FALSE) + debug = FALSE, withSubst = TRUE) \S4method{returnlevelplot}{ANY,ProbFamily}(x, y, n = length(x), withIdLine = TRUE, withConf = TRUE, withConf.pw = withConf, withConf.sim = withConf, @@ -133,6 +133,8 @@ \item{legend.postf}{character to be appended to legend text} \item{legend.alpha}{nominal coverage probability} \item{debug}{logical; if \code{TRUE} additional output to debug confidence bounds.} +\item{withSubst}{logical; if \code{TRUE} (default) pattern substitution for + titles and axis lables is used; otherwise no substitution is used. } } \description{ We generalize the return level plot (which is one of the diagnostical @@ -142,7 +144,15 @@ \code{returnlevelplot} produces a rescaled QQ plot of data (argument \code{x}) against a (model) distribution. Graphical parameters may be given as arguments to \code{returnlevelplot}. + In all title and label arguments, if \code{withSubst} is \code{TRUE}, + the following patterns are substituted: +\describe{ +\item{\code{"\%C"}}{class of argument \code{x}} +\item{\code{"\%A"}}{deparsed argument \code{x}} +\item{\code{"\%D"}}{time/date-string when the plot was generated} } + +} \value{ As for function \code{\link[stats:qqnorm]{returnlevelplot}} from package \pkg{stats}: a list with components From noreply at r-forge.r-project.org Sun Jan 25 15:20:44 2015 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Sun, 25 Jan 2015 15:20:44 +0100 (CET) Subject: [Distr-commits] r990 - in branches/distr-2.6/pkg/distrEx: R inst man Message-ID: <20150125142044.8A3881848D6@r-forge.r-project.org> Author: ruckdeschel Date: 2015-01-25 15:20:44 +0100 (Sun, 25 Jan 2015) New Revision: 990 Modified: branches/distr-2.6/pkg/distrEx/R/CvMDist.R branches/distr-2.6/pkg/distrEx/inst/NEWS branches/distr-2.6/pkg/distrEx/man/CvMDist.Rd Log: [distrEx] changed default integration measure for CvM distance from e2 to e1 -> in CvM - MDE now by default integration is done according to empirical cdf Modified: branches/distr-2.6/pkg/distrEx/R/CvMDist.R =================================================================== --- branches/distr-2.6/pkg/distrEx/R/CvMDist.R 2015-01-15 23:00:35 UTC (rev 989) +++ branches/distr-2.6/pkg/distrEx/R/CvMDist.R 2015-01-25 14:20:44 UTC (rev 990) @@ -4,7 +4,7 @@ ############################################################################### setMethod("CvMDist", signature(e1 = "UnivariateDistribution", e2 = "UnivariateDistribution"), - function(e1, e2, mu = e2, useApply = FALSE, ... ){ + function(e1, e2, mu = e1, useApply = FALSE, ... ){ o.warn <- getOption("warn"); options(warn = -1) on.exit(options(warn=o.warn)) if(is.null(e1 at p)){ @@ -25,12 +25,13 @@ ## CvM distance setMethod("CvMDist", signature(e1 = "numeric", e2 = "UnivariateDistribution"), - function(e1, e2, mu = e2, ...) + function(e1, e2, mu = e1, ...) { o.warn <- getOption("warn"); options(warn = -1) on.exit(options(warn=o.warn)) if(identical(mu,e2)) return(.newCvMDist(e1,e2)) e10 <- DiscreteDistribution(e1) + if(identical(mu,e1)) mu <- e10 CvMDist(e1 = e10, e2 = e2, mu = mu, ...) } ) Modified: branches/distr-2.6/pkg/distrEx/inst/NEWS =================================================================== --- branches/distr-2.6/pkg/distrEx/inst/NEWS 2015-01-15 23:00:35 UTC (rev 989) +++ branches/distr-2.6/pkg/distrEx/inst/NEWS 2015-01-25 14:20:44 UTC (rev 990) @@ -12,6 +12,7 @@ ############## user-visible CHANGES: ++ changed default integration measure from e2 to e1 in CvMdist + title changed to title style / capitalization + added generating function "EmpiricalMVDistribution" for computing empirical distribution of multivariate data Modified: branches/distr-2.6/pkg/distrEx/man/CvMDist.Rd =================================================================== --- branches/distr-2.6/pkg/distrEx/man/CvMDist.Rd 2015-01-15 23:00:35 UTC (rev 989) +++ branches/distr-2.6/pkg/distrEx/man/CvMDist.Rd 2015-01-25 14:20:44 UTC (rev 990) @@ -17,8 +17,8 @@ } \usage{ CvMDist(e1, e2, ...) -\S4method{CvMDist}{UnivariateDistribution,UnivariateDistribution}(e1, e2, mu = e2, useApply = FALSE, ...) -\S4method{CvMDist}{numeric,UnivariateDistribution}(e1, e2, mu = e2, ...) +\S4method{CvMDist}{UnivariateDistribution,UnivariateDistribution}(e1, e2, mu = e1, useApply = FALSE, ...) +\S4method{CvMDist}{numeric,UnivariateDistribution}(e1, e2, mu = e1, ...) } \arguments{ \item{e1}{ object of class \code{"Distribution"} or class \code{"numeric"} }