From noreply at r-forge.r-project.org Sun Jul 8 13:11:01 2018 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Sun, 8 Jul 2018 13:11:01 +0200 (CEST) Subject: [Distr-commits] r1143 - in branches/distr-2.7/pkg/startupmsg: . R man Message-ID: <20180708111101.D60B0180839@r-forge.r-project.org> Author: ruckdeschel Date: 2018-07-08 13:08:51 +0200 (Sun, 08 Jul 2018) New Revision: 1143 Modified: branches/distr-2.7/pkg/startupmsg/DESCRIPTION branches/distr-2.7/pkg/startupmsg/R/illustration.R branches/distr-2.7/pkg/startupmsg/man/myStartupUtilities.Rd Log: [branches: startupmsg]: began with major update to version 2.7 Modified: branches/distr-2.7/pkg/startupmsg/DESCRIPTION =================================================================== --- branches/distr-2.7/pkg/startupmsg/DESCRIPTION 2018-04-13 16:25:40 UTC (rev 1142) +++ branches/distr-2.7/pkg/startupmsg/DESCRIPTION 2018-07-08 11:08:51 UTC (rev 1143) @@ -1,6 +1,6 @@ Package: startupmsg Encoding: latin1 -Version: 0.9.4 +Version: 0.9.5 Date: 2016-04-23 Title: Utilities for Start-Up Messages Description: Provides utilities to create or suppress start-up messages. Modified: branches/distr-2.7/pkg/startupmsg/R/illustration.R =================================================================== --- branches/distr-2.7/pkg/startupmsg/R/illustration.R 2018-04-13 16:25:40 UTC (rev 1142) +++ branches/distr-2.7/pkg/startupmsg/R/illustration.R 2018-07-08 11:08:51 UTC (rev 1143) @@ -64,7 +64,7 @@ MANUALL <- FALSE MANUALS <- "" if(!is.null(MANUAL)) - {if (all(substr(as.character(MANUAL),1,7)=="http://")) + {if (all(substr(as.character(MANUAL),1,7)=="https://")) {MANUALL <- TRUE MANUALS <- c("\n ",MANUAL)} else {MANUAL1 <- paste(MANUAL, Modified: branches/distr-2.7/pkg/startupmsg/man/myStartupUtilities.Rd =================================================================== --- branches/distr-2.7/pkg/startupmsg/man/myStartupUtilities.Rd 2018-04-13 16:25:40 UTC (rev 1142) +++ branches/distr-2.7/pkg/startupmsg/man/myStartupUtilities.Rd 2018-07-08 11:08:51 UTC (rev 1143) @@ -110,7 +110,7 @@ buildStartupMessage(pkg="stats", msg) -MNH <- "http://www.r-project.org/" +MNH <- "https://www.r-project.org/" buildStartupMessage(pkg="stats", msg, packageHelp=TRUE, MANUAL=MNH) ## not quite a manual, but to illustrate the principle: ## "demo/nlm.R" as a "manual": to be system-independent the From noreply at r-forge.r-project.org Sun Jul 8 13:13:08 2018 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Sun, 8 Jul 2018 13:13:08 +0200 (CEST) Subject: [Distr-commits] r1144 - branches/distr-2.7/pkg Message-ID: <20180708111308.E894A18437B@r-forge.r-project.org> Author: ruckdeschel Date: 2018-07-08 13:12:46 +0200 (Sun, 08 Jul 2018) New Revision: 1144 Added: branches/distr-2.7/pkg/versuch.txt Log: Probleme mit commit -> Probiere altes Passwort Added: branches/distr-2.7/pkg/versuch.txt =================================================================== --- branches/distr-2.7/pkg/versuch.txt (rev 0) +++ branches/distr-2.7/pkg/versuch.txt 2018-07-08 11:12:46 UTC (rev 1144) @@ -0,0 +1 @@ +probleme beim commit \ No newline at end of file From noreply at r-forge.r-project.org Sun Jul 8 13:17:18 2018 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Sun, 8 Jul 2018 13:17:18 +0200 (CEST) Subject: [Distr-commits] r1145 - branches/distr-2.7/pkg/distr Message-ID: <20180708111721.71CB5189FDD@r-forge.r-project.org> Author: ruckdeschel Date: 2018-07-08 13:16:55 +0200 (Sun, 08 Jul 2018) New Revision: 1145 Modified: branches/distr-2.7/pkg/distr/DESCRIPTION branches/distr-2.7/pkg/distr/NAMESPACE Log: [branches: distr]: began with major update to version 2.7 / replace SweaveListingUtils with knitr Modified: branches/distr-2.7/pkg/distr/DESCRIPTION =================================================================== --- branches/distr-2.7/pkg/distr/DESCRIPTION 2018-07-08 11:12:46 UTC (rev 1144) +++ branches/distr-2.7/pkg/distr/DESCRIPTION 2018-07-08 11:16:55 UTC (rev 1145) @@ -10,9 +10,10 @@ comment="contributed as student in the initial phase --2005"), person("R Core Team", role = c("ctb", "cph"), comment="for source file ks.c/ routines 'pKS2' and 'pKolmogorov2x'")) -Depends: R(>= 2.14.0), methods, graphics, startupmsg, sfsmisc, SweaveListingUtils -Suggests: distrEx, svUnit (>= 0.7-11) +Depends: R(>= 2.14.0), methods, graphics, startupmsg, sfsmisc +Suggests: distrEx, svUnit (>= 0.7-11), knitr Imports: stats, grDevices, utils, MASS +VignetteBuilder: knitr ByteCompile: yes Encoding: latin1 License: LGPL-3 Modified: branches/distr-2.7/pkg/distr/NAMESPACE =================================================================== --- branches/distr-2.7/pkg/distr/NAMESPACE 2018-07-08 11:12:46 UTC (rev 1144) +++ branches/distr-2.7/pkg/distr/NAMESPACE 2018-07-08 11:16:55 UTC (rev 1145) @@ -7,7 +7,6 @@ importFrom("utils", "str") importFrom("sfsmisc", "D1ss") import("startupmsg") -import("SweaveListingUtils") export("Beta", "Binom", "Cauchy", "Chisq", "Dirac","Exp", "DExp", "Fd", "Gammad", From noreply at r-forge.r-project.org Sun Jul 8 13:24:37 2018 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Sun, 8 Jul 2018 13:24:37 +0200 (CEST) Subject: [Distr-commits] r1146 - branches/distr-2.7/pkg/distr/R Message-ID: <20180708112437.5D052180055@r-forge.r-project.org> Author: ruckdeschel Date: 2018-07-08 13:24:16 +0200 (Sun, 08 Jul 2018) New Revision: 1146 Modified: branches/distr-2.7/pkg/distr/R/AllInitialize.R branches/distr-2.7/pkg/distr/R/ContDistribution.R branches/distr-2.7/pkg/distr/R/Convpow.R branches/distr-2.7/pkg/distr/R/DiscreteDistribution.R branches/distr-2.7/pkg/distr/R/ExtraConvolutionMethods.R branches/distr-2.7/pkg/distr/R/LatticeDistribution.R branches/distr-2.7/pkg/distr/R/MinMaximum.R branches/distr-2.7/pkg/distr/R/Truncate.R branches/distr-2.7/pkg/distr/R/UnivarLebDecDistribution.R branches/distr-2.7/pkg/distr/R/UnivarMixingDistribution.R branches/distr-2.7/pkg/distr/R/getLow.R branches/distr-2.7/pkg/distr/R/internalUtils_LCD.R branches/distr-2.7/pkg/distr/R/internalUtils_trunc.R branches/distr-2.7/pkg/distr/R/internals-qqplot.R branches/distr-2.7/pkg/distr/R/liesInSupport.R branches/distr-2.7/pkg/distr/R/makeAbscontDistribution.R branches/distr-2.7/pkg/distr/R/plot-methods.R branches/distr-2.7/pkg/distr/R/plot-methods_LebDec.R branches/distr-2.7/pkg/distr/R/qqbounds.R branches/distr-2.7/pkg/distr/R/qqplot.R Log: [branches: distr]: began with major update to version 2.7 / replace calls to q(distr) with q.l(distr) and http with https Modified: branches/distr-2.7/pkg/distr/R/AllInitialize.R =================================================================== --- branches/distr-2.7/pkg/distr/R/AllInitialize.R 2018-07-08 11:16:55 UTC (rev 1145) +++ branches/distr-2.7/pkg/distr/R/AllInitialize.R 2018-07-08 11:24:16 UTC (rev 1146) @@ -1,5 +1,5 @@ #### as to whether to use Generating functions or to use initialize methods: -#### http://tolstoy.newcastle.edu.au/R/e2/devel/07/01/1976.html +#### https://tolstoy.newcastle.edu.au/R/e2/devel/07/01/1976.html ################################################################################ ## SPACES Modified: branches/distr-2.7/pkg/distr/R/ContDistribution.R =================================================================== --- branches/distr-2.7/pkg/distr/R/ContDistribution.R 2018-07-08 11:16:55 UTC (rev 1145) +++ branches/distr-2.7/pkg/distr/R/ContDistribution.R 2018-07-08 11:24:16 UTC (rev 1146) @@ -22,6 +22,7 @@ d1 <- d wS <- .withSim wA <- .withArith + q.l0 <- q if(is.null(r)){ if(is.null(q)){ if(is.null(p)){ @@ -72,9 +73,9 @@ } } p <- .D2P(d = d1, ql = low1, qu = up1, ngrid = ngrid) - q <- .P2Q(p = p, ql = low1, qu = up1, ngrid = ngrid, + q <- q.l0 <- .P2Q(p = p, ql = low1, qu = up1, ngrid = ngrid, qL = low, qU = up) - r <- function(n) q(runif(n)) + r <- function(n) q.l0(runif(n)) }else{ if(is.null(low1)){ i <- 0; x0 <- -1 @@ -87,21 +88,22 @@ up1 <- x0 } - q <- .P2Q(p = p, ql = low1, qu = up1, ngrid = ngrid, + q <- q.l0 <- .P2Q(p = p, ql = low1, qu = up1, ngrid = ngrid, qL = low, qU = up) - r <- function(n) q(runif(n)) + r <- function(n) q.l0(runif(n)) if( is.null(d)) d <- .P2D(p = p, ql = low1, qu = up1, ngrid = ngrid) } }else{ + q.l0 <- q if(is.null(p)) - p <- .Q2P(q, ngrid = ngrid) - r <- function(n) q(runif(n)) + p <- .Q2P(q.l0, ngrid = ngrid) + r <- function(n) q.l0(runif(n)) if( is.null(d)){ if(is.null(low1)) - low1 <- q(ep) + low1 <- q.l0(ep) if(is.null(up1)) - up1 <- q(1-ep) + up1 <- q.l0(1-ep) d <- .P2D(p = p, ql = low1, qu = up1, ngrid = ngrid) } } @@ -111,14 +113,15 @@ if(is.null(q)){ erg <- RtoDPQ(r = r, e = e, n = ngrid) wS <- TRUE - d <- erg$d; p <- erg$p; q<- erg$q + d <- erg$d; p <- erg$p; q<- q.l0<- erg$q }else{ + q.l0 <- q p <- .Q2P(q, ngrid = ngrid) if( is.null(d)){ if(is.null(low1)) - low1 <- q(ep) + low1 <- q.l0(ep) if(is.null(up1)) - up1 <- q(1-ep) + up1 <- q.l0(1-ep) d <- .P2D(p = p, ql = low1, qu = up1, ngrid = ngrid) } } @@ -134,7 +137,7 @@ while(p(x0)< 1-ep && i < 20) x0 <- x0 * 2 up1 <- x0 } - q <- .P2Q(p = p, ql = low1, qu = up1, ngrid = ngrid, + q <- q.l0 <- .P2Q(p = p, ql = low1, qu = up1, ngrid = ngrid, qL = low, qU = up) d <- .P2D(p = p, ql = low1, qu = up1, ngrid = ngrid) } @@ -192,7 +195,7 @@ } p <- .D2P(d = d1, ql = low1, qu=up1, ngrid = ngrid) - q <- .P2Q(p = p, ql = low1, qu=up1, ngrid = ngrid, + q <- q.l0 <- .P2Q(p = p, ql = low1, qu=up1, ngrid = ngrid, qL = low, qU = up) }else p <- .Q2P(q, ngrid = ngrid) @@ -208,13 +211,13 @@ while(p(x0)< 1-ep && i < 20) x0 <- x0 * 2 up1 <- x0 } - q <- .P2Q(p = p, ql = low1, qu=up1, ngrid = ngrid, + q <- q.l0 <- .P2Q(p = p, ql = low1, qu=up1, ngrid = ngrid, qL = low, qU = up) } } } } - obj <- new("AbscontDistribution", r = r, d = d1, p = p, q = q, + obj <- new("AbscontDistribution", r = r, d = d1, p = p, q = q.l0, gaps = gaps, param = param, img = img, .withSim = wS, .withArith = wA, .lowerExact = .lowerExact, .logExact = .logExact, Symmetry = Symmetry) @@ -256,8 +259,8 @@ upper <- getUp(object, eps = getdistrOption("TruncQuantile")*2) #lower <- 0 ; upper <- 8 dist <- upper - lower - low1 <- max(q(object)(0),lower-0.1*dist) - upp1 <- min(q(object)(1),upper+0.1*dist) + low1 <- max(q.l(object)(0),lower-0.1*dist) + upp1 <- min(q.l(object)(1),upper+0.1*dist) grid <- seq(from = low1, to = upp1, length = ngrid) dxg <- d(object)(grid) @@ -322,9 +325,9 @@ ## quantile function - yL <- if ((q(e1)(0) == -Inf)||(q(e2)(0) == -Inf)) + yL <- if ((q.l(e1)(0) == -Inf)||(q.l(e2)(0) == -Inf)) -Inf else getLow(e1)+getLow(e2) - yR <- if ((q(e1)(1) == Inf)||(q(e2)(1) == Inf)) + yR <- if ((q.l(e1)(1) == Inf)||(q.l(e2)(1) == Inf)) Inf else getUp(e1)+getUp(e2) px.l <- pfun(x + 0.5*h) @@ -352,8 +355,8 @@ ###setMethod("m1df", "AbscontDistribution", ### function(object){ -### lower <- q(object)(TruncQuantile) -### upper <- q(object)(1 - TruncQuantile) +### lower <- q.l(object)(TruncQuantile) +### upper <- q.l(object)(1 - TruncQuantile) ### ### gitter.x <- seq(from = lower, to = upper, length = DefaultNrGridPoints) ### @@ -369,8 +372,8 @@ ###setMethod("m2df", "AbscontDistribution", ### function(object){ -### lower <- q(object)(TruncQuantile) -### upper <- q(object)(1 - TruncQuantile) +### lower <- q.l(object)(TruncQuantile) +### upper <- q.l(object)(1 - TruncQuantile) ### ### gitter.x <- seq(from = lower, to = upper, length = DefaultNrGridPoints) ### @@ -426,7 +429,7 @@ n <- 10^getdistrOption("RtoDPQ.e")+1 u <- seq(0,1,length=n+1); u <- (u[1:n]+u[2:(n+1)])/2 - y <- callGeneric(q(x)(u)) + y <- callGeneric(q.l(x)(u)) DPQnew <- RtoDPQ(r=rnew, y=y) object <- AbscontDistribution(d = DPQnew$d, p = DPQnew$p, @@ -466,18 +469,18 @@ else quote({log(1-p(xx)(q))}) - qxlog <- if("lower.tail" %in% names(formals(q(xx)))) + qxlog <- if("lower.tail" %in% names(formals(q.l(xx)))) quote({qx <- if(lower.tail) - q(xx)((1+p1)/2) + q.l(xx)((1+p1)/2) else - q(xx)(p1/2,lower.tail=FALSE)}) + q.l(xx)(p1/2,lower.tail=FALSE)}) else - quote({qx <- q(xx)(if(lower.tail) (1+p1)/2 else 1-p1/2)}) - if("lower.tail" %in% names(formals(q(xx)))&& - "log.p" %in% names(formals(q(xx)))) - qxlog <- quote({qx <- if(lower.tail) q(xx)((1+p1)/2) + quote({qx <- q.l(xx)(if(lower.tail) (1+p1)/2 else 1-p1/2)}) + if("lower.tail" %in% names(formals(q.l(xx)))&& + "log.p" %in% names(formals(q.l(xx)))) + qxlog <- quote({qx <- if(lower.tail) q.l(xx)((1+p1)/2) else - q(xx)(if(log.p)p-log(2) + q.l(xx)(if(log.p)p-log(2) else p1/2,lower.tail=FALSE,log.p=log.p)}) dnew <- function(x, log = FALSE){} body(dnew) <- substitute({ @@ -552,7 +555,7 @@ px.l <- pnew(x.g + 0.5*h) px.u <- pnew(x.g + 0.5*h, lower.tail = FALSE) - yR <- max(q(xx)(1), abs(q(xx)(0))) + yR <- max(q.l(xx)(1), abs(q.l(xx)(0))) qnew <- .makeQNew(x.g + 0.5*h, px.l, px.u, notwithLLarg = FALSE, lower, yR) @@ -650,7 +653,7 @@ n <- 10^getdistrOption("RtoDPQ.e")+1 u <- seq(0,1,length=n+1); u <- (u[1:n]+u[2:(n+1)])/2 - y <- lgamma(q(x)(u)) + y <- lgamma(q.l(x)(u)) DPQnew <- RtoDPQ(r=rnew, y=y) object <- AbscontDistribution( r = rnew, d = DPQnew$d, p = DPQnew$p, @@ -664,7 +667,7 @@ body(rnew) <- substitute({ gamma(g(n, ...)) }, list(g = x at r)) n <- 10^getdistrOption("RtoDPQ.e")+1 u <- seq(0,1,length=n+1); u <- (u[1:n]+u[2:(n+1)])/2 - y <- gamma(q(x)(u)) + y <- gamma(q.l(x)(u)) DPQnew <- RtoDPQ(r=rnew, y=y) object <- AbscontDistribution( r = rnew, d = DPQnew$d, p = DPQnew$p, @@ -687,8 +690,8 @@ setMethod("q.r", signature(object = "AbscontDistribution"), function(object){ if(!is.null(gaps(object))) - .modifyqgaps(pfun = p(object), qfun = q(object), + .modifyqgaps(pfun = p(object), qfun = q.l(object), gaps = gaps(object), leftright = "right") else - q(object) + q.l(object) }) Modified: branches/distr-2.7/pkg/distr/R/Convpow.R =================================================================== --- branches/distr-2.7/pkg/distr/R/Convpow.R 2018-07-08 11:16:55 UTC (rev 1145) +++ branches/distr-2.7/pkg/distr/R/Convpow.R 2018-07-08 11:24:16 UTC (rev 1146) @@ -55,8 +55,8 @@ ## continuity correction by h/2 ## quantile function - yL <- if (q(D1)(0) == -Inf) -Inf else N*lower - yR <- if (q(D1)(1) == Inf) Inf else N*upper + yL <- if (q.l(D1)(0) == -Inf) -Inf else N*lower + yR <- if (q.l(D1)(1) == Inf) Inf else N*upper px.l <- pfun(x + 0.5*h) px.u <- pfun(x + 0.5*h, lower.tail = FALSE) qfun <- .makeQNew(x + 0.5*h, px.l, px.u, .notwithLArg(D1), yL, yR) Modified: branches/distr-2.7/pkg/distr/R/DiscreteDistribution.R =================================================================== --- branches/distr-2.7/pkg/distr/R/DiscreteDistribution.R 2018-07-08 11:16:55 UTC (rev 1145) +++ branches/distr-2.7/pkg/distr/R/DiscreteDistribution.R 2018-07-08 11:24:16 UTC (rev 1146) @@ -117,8 +117,8 @@ ### right continuous quantile function setMethod("q.r", "DiscreteDistribution", function(object){ - if (.inArgs("log.p", q(object))){ - if (.inArgs("lower.tail", q(object))){ + if (.inArgs("log.p", q.l(object))){ + if (.inArgs("lower.tail", q.l(object))){ function(p, lower.tail = TRUE, log.p = FALSE){ s <- support(object) psx <- p(object)(s, lower.tail = lower.tail, @@ -127,7 +127,7 @@ o.warn <- getOption("warn"); options(warn = -2) on.exit(options(warn=o.warn)) - qx0 <- q(object)(ps0, lower.tail = lower.tail, + qx0 <- q.l(object)(ps0, lower.tail = lower.tail, log.p = log.p) options(warn = o.warn) @@ -151,7 +151,7 @@ o.warn <- getOption("warn"); options(warn = -2) on.exit(options(warn=o.warn)) - qx0 <- q(object)(ps0, lower.tail = lower.tail, + qx0 <- q.l(object)(ps0, lower.tail = lower.tail, log.p = log.p) options(warn = o.warn) @@ -168,7 +168,7 @@ } } }else{ - if (.inArgs("lower.tail", q(object))){ + if (.inArgs("lower.tail", q.l(object))){ function(p, lower.tail = TRUE, log.p = FALSE){ if (log.p) p <- exp(p) s <- support(object) @@ -177,7 +177,7 @@ o.warn <- getOption("warn"); options(warn = -2) on.exit(options(warn=o.warn)) - qx0 <- q(object)(ps0, lower.tail = lower.tail, + qx0 <- q.l(object)(ps0, lower.tail = lower.tail, log.p = log.p) options(warn = o.warn) @@ -202,7 +202,7 @@ o.warn <- getOption("warn"); options(warn = -2) on.exit(options(warn=o.warn)) - qx0 <- q(object)(ps0, lower.tail = lower.tail, + qx0 <- q.l(object)(ps0, lower.tail = lower.tail, log.p = log.p) options(warn = o.warn) @@ -332,18 +332,18 @@ quote({log(1-p(x)(q))}) - qxlog <- if("lower.tail" %in% names(formals(q(x)))) + qxlog <- if("lower.tail" %in% names(formals(q.l(x)))) quote({qx <- if(lower.tail) - q(x)((1+p1)/2) + q.l(x)((1+p1)/2) else - q(x)(p1/2,lower.tail=FALSE)}) + q.l(x)(p1/2,lower.tail=FALSE)}) else - quote({qx <- q(x)(if(lower.tail) (1+p1)/2 else 1-p1/2)}) - if("lower.tail" %in% names(formals(q(x)))&& - "log.p" %in% names(formals(q(x)))) - qxlog <- quote({qx <- if(lower.tail) q(x)((1+p1)/2) + quote({qx <- q.l(x)(if(lower.tail) (1+p1)/2 else 1-p1/2)}) + if("lower.tail" %in% names(formals(q.l(x)))&& + "log.p" %in% names(formals(q.l(x)))) + qxlog <- quote({qx <- if(lower.tail) q.l(x)((1+p1)/2) else - q(x)(if(log.p)p-log(2) + q.l(x)(if(log.p)p-log(2) else p1/2,lower.tail=FALSE,log.p=log.p)}) Modified: branches/distr-2.7/pkg/distr/R/ExtraConvolutionMethods.R =================================================================== --- branches/distr-2.7/pkg/distr/R/ExtraConvolutionMethods.R 2018-07-08 11:16:55 UTC (rev 1145) +++ branches/distr-2.7/pkg/distr/R/ExtraConvolutionMethods.R 2018-07-08 11:24:16 UTC (rev 1146) @@ -117,9 +117,9 @@ .notwithLArg(e1)||.notwithLArg(e2), pxl = pl , pxu = pu) } ## quantile function - yL <- if ((q(e1)(0) == -Inf)||(q(e2)(0) == -Inf)) + yL <- if ((q.l(e1)(0) == -Inf)||(q.l(e2)(0) == -Inf)) -Inf else lower - yR <- if ((q(e1)(1) == Inf)||(q(e2)(1) == Inf)) + yR <- if ((q.l(e1)(1) == Inf)||(q.l(e2)(1) == Inf)) Inf else upper ## contintuity correction Modified: branches/distr-2.7/pkg/distr/R/LatticeDistribution.R =================================================================== --- branches/distr-2.7/pkg/distr/R/LatticeDistribution.R 2018-07-08 11:16:55 UTC (rev 1145) +++ branches/distr-2.7/pkg/distr/R/LatticeDistribution.R 2018-07-08 11:24:16 UTC (rev 1146) @@ -82,7 +82,7 @@ } return(new("LatticeDistribution", r = r(D), d = d(D), - q = q(D), p = p(D), support = supp, + q = q.l(D), p = p(D), support = supp, lattice = lattice, .withArith = .withArith, .withSim = .withSim, Symmetry = Symmetry)) } @@ -99,7 +99,7 @@ .withSim = .withSim, Symmetry = Symmetry ) return(new("LatticeDistribution", r = r(D), d = d(D), - q = q(D), p = p(D), support = supp, + q = q.l(D), p = p(D), support = supp, lattice = lattice, .withArith = .withArith, .withSim = .withSim, Symmetry = Symmetry)) }else{ @@ -118,7 +118,7 @@ .withSim = .withSim, Symmetry = Symmetry ) return(new("LatticeDistribution", r = r(D), d = d(D), - q = q(D), p = p(D), support = supp, + q = q.l(D), p = p(D), support = supp, lattice = lattice, .withArith = .withArith, .withSim = .withSim, Symmetry = Symmetry)) } Modified: branches/distr-2.7/pkg/distr/R/MinMaximum.R =================================================================== --- branches/distr-2.7/pkg/distr/R/MinMaximum.R 2018-07-08 11:16:55 UTC (rev 1145) +++ branches/distr-2.7/pkg/distr/R/MinMaximum.R 2018-07-08 11:24:16 UTC (rev 1146) @@ -42,8 +42,8 @@ xseq <- seq(from = qL1, to = qU1, by = h) px.l <- pnew(xseq, lower.tail = TRUE) px.u <- pnew(xseq, lower.tail = FALSE) - qL2 <- min(q(e1)(0),q(e2)(0)) - qU2 <- max(q(e1)(1),q(e2)(1)) + qL2 <- min(q.l(e1)(0),q.l(e2)(0)) + qU2 <- max(q.l(e1)(1),q.l(e2)(1)) qnew <- .makeQNew(xseq, px.l, px.u, FALSE, qL2, qU2) @@ -183,8 +183,8 @@ } ## new quantile function - qL <- q(e1)(0) - qU <- q(e1)(1) + qL <- q.l(e1)(0) + qU <- q.l(e1)(1) ql <- getLow(e1) qu <- getUp(e1) Modified: branches/distr-2.7/pkg/distr/R/Truncate.R =================================================================== --- branches/distr-2.7/pkg/distr/R/Truncate.R 2018-07-08 11:16:55 UTC (rev 1145) +++ branches/distr-2.7/pkg/distr/R/Truncate.R 2018-07-08 11:24:16 UTC (rev 1146) @@ -87,8 +87,8 @@ xseq <- seq(from = qL1, to = qU1, by = h) px.l <- pnew(xseq, lower.tail = TRUE) px.u <- pnew(xseq, lower.tail = FALSE) - qL2 <- max(q(object)(0),lower) - qU2 <- min(q(object)(1),upper) + qL2 <- max(q.l(object)(0),lower) + qU2 <- min(q.l(object)(1),upper) qnew <- .makeQNew(xseq, px.l, px.u, FALSE, qL2, qU2) @@ -113,9 +113,9 @@ if(is.finite(Length(lattice(object)))|| !.logExact(object)|| (width(lattice(object)) < 0 && - lower > q(object)(getdistrOption("TruncQuantile")))|| + lower > q.l(object)(getdistrOption("TruncQuantile")))|| (width(lattice(object)) > 0 && - upper < q(object)(getdistrOption("TruncQuantile"), + upper < q.l(object)(getdistrOption("TruncQuantile"), lower.tail = FALSE)) ){ erg <- getMethod("Truncate","DiscreteDistribution")(object, Modified: branches/distr-2.7/pkg/distr/R/UnivarLebDecDistribution.R =================================================================== --- branches/distr-2.7/pkg/distr/R/UnivarLebDecDistribution.R 2018-07-08 11:16:55 UTC (rev 1145) +++ branches/distr-2.7/pkg/distr/R/UnivarLebDecDistribution.R 2018-07-08 11:24:16 UTC (rev 1146) @@ -235,7 +235,7 @@ setMethod("q.r", "UnivarLebDecDistribution", function(object){ ep <- getdistrOption("TruncQuantile") - if(discreteWeight(object) - Inf){ return(q0) }else{ - qF <- q(object) + qF <- q.l(object) qe <- qF(eps) if (!is.na(qe) && qe > -Inf) return(qe) else{ if(.inArgs("log.p",qF)) - return(qF(p = .fm(x = .5, f = q(object)), + return(qF(p = .fm(x = .5, f = q.l(object)), log.p = TRUE)) else - return(qF(p = exp(.fm(x = .5, f = q(object))))) + return(qF(p = exp(.fm(x = .5, f = q.l(object))))) } } }) setMethod("getUp", "AbscontDistribution", function(object, eps = getdistrOption("TruncQuantile")) { - q1 <- q(object)(1) + q1 <- q.l(object)(1) if (q1 < Inf){ return(q1) }else{ - qF <- q(object) + qF <- q.l(object) if (.inArgs("lower.tail", qF)){ qe <- qF(eps, lower.tail = FALSE) if (!is.na(qe) && qe < Inf) return(qe) else{ if(.inArgs("log.p",qF)) - return(qF(p = .fM2(x = .5, f = q(object)), + return(qF(p = .fM2(x = .5, f = q.l(object)), log.p = TRUE)) else - return(qF(p = exp(.fM2(x = .5, f = q(object))))) + return(qF(p = exp(.fM2(x = .5, f = q.l(object))))) } }else{ - qe <- q(object)(1-eps) + qe <- q.l(object)(1-eps) if (!is.na(qe) && qe < Inf) return(qe) else{ if(.inArgs("log.p",qF)) - return(qF(p = .fM(x = .5, f = q(object)), + return(qF(p = .fM(x = .5, f = q.l(object)), log.p = TRUE)) else - return(qF(p = exp(.fM(x = .5, f = q(object))))) + return(qF(p = exp(.fM(x = .5, f = q.l(object))))) } } } @@ -61,32 +61,32 @@ setMethod("getLow", "LatticeDistribution", function(object, ...){ lattice <- lattice(object) - qF <- q(object) + qF <- q.l(object) if(is.finite(Length(lattice)) || width(lattice)>0) return(min(support(object))) if(.inArgs("log.p",qF)) - return(qF(p = .fm(x = .5, f = q(object)), log.p = TRUE)) + return(qF(p = .fm(x = .5, f = q.l(object)), log.p = TRUE)) else - return(qF(p = exp(.fm(x = .5, f = q(object))))) + return(qF(p = exp(.fm(x = .5, f = q.l(object))))) }) setMethod("getUp", "LatticeDistribution", function(object, ...){ lattice <- lattice(object) if(is.finite(Length(lattice)) || width(lattice)<0) return(max(support(object))) - qF <- q(object) + qF <- q.l(object) if (.inArgs("lower.tail", qF)){ if(.inArgs("log.p",qF)) - return(qF(p = .fM(x = .5, f = q(object)), + return(qF(p = .fM(x = .5, f = q.l(object)), log.p = TRUE)) else - return(qF(p = exp(.fM(x = .5, f = q(object))))) + return(qF(p = exp(.fM(x = .5, f = q.l(object))))) } if(.inArgs("log.p",qF)) - return(qF(p = .fM2(x = .5, f = q(object)), + return(qF(p = .fM2(x = .5, f = q.l(object)), lower.tail = FALSE, log.p = TRUE)) else - return(qF(p = exp(.fM2(x = .5, f = q(object))), + return(qF(p = exp(.fM2(x = .5, f = q.l(object))), lower.tail = FALSE)) }) Modified: branches/distr-2.7/pkg/distr/R/internalUtils_LCD.R =================================================================== --- branches/distr-2.7/pkg/distr/R/internalUtils_LCD.R 2018-07-08 11:16:55 UTC (rev 1145) +++ branches/distr-2.7/pkg/distr/R/internalUtils_LCD.R 2018-07-08 11:24:16 UTC (rev 1146) @@ -185,7 +185,7 @@ .loupmixfun <- function(mixDistr){ if(length(mixDistr)==0) return(list(qL = NA, ql = NA, qU = NA, qu = NA)) if(length(mixDistr)==1){ - q1 <- q(mixDistr[[1]]) + q1 <- q.l(mixDistr[[1]]) return(list(qL = q1(p = 0, lower.tail = TRUE), ql = q1(p = getdistrOption("TruncQuantile"), lower.tail = TRUE), qU = q1(p = 0, lower.tail = FALSE), Modified: branches/distr-2.7/pkg/distr/R/internalUtils_trunc.R =================================================================== --- branches/distr-2.7/pkg/distr/R/internalUtils_trunc.R 2018-07-08 11:16:55 UTC (rev 1145) +++ branches/distr-2.7/pkg/distr/R/internalUtils_trunc.R 2018-07-08 11:24:16 UTC (rev 1146) @@ -2,7 +2,7 @@ ep <- .Machine$double.eps^2 plN <- p(object)(upper, lower.tail = TRUE, log.p=TRUE) rnew <- function(n){ - q(object)(plN-rexp(n), lower.tail = TRUE, log.p=TRUE) + q.l(object)(plN-rexp(n), lower.tail = TRUE, log.p=TRUE) } pnew <- function(q, lower.tail = TRUE, log.p = FALSE){ indNA <- is.na(q) @@ -44,15 +44,15 @@ q0 <- 0*p q0[ind1] <- NA q0[indis1] <- if(lower.tail) - upper else q(object)(0) + upper else q.l(object)(0) q0[indis0] <- if(lower.tail) - q(object)(0) else upper + q.l(object)(0) else upper p1 <- p[in01] if(log.p && lower.tail) p1l <- plN + p1 else{ if(log.p) p1 <- exp(p1) p1l <- plN + if(lower.tail) log(p1) else log(1-p1) } - q0[in01] <- q(object)(p1l, log.p = TRUE) + q0[in01] <- q.l(object)(p1l, log.p = TRUE) q0[indNA] <- NA return(q0) @@ -67,7 +67,7 @@ Qr <- q.r(object) }else{ Pl <- p(object) - Qr <- q(object) + Qr <- q.l(object) } plN <- Pl(lower, lower.tail = FALSE, log.p = TRUE) rnew <- function(n){ @@ -113,14 +113,14 @@ q0 <- 0*p q0[ind1] <- NA q0[indis1] <- if(lower.tail) - q(object)(1) else lower + q.l(object)(1) else lower q0[indis0] <- if(lower.tail) - lower else q(object)(1) + lower else q.l(object)(1) p1 <- p[in01] if(log.p && !lower.tail) p1l <- plN + p1 else{ if(log.p) p1 <- exp(p1) p1l <- plN + if(lower.tail) log(1-p1) else log(p1) } - q0[in01] <- q(object)(p1l, lower.tail = FALSE, log.p = TRUE) + q0[in01] <- q.l(object)(p1l, lower.tail = FALSE, log.p = TRUE) q0[indNA] <- NA return(q0) } Modified: branches/distr-2.7/pkg/distr/R/internals-qqplot.R =================================================================== --- branches/distr-2.7/pkg/distr/R/internals-qqplot.R 2018-07-08 11:16:55 UTC (rev 1145) +++ branches/distr-2.7/pkg/distr/R/internals-qqplot.R 2018-07-08 11:24:16 UTC (rev 1146) @@ -18,8 +18,8 @@ .NotInSupport <- function(x,D){ if(length(x)==0) return(logical(0)) - nInSupp <- which(x < q(D)(0)) - nInSupp <- unique(sort(c(nInSupp,which(x > q(D)(1))))) + nInSupp <- which(x < q.l(D)(0)) + nInSupp <- unique(sort(c(nInSupp,which(x > q.l(D)(1))))) nInSuppo <- if("support" %in% names(getSlots(class(D)))) @@ -48,7 +48,7 @@ lx[.NotInSupport(x,D)] <- 4 - idx.0 <- ((x>q(D)(1)) | (xq.l(D)(1)) | (x= low)&(x <= upp) }) Modified: branches/distr-2.7/pkg/distr/R/makeAbscontDistribution.R =================================================================== --- branches/distr-2.7/pkg/distr/R/makeAbscontDistribution.R 2018-07-08 11:16:55 UTC (rev 1145) +++ branches/distr-2.7/pkg/distr/R/makeAbscontDistribution.R 2018-07-08 11:24:16 UTC (rev 1146) @@ -8,8 +8,8 @@ if(missing(img)) img0 <- img(object) if(is.null(img)) img0 <- img(object) pfun <- p(object) - low0 <- q(object)(0)*1.001 - up0 <- q(object)(1)*1.001 + low0 <- q.l(object)(0)*1.001 + up0 <- q.l(object)(1)*1.001 low1 <- getLow(object,ep)*1.001 up1 <- getUp(object,ep)*1.001 wS <- object at .withSim Modified: branches/distr-2.7/pkg/distr/R/plot-methods.R =================================================================== --- branches/distr-2.7/pkg/distr/R/plot-methods.R 2018-07-08 11:16:55 UTC (rev 1145) +++ branches/distr-2.7/pkg/distr/R/plot-methods.R 2018-07-08 11:24:16 UTC (rev 1146) @@ -201,7 +201,7 @@ lower0 <- getLow(x, eps = getdistrOption("TruncQuantile")*2) upper0 <- getUp(x, eps = getdistrOption("TruncQuantile")*2) - me <- q(x)(1/2); s <- q(x)(3/4)-q(x)(1/4) + me <- q.l(x)(1/2); s <- q.l(x)(3/4)-q.l(x)(1/4) lower1 <- me - 6 * s upper1 <- me + 6 * s lower <- max(lower0, lower1) @@ -267,8 +267,8 @@ options(warn = -1) } - if(is.finite(q(x)(0))) {grid <- c(q(x)(0),grid); pxg <- c(0,pxg)} - if(is.finite(q(x)(1))) {grid <- c(grid,q(x)(1)); pxg <- c(pxg,1)} + if(is.finite(q.l(x)(0))) {grid <- c(q.l(x)(0),grid); pxg <- c(0,pxg)} + if(is.finite(q.l(x)(1))) {grid <- c(grid,q.l(x)(1)); pxg <- c(pxg,1)} if(2%in%to.draw){ dots.lowlevel$panel.first <- pF[[plotCount]] @@ -288,7 +288,7 @@ ### quantiles ### fix finite support bounds - ixg <- grid>=max(q(x)(0),lower) & grid <= min(q(x)(1),upper) + ixg <- grid>=max(q.l(x)(0),lower) & grid <= min(q.l(x)(1),upper) pxg <- pxg[ixg] grid <- grid[ixg] [TRUNCATED] To get the complete diff run: svnlook diff /svnroot/distr -r 1146 From noreply at r-forge.r-project.org Sun Jul 8 13:36:20 2018 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Sun, 8 Jul 2018 13:36:20 +0200 (CEST) Subject: [Distr-commits] r1147 - branches/distr-2.7/pkg/distr/man Message-ID: <20180708113620.3FC64189587@r-forge.r-project.org> Author: ruckdeschel Date: 2018-07-08 13:36:18 +0200 (Sun, 08 Jul 2018) New Revision: 1147 Modified: branches/distr-2.7/pkg/distr/man/0distr-package.Rd branches/distr-2.7/pkg/distr/man/AbscontDistribution-class.Rd branches/distr-2.7/pkg/distr/man/AbscontDistribution.Rd branches/distr-2.7/pkg/distr/man/Arcsine-class.Rd branches/distr-2.7/pkg/distr/man/Beta-class.Rd branches/distr-2.7/pkg/distr/man/Binom-class.Rd branches/distr-2.7/pkg/distr/man/Cauchy-class.Rd branches/distr-2.7/pkg/distr/man/Chisq-class.Rd branches/distr-2.7/pkg/distr/man/DExp-class.Rd branches/distr-2.7/pkg/distr/man/Dirac-class.Rd branches/distr-2.7/pkg/distr/man/DiscreteDistribution-class.Rd branches/distr-2.7/pkg/distr/man/Exp-class.Rd branches/distr-2.7/pkg/distr/man/Fd-class.Rd branches/distr-2.7/pkg/distr/man/Gammad-class.Rd branches/distr-2.7/pkg/distr/man/Geom-class.Rd branches/distr-2.7/pkg/distr/man/Hyper-class.Rd branches/distr-2.7/pkg/distr/man/LatticeDistribution-class.Rd branches/distr-2.7/pkg/distr/man/Lnorm-class.Rd branches/distr-2.7/pkg/distr/man/Logis-class.Rd branches/distr-2.7/pkg/distr/man/Nbinom-class.Rd branches/distr-2.7/pkg/distr/man/Norm-class.Rd branches/distr-2.7/pkg/distr/man/Pois-class.Rd branches/distr-2.7/pkg/distr/man/Td-class.Rd branches/distr-2.7/pkg/distr/man/Truncate-methods.Rd branches/distr-2.7/pkg/distr/man/Unif-class.Rd branches/distr-2.7/pkg/distr/man/UnivarLebDecDistribution-class.Rd branches/distr-2.7/pkg/distr/man/Weibull-class.Rd branches/distr-2.7/pkg/distr/man/internals.Rd branches/distr-2.7/pkg/distr/man/q-methods.Rd Log: [branches: distr]: began with major update to version 2.7 / mention problems with jupyter IRKernel and RStudio Modified: branches/distr-2.7/pkg/distr/man/0distr-package.Rd =================================================================== --- branches/distr-2.7/pkg/distr/man/0distr-package.Rd 2018-07-08 11:24:16 UTC (rev 1146) +++ branches/distr-2.7/pkg/distr/man/0distr-package.Rd 2018-07-08 11:36:18 UTC (rev 1147) @@ -33,6 +33,14 @@ Note that, as usual, slots \code{d}, \code{p}, and \code{q} are vectorized in their first argument, but are not on the subsequent ones. +In the environments of RStudio, see \url{https://www.rstudio.com/} and +Jupyter IRKernel, see \url{https://github.com/IRkernel/IRkernel}, +calls to \code{q} are caught away from standard R evaluation and are treated +in a non-standard way. This non-standard evaluation in particular throws +errors at calls to our accessor methods \code{q} to slot \code{q} of the +respective distribution object. To amend this, we provide function \code{q.l} +as alias to our accessors \code{q}, so that our packages also become available + in these environments. Arithmetics and unary mathematical transformations for distributions are available: For \code{Distribution} objects \code{X} and \code{Y} expressions Modified: branches/distr-2.7/pkg/distr/man/AbscontDistribution-class.Rd =================================================================== --- branches/distr-2.7/pkg/distr/man/AbscontDistribution-class.Rd 2018-07-08 11:24:16 UTC (rev 1146) +++ branches/distr-2.7/pkg/distr/man/AbscontDistribution-class.Rd 2018-07-08 11:36:18 UTC (rev 1147) @@ -169,6 +169,7 @@ d(A3)(0) # The (approximated) density for x=0 is 0.43799. p(A3)(0) # The (approximated) probability that x <= 0 is 0.45620. q(A3)(.1) # The (approximated) 10 percent quantile is -1.06015. +## in RStudio or Jupytier IRKernel, use q.l(.)(.) instead of q(.)(.) } \keyword{distribution} \concept{absolutely continuous distribution} Modified: branches/distr-2.7/pkg/distr/man/AbscontDistribution.Rd =================================================================== --- branches/distr-2.7/pkg/distr/man/AbscontDistribution.Rd 2018-07-08 11:24:16 UTC (rev 1146) +++ branches/distr-2.7/pkg/distr/man/AbscontDistribution.Rd 2018-07-08 11:36:18 UTC (rev 1147) @@ -80,6 +80,7 @@ +\tab +\tab -\tab +\tab p by \code{.Q2P}\cr +\tab -\tab +\tab +\tab d by \code{.P2D}\cr +\tab +\tab +\tab +\tab nothing\cr} + For this purpose, one may alternatively give arguments \code{low1} and \code{up1} (\code{NULL} each by default, and determined through slot \code{q}, resp. \code{p}, resp. \code{d}, resp. \code{r} in this order according to availability), @@ -88,6 +89,7 @@ arguments \code{low} and \code{up} with default values \code{-Inf}, \code{Inf}, respectively. Of course all other slots may be specified as arguments.} + \value{Object of class \code{"AbscontDistribution"}} Modified: branches/distr-2.7/pkg/distr/man/Arcsine-class.Rd =================================================================== --- branches/distr-2.7/pkg/distr/man/Arcsine-class.Rd 2018-07-08 11:24:16 UTC (rev 1146) +++ branches/distr-2.7/pkg/distr/man/Arcsine-class.Rd 2018-07-08 11:36:18 UTC (rev 1147) @@ -67,6 +67,7 @@ d(A)(c(-2,-1,-0.2,0,0.2,1,2)) # Density at x=c(-1,-0.2,0,0.2,1). p(A)(c(-2,-1,-0.2,0,0.2,1,2)) # cdf at q=c(-1,-0.2,0,0.2,1). q(A)(c(0,0.2,1,2)) # quantile function at at x=c(0,0.2,1). +## in RStudio or Jupyter IRKernel, use q.l(A)(c(0,0.2,1,2)) instead } \keyword{distribution} \concept{absolutely continuous distribution} Modified: branches/distr-2.7/pkg/distr/man/Beta-class.Rd =================================================================== --- branches/distr-2.7/pkg/distr/man/Beta-class.Rd 2018-07-08 11:24:16 UTC (rev 1146) +++ branches/distr-2.7/pkg/distr/man/Beta-class.Rd 2018-07-08 11:36:18 UTC (rev 1147) @@ -107,6 +107,7 @@ # B0 is just the same beta distribution as Bn but with ncp = 0 q(B0)(0.1) ## q(Bn)(0.1) ## => from R 2.3.0 on ncp no longer ignored... +## in RStudio or Jupyter IRKernel, use q.l(.)(.) instead of q(.)(.) } \keyword{distribution} \concept{absolutely continuous distribution} Modified: branches/distr-2.7/pkg/distr/man/Binom-class.Rd =================================================================== --- branches/distr-2.7/pkg/distr/man/Binom-class.Rd 2018-07-08 11:24:16 UTC (rev 1146) +++ branches/distr-2.7/pkg/distr/man/Binom-class.Rd 2018-07-08 11:36:18 UTC (rev 1147) @@ -96,6 +96,7 @@ d(B)(1) # Density of this distribution is 0.5 for x=1. p(B)(0.4) # Probability that x<0.4 is 0.5. q(B)(.1) # x=0 is the smallest value x such that p(B)(x)>=0.1. +## in RStudio or Jupyter IRKernel, use q.l(.)(.) instead of q(.)(.) size(B) # size of this distribution is 1. size(B) <- 2 # size of this distribution is now 2. C <- Binom(prob = 0.5, size = 1) # C is a binomial distribution with prob=0.5 and size=1. Modified: branches/distr-2.7/pkg/distr/man/Cauchy-class.Rd =================================================================== --- branches/distr-2.7/pkg/distr/man/Cauchy-class.Rd 2018-07-08 11:24:16 UTC (rev 1146) +++ branches/distr-2.7/pkg/distr/man/Cauchy-class.Rd 2018-07-08 11:36:18 UTC (rev 1147) @@ -90,6 +90,7 @@ d(C)(1) # Density of this distribution is 0.3183099 for x=1. p(C)(1) # Probability that x<1 is 0.5. q(C)(.1) # Probability that x<-2.077684 is 0.1. +## in RStudio or Jupyter IRKernel, use q.l(.)(.) instead of q(.)(.) location(C) # location of this distribution is 1. location(C) <- 2 # location of this distribution is now 2. is(C,"Td") # no Modified: branches/distr-2.7/pkg/distr/man/Chisq-class.Rd =================================================================== --- branches/distr-2.7/pkg/distr/man/Chisq-class.Rd 2018-07-08 11:24:16 UTC (rev 1146) +++ branches/distr-2.7/pkg/distr/man/Chisq-class.Rd 2018-07-08 11:36:18 UTC (rev 1147) @@ -107,6 +107,7 @@ d(C)(1) # Density of this distribution is 0.2264666 for x = 1. p(C)(1) # Probability that x < 1 is 0.4772499. q(C)(.1) # Probability that x < 0.04270125 is 0.1. +## in RStudio or Jupyter IRKernel, use q.l(.)(.) instead of q(.)(.) df(C) # df of this distribution is 1. df(C) <- 2 # df of this distribution is now 2. is(C, "Gammad") # no Modified: branches/distr-2.7/pkg/distr/man/DExp-class.Rd =================================================================== --- branches/distr-2.7/pkg/distr/man/DExp-class.Rd 2018-07-08 11:24:16 UTC (rev 1146) +++ branches/distr-2.7/pkg/distr/man/DExp-class.Rd 2018-07-08 11:36:18 UTC (rev 1147) @@ -82,6 +82,7 @@ d(D)(1) # Density of this distribution is 0.1839397 for x = 1. p(D)(1) # Probability that x < 1 is 0.8160603. q(D)(.1) # Probability that x < -1.609438 is 0.1. +## in RStudio or Jupyter IRKernel, use q.l(.)(.) instead of q(.)(.) rate(D) # rate of this distribution is 1. rate(D) <- 2 # rate of this distribution is now 2. 3*D ### still a DExp -distribution Modified: branches/distr-2.7/pkg/distr/man/Dirac-class.Rd =================================================================== --- branches/distr-2.7/pkg/distr/man/Dirac-class.Rd 2018-07-08 11:24:16 UTC (rev 1146) +++ branches/distr-2.7/pkg/distr/man/Dirac-class.Rd 2018-07-08 11:36:18 UTC (rev 1147) @@ -81,6 +81,7 @@ d(D)(0) # Density of this distribution is 1 for x = 0. p(D)(1) # Probability that x < 1 is 1. q(D)(.1) # q(D)(x) is always 0 (= location). +## in RStudio or Jupyter IRKernel, use q.l(.)(.) instead of q(.)(.) location(D) # location of this distribution is 0. location(D) <- 2 # location of this distribution is now 2. } Modified: branches/distr-2.7/pkg/distr/man/DiscreteDistribution-class.Rd =================================================================== --- branches/distr-2.7/pkg/distr/man/DiscreteDistribution-class.Rd 2018-07-08 11:24:16 UTC (rev 1146) +++ branches/distr-2.7/pkg/distr/man/DiscreteDistribution-class.Rd 2018-07-08 11:36:18 UTC (rev 1147) @@ -187,6 +187,7 @@ q(D2)(pp) q(D2)(pp-1e-5) q(D2)(pp+1e-5) +## in RStudio or Jupyter IRKernel, use q.l(.)(.) instead of q(.)(.) q.r(D2)(pp) q.r(D2)(pp-1e-5) q.r(D2)(pp+1e-5) Modified: branches/distr-2.7/pkg/distr/man/Exp-class.Rd =================================================================== --- branches/distr-2.7/pkg/distr/man/Exp-class.Rd 2018-07-08 11:24:16 UTC (rev 1146) +++ branches/distr-2.7/pkg/distr/man/Exp-class.Rd 2018-07-08 11:36:18 UTC (rev 1147) @@ -88,6 +88,7 @@ d(E)(1) # Density of this distribution is 0.3678794 for x = 1. p(E)(1) # Probability that x < 1 is 0.6321206. q(E)(.1) # Probability that x < 0.1053605 is 0.1. +## in RStudio or Jupyter IRKernel, use q.l(.)(.) instead of q(.)(.) rate(E) # rate of this distribution is 1. rate(E) <- 2 # rate of this distribution is now 2. is(E, "Gammad") # yes Modified: branches/distr-2.7/pkg/distr/man/Fd-class.Rd =================================================================== --- branches/distr-2.7/pkg/distr/man/Fd-class.Rd 2018-07-08 11:24:16 UTC (rev 1146) +++ branches/distr-2.7/pkg/distr/man/Fd-class.Rd 2018-07-08 11:36:18 UTC (rev 1147) @@ -91,6 +91,7 @@ d(F)(1) # Density of this distribution is 0.1591549 for x=1 . p(F)(1) # Probability that x<1 is 0.5. q(F)(.1) # Probability that x<0.02508563 is 0.1. +## in RStudio or Jupyter IRKernel, use q.l(.)(.) instead of q(.)(.) df1(F) # df1 of this distribution is 1. df1(F) <- 2 # df1 of this distribution is now 2. Fn <- Fd(df1 = 1, df2 = 1, ncp = 0.5) Modified: branches/distr-2.7/pkg/distr/man/Gammad-class.Rd =================================================================== --- branches/distr-2.7/pkg/distr/man/Gammad-class.Rd 2018-07-08 11:24:16 UTC (rev 1146) +++ branches/distr-2.7/pkg/distr/man/Gammad-class.Rd 2018-07-08 11:36:18 UTC (rev 1147) @@ -86,6 +86,7 @@ d(G)(1) # Density of this distribution is 0.3678794 for x=1. p(G)(1) # Probability that x<1 is 0.6321206. q(G)(.1) # Probability that x<0.1053605 is 0.1. +## in RStudio or Jupyter IRKernel, use q.l(.)(.) instead of q(.)(.) scale(G) # scale of this distribution is 1. scale(G) <- 2 # scale of this distribution is now 2. } Modified: branches/distr-2.7/pkg/distr/man/Geom-class.Rd =================================================================== --- branches/distr-2.7/pkg/distr/man/Geom-class.Rd 2018-07-08 11:24:16 UTC (rev 1146) +++ branches/distr-2.7/pkg/distr/man/Geom-class.Rd 2018-07-08 11:36:18 UTC (rev 1147) @@ -94,6 +94,7 @@ d(G)(1) # Density of this distribution is 0.25 for x = 1. p(G)(1) # Probability that x<1 is 0.75. q(G)(.1) # x = 0 is the smallest value x such that p(G)(x) >= 0.1. +## in RStudio or Jupyter IRKernel, use q.l(.)(.) instead of q(.)(.) prob(G) # prob of this distribution is 0.5. prob(G) <- 0.6 # prob of this distribution is now 0.6. as(G,"Nbinom") Modified: branches/distr-2.7/pkg/distr/man/Hyper-class.Rd =================================================================== --- branches/distr-2.7/pkg/distr/man/Hyper-class.Rd 2018-07-08 11:24:16 UTC (rev 1146) +++ branches/distr-2.7/pkg/distr/man/Hyper-class.Rd 2018-07-08 11:36:18 UTC (rev 1147) @@ -84,6 +84,7 @@ d(H)(1) # Density of this distribution is 0.45 for x=1. p(H)(1) # Probability that x<1 is 0.5. q(H)(.1) # x=1 is the smallest value x such that p(H)(x)>=0.1. +## in RStudio or Jupyter IRKernel, use q.l(.)(.) instead of q(.)(.) m(H) # m of this distribution is 3. m(H) <- 2 # m of this distribution is now 2. } Modified: branches/distr-2.7/pkg/distr/man/LatticeDistribution-class.Rd =================================================================== --- branches/distr-2.7/pkg/distr/man/LatticeDistribution-class.Rd 2018-07-08 11:24:16 UTC (rev 1146) +++ branches/distr-2.7/pkg/distr/man/LatticeDistribution-class.Rd 2018-07-08 11:36:18 UTC (rev 1147) @@ -170,6 +170,7 @@ d(D4)(1) # The (approximated) density for x=1 is 0.1282716. p(D4)(1) # The (approximated) probability that x<=1 is 0.1282716. q(D4)(.5) # The (approximated) 50 percent quantile is 3. +## in RStudio or Jupyter IRKernel, use q.l(.)(.) instead of q(.)(.) } \keyword{distribution} \concept{discrete distribution} Modified: branches/distr-2.7/pkg/distr/man/Lnorm-class.Rd =================================================================== --- branches/distr-2.7/pkg/distr/man/Lnorm-class.Rd 2018-07-08 11:24:16 UTC (rev 1146) +++ branches/distr-2.7/pkg/distr/man/Lnorm-class.Rd 2018-07-08 11:36:18 UTC (rev 1147) @@ -91,6 +91,7 @@ d(L)(1) # Density of this distribution is 0.2419707 for x=1. p(L)(1) # Probability that x<1 is 0.1586553. q(L)(.1) # Probability that x<0.754612 is 0.1. +## in RStudio or Jupyter IRKernel, use q.l(.)(.) instead of q(.)(.) meanlog(L) # meanlog of this distribution is 1. meanlog(L) <- 2 # meanlog of this distribution is now 2. } Modified: branches/distr-2.7/pkg/distr/man/Logis-class.Rd =================================================================== --- branches/distr-2.7/pkg/distr/man/Logis-class.Rd 2018-07-08 11:24:16 UTC (rev 1146) +++ branches/distr-2.7/pkg/distr/man/Logis-class.Rd 2018-07-08 11:36:18 UTC (rev 1147) @@ -91,6 +91,7 @@ d(L)(1) # Density of this distribution is 0.25 for x = 1. p(L)(1) # Probability that x < 1 is 0.5. q(L)(.1) # Probability that x < -1.197225 is 0.1. +## in RStudio or Jupyter IRKernel, use q.l(.)(.) instead of q(.)(.) location(L) # location of this distribution is 1. location(L) <- 2 # location of this distribution is now 2. } Modified: branches/distr-2.7/pkg/distr/man/Nbinom-class.Rd =================================================================== --- branches/distr-2.7/pkg/distr/man/Nbinom-class.Rd 2018-07-08 11:24:16 UTC (rev 1146) +++ branches/distr-2.7/pkg/distr/man/Nbinom-class.Rd 2018-07-08 11:36:18 UTC (rev 1147) @@ -88,6 +88,7 @@ d(N)(1) # Density of this distribution is 0.25 for x=1. p(N)(0.4) # Probability that x<0.4 is 0.5. q(N)(.1) # x=0 is the smallest value x such that p(B)(x)>=0.1. +## in RStudio or Jupyter IRKernel, use q.l(.)(.) instead of q(.)(.) size(N) # size of this distribution is 1. size(N) <- 2 # size of this distribution is now 2. } Modified: branches/distr-2.7/pkg/distr/man/Norm-class.Rd =================================================================== --- branches/distr-2.7/pkg/distr/man/Norm-class.Rd 2018-07-08 11:24:16 UTC (rev 1146) +++ branches/distr-2.7/pkg/distr/man/Norm-class.Rd 2018-07-08 11:36:18 UTC (rev 1147) @@ -85,6 +85,7 @@ d(N)(1) # Density of this distribution is 0.3989423 for x=1. p(N)(1) # Probability that x<1 is 0.5. q(N)(.1) # Probability that x<-0.2815516 is 0.1. +## in RStudio or Jupyter IRKernel, use q.l(.)(.) instead of q(.)(.) mean(N) # mean of this distribution is 1. sd(N) <- 2 # sd of this distribution is now 2. M <- Norm() # M is a normal distribution with mean=0 and sd=1. Modified: branches/distr-2.7/pkg/distr/man/Pois-class.Rd =================================================================== --- branches/distr-2.7/pkg/distr/man/Pois-class.Rd 2018-07-08 11:24:16 UTC (rev 1146) +++ branches/distr-2.7/pkg/distr/man/Pois-class.Rd 2018-07-08 11:36:18 UTC (rev 1147) @@ -90,6 +90,7 @@ d(P)(1) # Density of this distribution is 0.3678794 for x = 1. p(P)(0.4) # Probability that x < 0.4 is 0.3678794. q(P)(.1) # x = 0 is the smallest value x such that p(B)(x) >= 0.1. +## in RStudio or Jupyter IRKernel, use q.l(.)(.) instead of q(.)(.) lambda(P) # lambda of this distribution is 1. lambda(P) <- 2 # lambda of this distribution is now 2. R <- Pois(lambda = 3) # R is a Poisson distribution with lambda = 2. Modified: branches/distr-2.7/pkg/distr/man/Td-class.Rd =================================================================== --- branches/distr-2.7/pkg/distr/man/Td-class.Rd 2018-07-08 11:24:16 UTC (rev 1146) +++ branches/distr-2.7/pkg/distr/man/Td-class.Rd 2018-07-08 11:36:18 UTC (rev 1147) @@ -106,6 +106,7 @@ d(T)(1) # Density of this distribution is 0.1591549 for x = 1. p(T)(1) # Probability that x < 1 is 0.75. q(T)(.1) # Probability that x < -3.077684 is 0.1. +## in RStudio or Jupyter IRKernel, use q.l(.)(.) instead of q(.)(.) df(T) # df of this distribution is 1. df(T) <- 2 # df of this distribution is now 2. Tn <- Td(df = 1, ncp = 5) Modified: branches/distr-2.7/pkg/distr/man/Truncate-methods.Rd =================================================================== --- branches/distr-2.7/pkg/distr/man/Truncate-methods.Rd 2018-07-08 11:24:16 UTC (rev 1146) +++ branches/distr-2.7/pkg/distr/man/Truncate-methods.Rd 2018-07-08 11:36:18 UTC (rev 1147) @@ -36,7 +36,7 @@ points lie on the same side of the median, we use this representation to enhance the range of applicability, in particular, for slot \code{r}, we profit from Peter Dalgaard's clever log-tricks as indicated in -\url{http://article.gmane.org/gmane.comp.lang.r.general/126112}. To this +\url{http://r.789695.n4.nabble.com/help-on-sampling-from-the-truncated-normal-gamma-distribution-on-the-far-end-probability-is-very-low-td868119.html#a868120}. To this end we use the internal functions (i.e.; non exported to namespace) \code{\link{.trunc.up}} and \code{\link{.trunc.low}} which provide functional slots \code{r,d,p,q} for Modified: branches/distr-2.7/pkg/distr/man/Unif-class.Rd =================================================================== --- branches/distr-2.7/pkg/distr/man/Unif-class.Rd 2018-07-08 11:24:16 UTC (rev 1146) +++ branches/distr-2.7/pkg/distr/man/Unif-class.Rd 2018-07-08 11:36:18 UTC (rev 1147) @@ -81,6 +81,7 @@ d(U)(1) # Density of this distribution is 0.5 for x=1. p(U)(1) # Probability that x<1 is 0.5. q(U)(.1) # Probability that x<0.2 is 0.1. +## in RStudio or Jupyter IRKernel, use q.l(.)(.) instead of q(.)(.) Min(U) # Min of this distribution is 0. Min(U) <- 1 # Min of this distribution is now 1. Min(U) # Min of this distribution is 1. Modified: branches/distr-2.7/pkg/distr/man/UnivarLebDecDistribution-class.Rd =================================================================== --- branches/distr-2.7/pkg/distr/man/UnivarLebDecDistribution-class.Rd 2018-07-08 11:24:16 UTC (rev 1146) +++ branches/distr-2.7/pkg/distr/man/UnivarLebDecDistribution-class.Rd 2018-07-08 11:36:18 UTC (rev 1147) @@ -265,6 +265,7 @@ p(myLC)(0.3) r(myLC)(30) q(myLC)(0.9) +## in RStudio or Jupyter IRKernel, use q.l(.)(.) instead of q(.)(.) acPart(myLC) plot(myLC) d.discrete(myLC)(2) Modified: branches/distr-2.7/pkg/distr/man/Weibull-class.Rd =================================================================== --- branches/distr-2.7/pkg/distr/man/Weibull-class.Rd 2018-07-08 11:24:16 UTC (rev 1146) +++ branches/distr-2.7/pkg/distr/man/Weibull-class.Rd 2018-07-08 11:36:18 UTC (rev 1147) @@ -90,6 +90,7 @@ d(W)(1) # Density of this distribution is 0.3678794 for x=1. p(W)(1) # Probability that x<1 is 0.6321206. q(W)(.1) # Probability that x<0.1053605 is 0.1. +## in RStudio or Jupyter IRKernel, use q.l(.)(.) instead of q(.)(.) shape(W) # shape of this distribution is 1. shape(W) <- 2 # shape of this distribution is now 2. } Modified: branches/distr-2.7/pkg/distr/man/internals.Rd =================================================================== --- branches/distr-2.7/pkg/distr/man/internals.Rd 2018-07-08 11:24:16 UTC (rev 1146) +++ branches/distr-2.7/pkg/distr/man/internals.Rd 2018-07-08 11:36:18 UTC (rev 1147) @@ -381,7 +381,7 @@ classes \code{DiscreteDistribution} and \code{AbscontDistribution} for one-sided truncation, using (for slot \code{r}) Peter Dalgaard's clever log-tricks as indicated in -\url{http://article.gmane.org/gmane.comp.lang.r.general/126112}. +\url{http://r.789695.n4.nabble.com/help-on-sampling-from-the-truncated-normal-gamma-distribution-on-the-far-end-probability-is-very-low-td868119.html#a868120}. \code{.modifyqgaps} modifies slot \code{q} for objects of class \code{AbscontDistribution} in the presence of gaps, i.e.; if slot Modified: branches/distr-2.7/pkg/distr/man/q-methods.Rd =================================================================== --- branches/distr-2.7/pkg/distr/man/q-methods.Rd 2018-07-08 11:24:16 UTC (rev 1146) +++ branches/distr-2.7/pkg/distr/man/q-methods.Rd 2018-07-08 11:36:18 UTC (rev 1147) @@ -31,6 +31,7 @@ require(distr) N <- Norm() q(N)(0.3) +## in RStudio or Jupyter IRKernel, use q.l(.)(.) instead of q(.)(.) q.l(N)(0.3) } From noreply at r-forge.r-project.org Sun Jul 8 13:37:54 2018 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Sun, 8 Jul 2018 13:37:54 +0200 (CEST) Subject: [Distr-commits] r1148 - branches/distr-2.7/pkg/distr/demo Message-ID: <20180708113754.A75F71802F0@r-forge.r-project.org> Author: ruckdeschel Date: 2018-07-08 13:37:51 +0200 (Sun, 08 Jul 2018) New Revision: 1148 Modified: branches/distr-2.7/pkg/distr/demo/ConvolutionNormalDistr.R branches/distr-2.7/pkg/distr/demo/Expectation.R branches/distr-2.7/pkg/distr/demo/StationaryRegressorDistr.R branches/distr-2.7/pkg/distr/demo/nFoldConvolution.R branches/distr-2.7/pkg/distr/demo/range.R Log: [branches: distr]: began with major update to version 2.7 / replace calls to q(distr) with q.l(distr) in demos Modified: branches/distr-2.7/pkg/distr/demo/ConvolutionNormalDistr.R =================================================================== --- branches/distr-2.7/pkg/distr/demo/ConvolutionNormalDistr.R 2018-07-08 11:36:18 UTC (rev 1147) +++ branches/distr-2.7/pkg/distr/demo/ConvolutionNormalDistr.R 2018-07-08 11:37:51 UTC (rev 1148) @@ -22,8 +22,8 @@ eps <- 1e-8 distroptions("TruncQuantile" = eps) ## support of A1+B1 for FFT convolution is -## [q(A1)(TruncQuantile), -## q(B1)(TruncQuantile, lower.tail = FALSE)] +## [q.l(A1)(TruncQuantile), +## q.l(B1)(TruncQuantile, lower.tail = FALSE)] ## convolution via FFT AB1 <- A1+B1 @@ -32,8 +32,8 @@ ## plots of the results ############################# par(mfrow=c(1,3)) -low <- q(AB)(1e-15) -upp <- q(AB)(1e-15, lower.tail = FALSE) +low <- q.l(AB)(1e-15) +upp <- q.l(AB)(1e-15, lower.tail = FALSE) x <- seq(from = low, to = upp, length = 10000) ## densities @@ -52,10 +52,10 @@ ## quantile functions x <- seq(from = eps, to = 1-eps, length = 1000) -plot(x, q(AB)(x), type = "l", lwd = 5) -lines(x , q(AB1)(x), col = "orange", lwd = 1) +plot(x, q.l(AB)(x), type = "l", lwd = 5) +lines(x , q.l(AB1)(x), col = "orange", lwd = 1) title("Quantile functions") -legend(0, q(AB)(eps, lower.tail = FALSE), +legend(0, q.l(AB)(eps, lower.tail = FALSE), legend = c("exact", "FFT"), fill = c("black", "orange")) Modified: branches/distr-2.7/pkg/distr/demo/Expectation.R =================================================================== --- branches/distr-2.7/pkg/distr/demo/Expectation.R 2018-07-08 11:36:18 UTC (rev 1147) +++ branches/distr-2.7/pkg/distr/demo/Expectation.R 2018-07-08 11:37:51 UTC (rev 1148) @@ -11,8 +11,8 @@ function(object, fun){ integrand <- function(x) fun(x) * d(object)(x) return(integrate(f = integrand, - lower = q(object)(0), - upper = q(object)(1))$value) + lower = q.l(object)(0), + upper = q.l(object)(1))$value) }) setMethod("E", Modified: branches/distr-2.7/pkg/distr/demo/StationaryRegressorDistr.R =================================================================== --- branches/distr-2.7/pkg/distr/demo/StationaryRegressorDistr.R 2018-07-08 11:36:18 UTC (rev 1147) +++ branches/distr-2.7/pkg/distr/demo/StationaryRegressorDistr.R 2018-07-08 11:37:51 UTC (rev 1148) @@ -40,8 +40,8 @@ ## plots of the results ############################# par(mfrow=c(1,3)) -low <- q(X)(1e-15) -upp <- q(X)(1e-15, lower.tail = FALSE) +low <- q.l(X)(1e-15) +upp <- q.l(X)(1e-15, lower.tail = FALSE) x <- seq(from = low, to = upp, length = 10000) ## densities @@ -60,8 +60,8 @@ ## quantile functions x <- seq(from = eps, to = 1-eps, length = 1000) -plot(x, q(X)(x),type = "l", lwd = 5) -lines(x , q(H)(x), col = "orange", lwd = 1) +plot(x, q.l(X)(x),type = "l", lwd = 5) +lines(x , q.l(H)(x), col = "orange", lwd = 1) title("Quantile functions") legend( "topleft", legend=c("exact", "FFT"), Modified: branches/distr-2.7/pkg/distr/demo/nFoldConvolution.R =================================================================== --- branches/distr-2.7/pkg/distr/demo/nFoldConvolution.R 2018-07-08 11:36:18 UTC (rev 1147) +++ branches/distr-2.7/pkg/distr/demo/nFoldConvolution.R 2018-07-08 11:37:51 UTC (rev 1148) @@ -32,11 +32,11 @@ ##STEP 1 - lower <- ifelse((q(D1)(0) > - Inf), q(D1)(0), - q(D1)(getdistrOption("TruncQuantile")) + lower <- ifelse((q.l(D1)(0) > - Inf), q.l(D1)(0), + q.l(D1)(getdistrOption("TruncQuantile")) ) - upper <- ifelse((q(D1)(1) < Inf), q(D1)(1), - q(D1)(getdistrOption("TruncQuantile"), + upper <- ifelse((q.l(D1)(1) < Inf), q.l(D1)(1), + q.l(D1)(getdistrOption("TruncQuantile"), lower.tail = FALSE) ) @@ -95,10 +95,10 @@ ## quantile with continuity correction h/2 - yleft <- ifelse(((q(D1)(0) == -Inf)| - (q(D1)(0) == -Inf)), -Inf, N*lower) - yright <- ifelse(((q(D1)(1) == Inf)| - (q(D1)(1) == Inf)), Inf, N*upper) + yleft <- ifelse(((q.l(D1)(0) == -Inf)| + (q.l(D1)(0) == -Inf)), -Inf, N*lower) + yright <- ifelse(((q.l(D1)(1) == Inf)| + (q.l(D1)(1) == Inf)), Inf, N*upper) w0 <- options("warn") options(warn = -1) qnfun1 <- approxfun(x = pnfun2(x+0.5*h), y = x+0.5*h, @@ -138,8 +138,8 @@ ## plots of the results eps <- getdistrOption("TruncQuantile") par(mfrow=c(1,3)) -low <- q(AN1)(eps) -upp <- q(AN1)(eps, lower.tail = FALSE) +low <- q.l(AN1)(eps) +upp <- q.l(AN1)(eps, lower.tail = FALSE) x <- seq(from = low, to = upp, length = 10000) ## densities @@ -158,8 +158,8 @@ ## quantile functions x <- seq(from = eps, to = 1-eps, length = 1000) -plot(x, q(AN1)(x), type = "l", lwd = 5) -lines(x , q(AN)(x), col = "orange", lwd = 1) +plot(x, q.l(AN1)(x), type = "l", lwd = 5) +lines(x , q.l(AN)(x), col = "orange", lwd = 1) title("Quantile functions") legend("topleft", legend = c("exact", "FFT"), Modified: branches/distr-2.7/pkg/distr/demo/range.R =================================================================== --- branches/distr-2.7/pkg/distr/demo/range.R 2018-07-08 11:36:18 UTC (rev 1147) +++ branches/distr-2.7/pkg/distr/demo/range.R 2018-07-08 11:37:51 UTC (rev 1148) @@ -28,7 +28,7 @@ fnt0 <- function(u0,s) d(object)(s)*d(object)(s+u0)*(p(object)(s+u0)-p(object)(s))^(e2-2)*e2*(e2-1) fu0 <- function(u) integrate(fnt0, lower=-Inf, upper=Inf, u0=u)$value*(u>0) xgrid <- seq(0, - q(object)(1e-6, lower.tail = FALSE)-q(object)(1e-6), + q.l(object)(1e-6, lower.tail = FALSE)-q.l(object)(1e-6), length = getdistrOption("DefaultNrGridPoints")/10) fx <- sapply(xgrid, fu) pnew <- approxfun(xgrid, fx, yleft = 0, yright = 1) @@ -36,11 +36,11 @@ dnew <- approxfun(xgrid, fx0, yleft = 0, yright = 0) ## new quantile function - lower <- q(object)(0) - upper <- q(object)(1) + lower <- q.l(object)(0) + upper <- q.l(object)(1) - maxquantile = q(object)(1e-6, lower.tail = FALSE) - minquantile = q(object)(1e-6) + maxquantile = q.l(object)(1e-6, lower.tail = FALSE) + minquantile = q.l(object)(1e-6) qfun1 <- function(x){ if(x == 0) return(lower) From noreply at r-forge.r-project.org Sun Jul 8 13:38:56 2018 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Sun, 8 Jul 2018 13:38:56 +0200 (CEST) Subject: [Distr-commits] r1149 - branches/distr-2.7/pkg/distr/vignettes Message-ID: <20180708113856.B565B189FC8@r-forge.r-project.org> Author: ruckdeschel Date: 2018-07-08 13:38:54 +0200 (Sun, 08 Jul 2018) New Revision: 1149 Added: branches/distr-2.7/pkg/distr/vignettes/newDistributions-knitr.Rnw Removed: branches/distr-2.7/pkg/distr/vignettes/newDistributions.Rnw Log: [branches: distr]: began with major update to version 2.7 / replace SweaveListingUtils with knitr in vignette Copied: branches/distr-2.7/pkg/distr/vignettes/newDistributions-knitr.Rnw (from rev 1148, branches/distr-2.7/pkg/distr/vignettes/newDistributions.Rnw) =================================================================== --- branches/distr-2.7/pkg/distr/vignettes/newDistributions-knitr.Rnw (rev 0) +++ branches/distr-2.7/pkg/distr/vignettes/newDistributions-knitr.Rnw 2018-07-08 11:38:54 UTC (rev 1149) @@ -0,0 +1,751 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% Vignette "How to generate new distributions in packages distr, distrEx" +% +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +%\VignetteIndexEntry{newDistributions} +%\VignetteDepends{startupmsg} +%\VignetteKeywords{probability distribution,estimation} +%\VignettePackage{distr} +%\VignetteEngine{knitr::knitr} +% +% +% +\documentclass[10pt]{article} +% +%use svn-multi to fill in revision information +% +\usepackage{svn-multi} +% Version control information: +\svnidlong +{$HeadURL$} +{$LastChangedDate$} +{$LastChangedRevision$} +{$LastChangedBy$} +%\svnid{$Id: example_main.tex 146 2008-12-03 13:29:19Z martin $} +% Don't forget to set the svn property 'svn:keywords' to +% 'HeadURL LastChangedDate LastChangedRevision LastChangedBy' or +% 'Id' or both depending if you use \svnidlong and/or \svnid +% +\newcommand{\svnfooter}{Last Changed Rev: \svnkw{LastChangedRevision}} +\svnRegisterAuthor{ruckdeschel}{Peter Ruckdeschel} +\svnRegisterAuthor{stamats}{Matthias Kohl} +\svnRegisterAuthor{florian}{Florian Camphausen} +\svnRegisterAuthor{stabla}{Thomas Stabla} +\svnRegisterAuthor{anhuel}{Anja H{\"u}ller} +\svnRegisterAuthor{ifrin}{Eleonara Feist} +\svnRegisterAuthor{jdospina}{Juan David Ospina} +\svnRegisterAuthor{kowzar}{Kouros Owzar} +% +\usepackage{geometry} +% +\usepackage{color} +\definecolor{darkblue}{rgb}{0.0,0.0,0.75} +\definecolor{distrCol}{rgb}{0.0,0.4,0.4} +\definecolor{Rcolor}{rgb}{0.0,0.5,0.5} +% +\usepackage{ifpdf} +% +\usepackage{url} +\usepackage{amssymb} +\usepackage[% +baseurl={r-forge.r-project.org},% +pdftitle={How to generate new distributions in packages distr, distrEx},% +pdfauthor={Peter Ruckdeschel, Matthias Kohl},% +pdfsubject={distr},% +pdfkeywords={probability distribution,simulation,estimation},% +pagebackref,bookmarks,colorlinks,linkcolor=darkblue,citecolor=darkblue,% +pagecolor=darkblue,raiselinks,plainpages,pdftex]{hyperref} +% +\markboth{\sl How to generate new distributions in packages ``{\tt distr}'', ``{\tt distrEx}''}% +{\sl How to generate new distributions in packages ``{\tt distr}'', ``{\tt distrEx}''} +% +% ------------------------------------------------------------------------------- +\newcommand{\Reals}{\mathbb{R}} +\newcommand{\R}{\mathbb{R}} +\newcommand{\N}{\mathbb{N}} +% +% ------------------------------------------------------------------------------- +\RequirePackage{fancyvrb} +\RequirePackage{listings} +%\usepackage{Sweave} no longer needed +% ------------------------------------------------------------------------------- +%%\SweaveOpts{keep.source=TRUE} +% ------------------------------------------------------------------------------- +%% +%% ------------------------------------------------------------------------------ +%% before version 2.7, we used package SweaveListingUtils for syntax highlighting +%% from version 2.7 on, we switch to knitR +%% ------------------------------------------------------------------------------ +%% +%%#(ll)SweaveListingsPreparations, results="asis", echo=FALSE(ggeq) +%%#require(SweaveListingUtils) +%%#SweaveListingPreparations() +%%#setToBeDefinedPkgs(pkgs = c("distr","distrEx"), +%%# keywordstyles = "\\bf\\color{distrCol}") +%%#(at) +%% +% +% ------------------------------------------------------------------------------- +\begin{document} +% ------------------------------------------------------------------------------- +%% ------------------------------------------------------------------------------ +<>= +library(knitr) +opts_chunk$set(tidy=FALSE) +@ +% ------------------------------------------------------------------------------- +\lstdefinelanguage{Rd}[common]{TeX}% +{moretexcs={acronym,alias,arguments,author,bold,cite,% + code,command,concept,cr,deqn,describe,% + description,details,dfn,doctype,dots,% + dontrun,dontshow,donttest,dQuote,% + email,emph,enc,encoding,enumerate,env,eqn,% + examples,file,format,if,ifelse,item,itemize,kbd,keyword,% + ldots,link,linkS4class,method,name,note,% + option,out,pkg,preformatted,R,Rdopts,Rdversion,% + references,S3method,S4method,Sexpr,samp,section,% + seealso,source,sp,special,sQuote,strong,% + subsection,synopsis,tab,tabular,testonly,% + title,url,usage,value,var,verb}, + sensitive=true,% + morecomment=[l]\%% 2008/9 Peter Ruckdeschel +}[keywords,comments]%% +\lstdefinestyle{Rdstyle}{fancyvrb=TRUE,language=Rd, keywordstyle={\bf},% + basicstyle={\color{black}\footnotesize},% + commentstyle={\ttfamily\itshape},% + alsolanguage=R}% +\global\def\Rdlstset{\lstset{style=Rdstyle}}% +% ------------------------------------------------------------------------------- +\lstset{language=R,basicstyle={\color{Rcolor}\footnotesize},keywordstyle={\bf}} +\let\code\lstinline +\def\Code#1{{\tt\color{Rcolor} #1}} +\def\file#1{{\tt #1}} +\def\pkg#1{{\tt"#1"}} +\newcommand{\pkgversion}{{\tt 2.7}} +% ------------------------------------------------------------------------------- +\title{How to generate new distributions in packages \pkg{distr}, \pkg{distrEx}} +%,version \pkgExversion} +\author{\small Peter Ruckdeschel\thanks{Universit\"at Oldenburg, Oldenburg} +\\[-.5ex] +\small Matthias Kohl\thanks{FH Furtwangen} +\smallskip\\ +\small Institut f\"ur Mathematik\\[-0.5ex] +\small Fakult\"at V - Mathematik und Naturwissenschaften\\[-.5ex] +\small Carl von Ossietzky Universit\"at Oldenburg\\[-0.5ex] +\small PObox 2503\\[-.5ex] +\small 26111 Oldenburg (Oldb)\\[-.5ex] +\small Germany\\ +\small e-Mail: {\small \tt peter.ruckdeschel at uni-oldenburg.de}\medskip\\ +\parbox[t]{5cm}{ +\footnotesize\sffamily + Version control information: +\begin{tabbing} +\footnotesize\sffamily + Last changes revision: \= \kill + Head URL: \> \parbox[t]{6cm}{\url{\svnkw{HeadURL}}}\\[1.2ex] + Last changed date: \> \svndate\\ + Last changes revision: \> \svnrev\\ + Version: \> \svnFullRevision*{\svnrev}\\ + Last changed by: \> \svnFullAuthor*{\svnauthor}\\ +\end{tabbing} +}} + +\maketitle +% ------------------------------------------------------------------------------- +\begin{abstract} +% ------------------------------------------------------------------------------- +In this vignette, we give short examples how to produce new +distributions in packages \pkg{distr} and \pkg{distrEx}. +This vignette refers to package version~\pkgversion. +% ------------------------------------------------------------------------------- +\end{abstract} +% ------------------------------------------------------------------------------- +Basically there are three ways to produce new +distributions in packages \pkg{distr} and \pkg{distrEx}: +\begin{enumerate} +\item automatic generation of single distribution objects by arithmetics and the like +\item using generating functions to produce single distribution objects +\item defining new distribution classes / doing it from scratch +\end{enumerate} +We will give short examples of all three of them. +% ------------------------------------------------------------------------------- +\section{Automatic generation by arithmetics and the like} +% ------------------------------------------------------------------------------- +We have made available quite general arithmetical operations to our distribution +objects, generating new image distribution objects automatically. As an example, try +<>= +require(distr) +@ +<>= +## preparation: set option withSweave to TRUE +require(distr) +distroptions(withSweave = TRUE) +options(width=70) +@ +% +<>= +require(distr) +N <- Norm(mean = 2, sd = 1.3) +P <- Pois(lambda = 1.2) +Z <- 2*N + 3 + P +Z +plot(Z, panel.first = grid(), lwd=3) +p(Z)(0.4) +q(Z)(0.3) +## in RStudio or Jupyter IRKernel, use q.l(.)(.) instead of q(.)(.) +Zs <- r(Z)(50) +Zs +@ +\par +\noindent{\bf Comment:}\\ +Let \code{N} an object of class \code{"Norm"} with parameters \code{mean=2}, +\code{sd=1.3} and let \code{P} an object of class \code{"Pois"} with parameter +\code{lambda=1.2}. Assigning to \code{Z} the expression \code{2*N+3+P}, a +new distribution object is generated ---of class \code{"AbscontDistribution"} in +our case--- so that identifying \code{N}, \code{P}, \code{Z} with random +variables distributed according to {\tt N}, {\tt P}, {\tt Z}, +${\cal L}({\tt Z})={\cal L}(2*{\tt N}+3+{\tt P})$, and writing \code{p(Z)(0.4)} +we get $P(Z\leq 0.4)$, \code{ q(Z)(0.3)} the $30\%$-quantile of {\tt Z}, +and with \code{r(Z)(50)} we generate $50$ pseudo random numbers distributed +according to {\tt Z}, while the \code{plot} command generates the above figure.\\ + +In the environments of \texttt{RStudio}, see \url{https://www.rstudio.com/} and +\texttt{Jupyter IRKernel}, see \url{https://github.com/IRkernel/IRkernel}, +calls to \code{q} are caught away from standard {\sf R} evaluation and are treated +in a non-standard way. This non-standard evaluation in particular throws +errors at calls to our accessor methods \code{q} to slot \code{q} of the +respective distribution object. To amend this, from version 2.6 on, +we provide function \code{q.l} (for left-continuous quantile function) +as alias to our accessors \code{q}, so that all our package functionality also +becomes available in \texttt{RStudio} and \texttt{IRKernel}.\\ + +There are caveats to take care about; for details refer to the (larger) vignette +{\tt distr} in package \pkg{distrDoc}. +% ------------------------------------------------------------------------------- +\section{Using generating functions} +% ------------------------------------------------------------------------------- +If you want to generate a single distribution object (without any particular parameter) +generating functions are the method of choice:\\ + + +Objects of classes \code{LatticeDistribution} resp.\ +\code{DiscreteDistribution}, +\code{AbscontDistribution}, may be generated using the generating functions +\code{LatticeDistribution()} resp.\ \code{DiscreteDistribution()} +resp.\ \code{AbscontDistribution()}; see also +the corresponding help.\\ + +E.g., to produce a discrete distribution with +support $(1,5,7,21)$ with corresponding probabilities $(0.1,0.1,0.6,0.2)$ +we may write +<>= +D <- DiscreteDistribution(supp = c(1,5,7,21), prob = c(0.1,0.1,0.6,0.2)) +D +plot(D, panel.first = grid(lwd=2), lwd = 3) +@ +% +and to generate an absolutely continuous distribution with density proportional +to $e^{-|x|^3}$, we write +<>= +AC <- AbscontDistribution(d = function(x) exp(-abs(x)^3), withStand = TRUE) +AC +plot(AC, panel.first = grid(lwd=2), lwd = 3) +@ +% +% ------------------------------------------------------------------------------- +\section{Doing it from scratch} +% ------------------------------------------------------------------------------- +If you would like to create new parametric distributions, using already +implemented {\tt r}, {\tt d}, {\tt p}, and {\tt q} functions +(e.g.\ implementing additional distributions realized in another +\href{https://cran.r-project.org}{\tt CRAN} package), +you should probably envisage introducing new distribution {\tt S4} (sub-)classes +and hence better look at the implementation of some discrete and +continuous parametric distribution classes in package \pkg{distr}. + +\noindent{\small Hint: download the {\tt .tar.gz} file; extract it to some {\tt temp} +folder; look at subdirectories {\tt R} and {\tt man}}\smallskip\\ + +The general procedure is as follows + +\begin{enumerate} +\item introduce a new subclass of class \code{Parameter} +\item introduce a new subclass of \code{LatticeDistribution}/% +\code{DiscreteDistribution} (if discrete) + or of class \code{AbscontDistribution} (if continuous). +\item define accessor and replacement functions for the ``slots'' of the +parameter (e.g.\ \code{"size"} and \code{"prob"} in the binomial case), +possibly with new generics +\item (possibly) define a validity function +\item define a generating function +\item if existing, define particular convolution methods or similar particular +methods for this new distribution class +\item create {\tt .Rd} files for the +\begin{itemize} + \item parameter class + \item distribution class +\end{itemize} +\item if analytic expressions are available, define particular \code{E}-, \code{var}-, +\code{skewness}-, and \code{kurtosis}-methods + and if so, also document\footnote{% +% +this is new, because so far, all \code{E}-, \code{var}-, +\code{skewness}-, and \code{kurtosis}-methods for ``basic'' +distributions are documented in the \pkg{distrEx} documentation to +\code{E}, \code{var}, \ldots, but this would not be operational +any longer for new derived classes, possibly defined in other, new packages +% + } the corresponding methods in + the distribution class {\tt .Rd} file\\ +\end{enumerate} + +Let's go through the steps in the example case of the Binomial implementation +in packages \pkg{distr} and \pkg{distrEx}: + +\begin{enumerate} +% +\item in \pkg{distr}, see source in \file{R/AllClasses.R}, +% +<>= +## Class: BinomParameter +setClass("BinomParameter", + representation = representation(size = "numeric", prob = "numeric"), + prototype = prototype(size = 1, prob = 0.5, name = + gettext("Parameter of a Binomial distribution") + ), + contains = "Parameter" + ) +@ +% +\item in \pkg{distr}, see source in \file{R/AllClasses.R}, +% +<>= +## Class: binomial distribution +setClass("Binom", + prototype = prototype( + r = function(n){ rbinom(n, size = 1,prob = 0.5) }, + d = function(x, log = FALSE){ + dbinom(x, size = 1, prob = 0.5, log = log) + }, + p = function(q, lower.tail = TRUE, log.p = FALSE ){ + pbinom(q, size = 1, prob = 0.5, + lower.tail = lower.tail, log.p = log.p) + }, + q = function(p, lower.tail = TRUE, log.p = FALSE ){ + qbinom(p, size = 1, prob = 0.5, + lower.tail = lower.tail, log.p = log.p) + }, + img = new("Naturals"), + param = new("BinomParameter"), + support = 0:1, + lattice = new("Lattice", + pivot = 0, width = 1, Length = 2, name = + gettext( + "lattice of a Binomial distribution" + ) + ), + .logExact = TRUE, + .lowerExact = TRUE + ), + contains = "LatticeDistribution" + ) +@ +% +\item in \pkg{distr}, see source in \file{R/BinomialDistribution.R}, +% +<>= +## Access Methods +setMethod("size", "BinomParameter", function(object) object at size) +setMethod("prob", "BinomParameter", function(object) object at prob) +## Replace Methods +setReplaceMethod("size", "BinomParameter", + function(object, value){ object at size <- value; object}) +setReplaceMethod("prob", "BinomParameter", + function(object, value){ object at prob <- value; object}) +@ +% +and \file{R/AllGenerics}, +<>= +if(!isGeneric("size")) + setGeneric("size", function(object) standardGeneric("size")) +if(!isGeneric("prob")) + setGeneric("prob", function(object) standardGeneric("prob")) +@ +% +\item in \pkg{distr}, see source in \file{R/BinomialDistribution.R}, +% +<>= +setValidity("BinomParameter", function(object){ + if(length(prob(object)) != 1) + stop("prob has to be a numeric of length 1") + if(prob(object) < 0) + stop("prob has to be in [0,1]") + if(prob(object) > 1) + stop("prob has to be in [0,1]") + if(length(size(object)) != 1) + stop("size has to be a numeric of length 1") + if(size(object) < 1) + stop("size has to be a natural greater than 0") + if(!identical(floor(size(object)), size(object))) + stop("size has to be a natural greater than 0") + else return(TRUE) +}) +@ +% +\item in \pkg{distr}, see source in \file{R/BinomialDistribution.R}, +% +<>= +Binom <- function(size = 1,prob = 0.5) new("Binom", size = size, prob = prob) +@ +% +\item in \pkg{distr}, see source in \file{R/BinomialDistribution.R}, +% +<>= +## Convolution for two binomial distributions Bin(n1,p1) and Bin(n2,p2) +## Distinguish cases +## p1 == p2 und p1 != p2 + + +setMethod("+", c("Binom","Binom"), + function(e1,e2){ + newsize <- size(e1) + size(e2) + + if(isTRUE(all.equal(prob(e1),prob(e2)))) + return(new("Binom", prob = prob(e1), size = newsize, + .withArith = TRUE)) + + return(as(e1, "LatticeDistribution") + e2) + }) +@ +% +\item in \pkg{distr}, see sources in +% +\begin{itemize} +% +\item\file{man/BinomParameter-class.Rd} +% +\begin{lstlisting}[style = Rdstyle] +\name{BinomParameter-class} +\docType{class} +\alias{BinomParameter-class} +\alias{initialize,BinomParameter-method} + +\title{Class "BinomParameter"} +\description{ The parameter of a binomial distribution, used by Binom-class} +\section{Objects from the Class}{ +Objects can be created by calls of the form + \code{new("BinomParameter", prob, size)}. +Usually an object of this class is not needed on its own, it is generated +automatically when an object of the class Binom +is instantiated. +} +\section{Slots}{ + \describe{ + \item{\code{prob}}{Object of class \code{"numeric"}: + the probability of a binomial distribution } + \item{\code{size}}{Object of class \code{"numeric"}: + the size of a binomial distribution } + \item{\code{name}}{Object of class \code{"character"}: + a name / comment for the parameters } + } +} +\section{Extends}{ +Class \code{"Parameter"}, directly. +} +\section{Methods}{ + \describe{ + \item{initialize}{\code{signature(.Object = "BinomParameter")}: + initialize method } + \item{prob}{\code{signature(object = "BinomParameter")}: returns the slot + \code{prob} of the parameter of the distribution } + \item{prob<-}{\code{signature(object = "BinomParameter")}: modifies the slot + \code{prob} of the parameter of the distribution } + \item{size}{\code{signature(object = "BinomParameter")}: returns the slot + \code{size} of the parameter of the distribution } + \item{size<-}{\code{signature(object = "BinomParameter")}: modifies the slot + \code{size} of the parameter of the distribution} + } +} + +\author{ + Thomas Stabla \email{statho3 at web.de},\cr + Florian Camphausen \email{fcampi at gmx.de},\cr + Peter Ruckdeschel \email{peter.ruckdeschel at uni-oldenburg.de},\cr + Matthias Kohl \email{Matthias.Kohl at stamats.de} + } + + +\seealso{ +\code{\link{Binom-class}} +\code{\link{Parameter-class}} +} + +\examples{ +W <- new("BinomParameter",prob=0.5,size=1) +size(W) # size of this distribution is 1. +size(W) <- 2 # size of this distribution is now 2. +} +\keyword{distribution} +\concept{parameter} +\concept{Binomial distribution} +\concept{S4 parameter class} +\end{lstlisting} + +% +\item\file{man/Binom-class.Rd} +\begin{lstlisting}[style = Rdstyle] +\name{Binom-class} +\docType{class} +\alias{Binom-class} +\alias{Binom} +\alias{initialize,Binom-method} + +\title{Class "Binom" } +\description{The binomial distribution with \code{size} \eqn{= n}, by default + \eqn{=1}, and + \code{prob} \eqn{= p}, by default \eqn{=0.5}, has density + \deqn{p(x) = {n \choose x} {p}^{x} {(1-p)}^{n-x}}{ + p(x) = choose(n,x) p^x (1-p)^(n-x)} + for \eqn{x = 0, \ldots, n}. + + C.f.\code{\link[stats:Binomial]{rbinom}} +} +\section{Objects from the Class}{ +Objects can be created by calls of the form \code{Binom(prob, size)}. +This object is a binomial distribution. +} +\section{Slots}{ + \describe{ + \item{\code{img}}{Object of class \code{"Naturals"}: The space of the + image of this distribution has got dimension 1 and the + name "Natural Space". } + \item{\code{param}}{Object of class \code{"BinomParameter"}: the parameter + of this distribution (\code{prob}, \code{size}), declared at its + instantiation } + \item{\code{r}}{Object of class \code{"function"}: generates random + numbers (calls function \code{rbinom}) } + \item{\code{d}}{Object of class \code{"function"}: density function (calls + function \code{dbinom}) } + \item{\code{p}}{Object of class \code{"function"}: cumulative function + (calls function \code{pbinom}) } + \item{\code{q}}{Object of class \code{"function"}: inverse of the + cumulative function (calls function \code{qbinom}). + The quantile is defined as the smallest value x such that F(x) >= p, where + F is the cumulative function. } + \item{\code{support}}{Object of class \code{"numeric"}: a (sorted) + vector containing the support of the discrete density function} + \item{\code{.withArith}}{logical: used internally to issue warnings as to + interpretation of arithmetics} + \item{\code{.withSim}}{logical: used internally to issue warnings as to + accuracy} + \item{\code{.logExact}}{logical: used internally to flag the case where + there are explicit formulae for the log version of density, cdf, and + quantile function} + \item{\code{.lowerExact}}{logical: used internally to flag the case where + there are explicit formulae for the lower tail version of cdf and quantile + function} + \item{\code{Symmetry}}{object of class \code{"DistributionSymmetry"}; + used internally to avoid unnecessary calculations.} + } +} +\section{Extends}{ +Class \code{"DiscreteDistribution"}, directly.\cr +Class \code{"UnivariateDistribution"}, by class \code{"DiscreteDistribution"}.\cr +Class \code{"Distribution"}, by class \code{"DiscreteDistribution"}. +} +\section{Methods}{ + \describe{ + \item{+}{\code{signature(e1 = "Binom", e2 = "Binom")}: For two binomial + distributions with equal probabilities the exact convolution + formula is implemented thereby improving the general numerical + accuracy.} + \item{initialize}{\code{signature(.Object = "Binom")}: initialize method } + \item{prob}{\code{signature(object = "Binom")}: returns the slot \code{prob} + of the parameter of the distribution } + \item{prob<-}{\code{signature(object = "Binom")}: modifies the slot + \code{prob} of the parameter of the distribution } + \item{size}{\code{signature(object = "Binom")}: returns the slot \code{size} + of the parameter of the distribution } + \item{size<-}{\code{signature(object = "Binom")}: modifies the slot + \code{size} of the parameter of the distribution } + } +} + + +\author{ + Thomas Stabla \email{statho3 at web.de},\cr + Florian Camphausen \email{fcampi at gmx.de},\cr + Peter Ruckdeschel \email{peter.ruckdeschel at uni-oldenburg.de},\cr + Matthias Kohl \email{Matthias.Kohl at stamats.de} + } + + +\seealso{ +\code{\link{BinomParameter-class}} +\code{\link{DiscreteDistribution-class}} +\code{\link{Naturals-class}} +\code{\link[stats:Binomial]{rbinom}} +} +\examples{ +B <- Binom(prob=0.5,size=1) # B is a binomial distribution with prob=0.5 and size=1. +r(B)(1) # # one random number generated from this distribution, e.g. 1 +d(B)(1) # Density of this distribution is 0.5 for x=1. +p(B)(0.4) # Probability that x<0.4 is 0.5. +q(B)(.1) # x=0 is the smallest value x such that p(B)(x)>=0.1. +## in RStudio or Jupyter IRKernel, use q.l(.)(.) instead of q(.)(.) +size(B) # size of this distribution is 1. +size(B) <- 2 # size of this distribution is now 2. +C <- Binom(prob = 0.5, size = 1) # C is a binomial distribution with prob=0.5 and size=1. +D <- Binom(prob = 0.6, size = 1) # D is a binomial distribution with prob=0.6 and size=1. +E <- B + C # E is a binomial distribution with prob=0.5 and size=3. +F <- B + D # F is an object of class LatticeDistribution. +G <- B + as(D,"DiscreteDistribution") ## DiscreteDistribution +} +\keyword{distribution} +\concept{discrete distribution} +\concept{lattice distribution} +\concept{Binomial family} +\concept{Binomial distribution} +\concept{S4 distribution class} +\concept{generating function} +\end{lstlisting} + +% +\item {\footnotesize you could have: \file{man/Binom.Rd} + for the generating function; in the Binomial case, documentation is in + \file{Binom-class.Rd}; but in case of the Gumbel distribution, + in package \pkg{distrEx}, there is such an extra {\tt .Rd} file} +% +\end{itemize} +% +\item in \pkg{distrEx}, see sources in +% +<>= +## preparation: set option withSweave to TRUE +require(distrEx) +@ +% +\begin{itemize} +% +\item\file{Expectation.R}, +<>= +setMethod("E", signature(object = "Binom", + fun = "missing", + cond = "missing"), + function(object, low = NULL, upp = NULL, ...){ + if(!is.null(low)) if(low <= min(support(object))) low <- NULL + if(!is.null(upp)) if(upp >= max(support(object))) upp <- NULL + if(is.null(low) && is.null(upp)) + return(size(object)*prob(object)) + else{ + if(is.null(low)) low <- -Inf + if(is.null(upp)) upp <- Inf + if(low == -Inf){ + if(upp == Inf) return(size(object)*prob(object)) + else return(m1df(object, upper = upp, ...)) + }else{ + E1 <- m1df(object, upper = low, ...) + E2 <- if(upp == Inf) + size(object)*prob(object) else m1df(object, upper = upp, ...) + return(E2-E1) + } + } + }) +@ +% +\item\file{Functionals.R}, +<>= +setMethod("var", signature(x = "Binom"), + function(x,...){ + dots <- match.call(call = sys.call(sys.parent(1)), + expand.dots = FALSE)$"..." + fun <- NULL; cond <- NULL; low <- NULL; upp <- NULL + if(hasArg(low)) low <- dots$low + if(hasArg(upp)) upp <- dots$upp + if(hasArg(fun)||hasArg(cond)||!is.null(low)||!is.null(upp)) + return(var(as(x,"DiscreteDistribution"),...)) + else + return(size(x)*prob(x)*(1-prob(x))) + }) +@ +% +\item\file{skewness.R}, +<>= +setMethod("skewness", signature(x = "Binom"), + function(x, ...){ + dots <- match.call(call = sys.call(sys.parent(1)), + expand.dots = FALSE)$"..." + fun <- NULL; cond <- NULL; low <- NULL; upp <- NULL + if(hasArg(low)) low <- dots$low + if(hasArg(upp)) upp <- dots$upp + if(hasArg(fun)||hasArg(cond)||!is.null(low)||!is.null(upp)) + return(skewness(as(x,"DiscreteDistribution"),...)) + else + return((1-2*prob(x))/sqrt(size(x)*prob(x)*(1-prob(x)))) + }) +@ +% +\item\file{kurtosis.R}, +<>= +setMethod("kurtosis", signature(x = "Binom"), + function(x, ...){ + dots <- match.call(call = sys.call(sys.parent(1)), + expand.dots = FALSE)$"..." + fun <- NULL; cond <- NULL; low <- NULL; upp <- NULL + if(hasArg(low)) low <- dots$low + if(hasArg(upp)) upp <- dots$upp + if(hasArg(fun)||hasArg(cond)||!is.null(low)||!is.null(upp)) + return(kurtosis(as(x,"DiscreteDistribution"),...)) + else + p <- prob(x) + return((1-6*p*(1-p))/(size(x)*p*(1-p))) + }) +@ +% +\end{itemize} +\end{enumerate} +The procedure will be similar for \textit{any} new class of distributions.\medskip +\begin{itemize} + \item[Comment] In the classes in package \pkg{distr} (historically the ``oldest'' + in the development of this project), we still use \code{initialize} methods; + this is no longer needed, if you provide generating functions; for this ``more + recent'' approach, confer the realization of class \code{Gumbel} in package \pkg{distrEx}. +\end{itemize} + +% ------------------------------------------------------------------------------- +\section{Help needed / collaboration welcome} +% ------------------------------------------------------------------------------- +You are --- as announced on +\href{https://distr.r-forge.r-project.org}{\tt http://distr.r-forge.r-project.org} --- + very welcome to collaborate in this project! +See in particular +\href{https://distr.r-forge.r-project.org/HOWTO-collaborate.txt}% +{\tt https://distr.r-forge.r-project.org/HOWTO-collaborate.txt} + +With this you should be able to start working. +\begin{thebibliography}{2} + +\bibitem{K:R:S:04} +Ruckdeschel P. and Kohl, M. (2014): +\newblock {General Purpose Convolution Algorithm for Distributions in S4-Classes +by means of FFT}. +\newblock {\em J. Statist. Software\/}, {\bf 59}(4): 1--25. + +\bibitem{R:K:S:C:04} +Ruckdeschel P., Kohl M., Stabla T., and Camphausen F. (2006): +\newblock {S4 Classes for Distributions.} +\newblock {\em R-News\/}, {\bf 6}(2): 10--13. +\newblock https://CRAN.R-project.org/doc/Rnews/Rnews\_2006-2.pdf +%\newblock See also {http://www.uni-bayreuth.de/departments/math/org/mathe7/RUCKDESCHEL/pubs/distr.pdf} + +\end{thebibliography} +% no longer needed +%%(ll)cleanup, echo=FALSE(ggeq) +%%#unloadNamespace("SweaveListingUtils") +%%(at) +% ------------------------------------------------------------------------------- +\end{document} +% ------------------------------------------------------------------------------- Deleted: branches/distr-2.7/pkg/distr/vignettes/newDistributions.Rnw =================================================================== --- branches/distr-2.7/pkg/distr/vignettes/newDistributions.Rnw 2018-07-08 11:37:51 UTC (rev 1148) +++ branches/distr-2.7/pkg/distr/vignettes/newDistributions.Rnw 2018-07-08 11:38:54 UTC (rev 1149) @@ -1,413 +0,0 @@ -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% -% Vignette "How to generate new distributions in packages distr, distrEx" -% -% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% -%\VignetteIndexEntry{newDistributions} -%\VignetteDepends{startupmsg} -%\VignetteKeywords{probability distribution,estimation} -%\VignettePackage{distr} -% -% -% -\documentclass[10pt]{article} -% -%use svn-multi to fill in revision information -% -\usepackage{svn-multi} -% Version control information: -\svnidlong -{$HeadURL$} -{$LastChangedDate$} -{$LastChangedRevision$} -{$LastChangedBy$} -%\svnid{$Id: example_main.tex 146 2008-12-03 13:29:19Z martin $} -% Don't forget to set the svn property 'svn:keywords' to -% 'HeadURL LastChangedDate LastChangedRevision LastChangedBy' or -% 'Id' or both depending if you use \svnidlong and/or \svnid -% -\newcommand{\svnfooter}{Last Changed Rev: \svnkw{LastChangedRevision}} -\svnRegisterAuthor{ruckdeschel}{Peter Ruckdeschel} -\svnRegisterAuthor{stamats}{Matthias Kohl} -\svnRegisterAuthor{florian}{Florian Camphausen} -\svnRegisterAuthor{stabla}{Thomas Stabla} -\svnRegisterAuthor{anhuel}{Anja H{\"u}ller} -\svnRegisterAuthor{ifrin}{Eleonara Feist} -\svnRegisterAuthor{jdospina}{Juan David Ospina} -\svnRegisterAuthor{kowzar}{Kouros Owzar} -% -\usepackage{geometry} -% -\usepackage{color} -\definecolor{darkblue}{rgb}{0.0,0.0,0.75} -\definecolor{distrCol}{rgb}{0.0,0.4,0.4} -% -\usepackage{ifpdf} -% -\usepackage{url} -\usepackage{amssymb} -\usepackage[% -baseurl={r-forge.r-project.org},% -pdftitle={How to generate new distributions in packages distr, distrEx},% -pdfauthor={Peter Ruckdeschel, Matthias Kohl},% -pdfsubject={distr},% -pdfkeywords={probability distribution,simulation,estimation},% -pagebackref,bookmarks,colorlinks,linkcolor=darkblue,citecolor=darkblue,% -pagecolor=darkblue,raiselinks,plainpages,pdftex]{hyperref} -% -\markboth{\sl How to generate new distributions in packages ``{\tt distr}'', ``{\tt distrEx}''}% -{\sl How to generate new distributions in packages ``{\tt distr}'', ``{\tt distrEx}''} -% -% ------------------------------------------------------------------------------- -\newcommand{\Reals}{\mathbb{R}} -\newcommand{\R}{\mathbb{R}} -\newcommand{\N}{\mathbb{N}} -% -% ------------------------------------------------------------------------------- -\RequirePackage{fancyvrb} -\RequirePackage{listings} -%\usepackage{Sweave} no longer needed [TRUNCATED] To get the complete diff run: svnlook diff /svnroot/distr -r 1149 From noreply at r-forge.r-project.org Sun Jul 8 13:39:38 2018 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Sun, 8 Jul 2018 13:39:38 +0200 (CEST) Subject: [Distr-commits] r1150 - branches/distr-2.7/pkg/distr/inst Message-ID: <20180708113938.B554818709E@r-forge.r-project.org> Author: ruckdeschel Date: 2018-07-08 13:39:37 +0200 (Sun, 08 Jul 2018) New Revision: 1150 Modified: branches/distr-2.7/pkg/distr/inst/NEWS Log: [branches: distr]: began with major update to version 2.7 / updated NEWS file Modified: branches/distr-2.7/pkg/distr/inst/NEWS =================================================================== --- branches/distr-2.7/pkg/distr/inst/NEWS 2018-07-08 11:38:54 UTC (rev 1149) +++ branches/distr-2.7/pkg/distr/inst/NEWS 2018-07-08 11:39:37 UTC (rev 1150) @@ -11,7 +11,42 @@ v 2.7 ############## +user-visible CHANGES: ++ new Methods p.r and q.l, synonyma for p and q (useful for use in RStudio and + in Jupyter IRKernel) ++ more precise formulation of how to use calls to q() for RStudio + and Jupyter IRKernel (i.e., use q.l) ++ switch from SweaveListingUtils to knitr in vignettes ++ replaced http://CRAN... by https://CRAN... (also in CITATION and similar files) ++ updated address (Oldenburg) in several vignettes ++ minor fix in doc to Arcsine distribution + +under the hood: ++ wherever possible also use q.l internally instead of q to + provide functionality in IRKernel ++ registered native code + +bug fixes ++ fixed a bug in plot (q) for LebDec-Distributions (verticals were not plotted correctly) ++ panel selection mechanism had a bug for LebDec-Distributions ++ fixed axis annotation: if xlab="" or ylab="" the respective lab are "" for all panels ++ in a loop the names of slots acWeight, discreteWeight will grow; + fix this by setting the prior names to NULL ++ the gaps matrix could have zero rows ++ fixed an issue with / or / spotted by JJ (JJ APONTE VARON) ++ fixed usage issue with sqrt ++ fixed http(s)-warning ++ fixed [[]] issue in flat.R ++ bug fix in Compound distribution bug detected by Wolfgang Kreitmeier 29.07.2016 + ############## +v 2.6.2 +############## ++ fixed internals as triggered by mail "CRAN package distr" + by Kurt Hornik from Apr 07 2017; most importantly, we + registered native code and took out some usage example of sqrt(). + +############## v 2.6 ############## From noreply at r-forge.r-project.org Sun Jul 8 13:41:19 2018 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Sun, 8 Jul 2018 13:41:19 +0200 (CEST) Subject: [Distr-commits] r1151 - branches/distr-2.7/pkg/distrEx/src Message-ID: <20180708114119.D6E3518701A@r-forge.r-project.org> Author: ruckdeschel Date: 2018-07-08 13:41:18 +0200 (Sun, 08 Jul 2018) New Revision: 1151 Modified: branches/distr-2.7/pkg/distrEx/src/GLaw.c Log: [branches: distrEx]: began with major update to version 2.7 / registered native C-Code in distrEx Modified: branches/distr-2.7/pkg/distrEx/src/GLaw.c =================================================================== --- branches/distr-2.7/pkg/distrEx/src/GLaw.c 2018-07-08 11:39:37 UTC (rev 1150) +++ branches/distr-2.7/pkg/distrEx/src/GLaw.c 2018-07-08 11:41:18 UTC (rev 1151) @@ -6,8 +6,6 @@ #include #include -#define C_DEF(name, n) {#name, (DL_FUNC) &name, n} - void attribute_hidden gauleg(int *n, double *eps, double *A, double *W) { int i,j, m=((*n)+1)/2; double z1,z,pp,p1,p2,p3; for(i=1;i<=m;i++){ @@ -30,16 +28,23 @@ } } -/* P.R. 20170427: register routine */ +/* P.R. 20180708: revised register routine */ -static const R_CMethodDef R_CDef[] = { - C_DEF(gauleg, 4), - {NULL, NULL, 0} +static R_NativePrimitiveArgType gauleg_t[] = { + INTSXP, REALSXP, REALSXP, REALSXP }; +static const R_CMethodDef c_Methods[] = { + {"gauleg", (DL_FUNC) &gauleg, 4, gauleg_t}, + {NULL, NULL, 0, NULL} +}; + + +/* P.R. 20170427: register routine */ + void attribute_visible R_init_distrEx(DllInfo *dll) { - R_registerRoutines(dll, R_CDef, NULL, NULL, NULL); + R_registerRoutines(dll, c_Methods, NULL, NULL, NULL); R_useDynamicSymbols(dll, FALSE); R_forceSymbols(dll, TRUE); From noreply at r-forge.r-project.org Sun Jul 8 13:42:17 2018 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Sun, 8 Jul 2018 13:42:17 +0200 (CEST) Subject: [Distr-commits] r1152 - branches/distr-2.7/pkg/distrEx/demo Message-ID: <20180708114217.8E97D1851B1@r-forge.r-project.org> Author: ruckdeschel Date: 2018-07-08 13:42:15 +0200 (Sun, 08 Jul 2018) New Revision: 1152 Modified: branches/distr-2.7/pkg/distrEx/demo/Prognose.R Log: [branches: distrEx]: began with major update to version 2.7 / replace calls to q(distr) with q.l(distr) in demos Modified: branches/distr-2.7/pkg/distrEx/demo/Prognose.R =================================================================== --- branches/distr-2.7/pkg/distrEx/demo/Prognose.R 2018-07-08 11:41:18 UTC (rev 1151) +++ branches/distr-2.7/pkg/distrEx/demo/Prognose.R 2018-07-08 11:42:15 UTC (rev 1152) @@ -30,8 +30,8 @@ ## posterior modus post.mod <- function(cond, e1) { - optimize(f = d(e1), interval = c(q(e1)(1e-3, cond), - q(e1)(1e-3, cond, lower.tail = FALSE)), + optimize(f = d(e1), interval = c(q.l(e1)(1e-3, cond), + q.l(e1)(1e-3, cond, lower.tail = FALSE)), tol = .Machine$double.eps^0.25, maximum = TRUE, cond = cond)$maximum } From noreply at r-forge.r-project.org Sun Jul 8 13:44:21 2018 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Sun, 8 Jul 2018 13:44:21 +0200 (CEST) Subject: [Distr-commits] r1153 - branches/distr-2.7/pkg/distrEx/man Message-ID: <20180708114421.A09301841D3@r-forge.r-project.org> Author: ruckdeschel Date: 2018-07-08 13:44:20 +0200 (Sun, 08 Jul 2018) New Revision: 1153 Modified: branches/distr-2.7/pkg/distrEx/man/0distrEx-package.Rd branches/distr-2.7/pkg/distrEx/man/AsymTotalVarDist.Rd branches/distr-2.7/pkg/distrEx/man/DiscreteMVDistribution-class.Rd branches/distr-2.7/pkg/distrEx/man/LMCondDistribution.Rd branches/distr-2.7/pkg/distrEx/man/OAsymTotalVarDist.Rd branches/distr-2.7/pkg/distrEx/man/internals.Rd Log: [branches: distrEx]: began with major update to version 2.7 / in manuals changed references https (stamats) and code q() to q.l() Modified: branches/distr-2.7/pkg/distrEx/man/0distrEx-package.Rd =================================================================== --- branches/distr-2.7/pkg/distrEx/man/0distrEx-package.Rd 2018-07-08 11:42:15 UTC (rev 1152) +++ branches/distr-2.7/pkg/distrEx/man/0distrEx-package.Rd 2018-07-08 11:44:20 UTC (rev 1153) @@ -236,7 +236,7 @@ M. Kohl (2005): \emph{Numerical Contributions to the Asymptotic Theory of Robustness.} PhD Thesis. Bayreuth. Available as -\url{http://www.stamats.de/ThesisMKohl.pdf} +\url{http://www.stamats.de/wp-content/uploads/2018/04/ThesisMKohl.pdf} } \keyword{package} \concept{S4 condition class} Modified: branches/distr-2.7/pkg/distrEx/man/AsymTotalVarDist.Rd =================================================================== --- branches/distr-2.7/pkg/distrEx/man/AsymTotalVarDist.Rd 2018-07-08 11:42:15 UTC (rev 1152) +++ branches/distr-2.7/pkg/distrEx/man/AsymTotalVarDist.Rd 2018-07-08 11:44:20 UTC (rev 1153) @@ -97,8 +97,8 @@ Again in the absolutely continuous case, to determine the range of the likelihood ratio, we evaluate this ratio on a grid constructed as follows: \code{x.range <- c(seq(low, up, length=Ngrid/3), - q(e1)(seq(0,1,length=Ngrid/3)*.999), - q(e2)(seq(0,1,length=Ngrid/3)*.999))} + q.l(e1)(seq(0,1,length=Ngrid/3)*.999), + q.l(e2)(seq(0,1,length=Ngrid/3)*.999))} Finally, for both discrete and absolutely continuous case, we clip this ratio downwards by \code{1e-10} and upwards by \code{1e10} Modified: branches/distr-2.7/pkg/distrEx/man/DiscreteMVDistribution-class.Rd =================================================================== --- branches/distr-2.7/pkg/distrEx/man/DiscreteMVDistribution-class.Rd 2018-07-08 11:42:15 UTC (rev 1152) +++ branches/distr-2.7/pkg/distrEx/man/DiscreteMVDistribution-class.Rd 2018-07-08 11:44:20 UTC (rev 1153) @@ -60,6 +60,7 @@ d(D2)(support(D2)) p(D2)(lower = c(1,1), upper = c(3,3)) q(D2) +## in RStudio or Jupyter IRKernel, use q.l(.)(.) instead of q(.)(.) param(D2) img(D2) Modified: branches/distr-2.7/pkg/distrEx/man/LMCondDistribution.Rd =================================================================== --- branches/distr-2.7/pkg/distrEx/man/LMCondDistribution.Rd 2018-07-08 11:42:15 UTC (rev 1152) +++ branches/distr-2.7/pkg/distrEx/man/LMCondDistribution.Rd 2018-07-08 11:44:20 UTC (rev 1153) @@ -31,6 +31,7 @@ d(D1) p(D1) q(D1) +## in RStudio or Jupyter IRKernel, use q.l(.)(.) instead of q(.)(.) param(D1) cond(D1) Modified: branches/distr-2.7/pkg/distrEx/man/OAsymTotalVarDist.Rd =================================================================== --- branches/distr-2.7/pkg/distrEx/man/OAsymTotalVarDist.Rd 2018-07-08 11:42:15 UTC (rev 1152) +++ branches/distr-2.7/pkg/distrEx/man/OAsymTotalVarDist.Rd 2018-07-08 11:44:20 UTC (rev 1153) @@ -91,8 +91,8 @@ Again in the absolutely continuous case, to determine the range of the likelihood ratio, we evaluate this ratio on a grid constructed as follows: \code{x.range <- c(seq(low, up, length=Ngrid/3), - q(e1)(seq(0,1,length=Ngrid/3)*.999), - q(e2)(seq(0,1,length=Ngrid/3)*.999))} + q.l(e1)(seq(0,1,length=Ngrid/3)*.999), + q.l(e2)(seq(0,1,length=Ngrid/3)*.999))} Finally, for both discrete and absolutely continuous case, we clip this ratio downwards by \code{1e-10} and upwards by \code{1e10} Modified: branches/distr-2.7/pkg/distrEx/man/internals.Rd =================================================================== --- branches/distr-2.7/pkg/distrEx/man/internals.Rd 2018-07-08 11:42:15 UTC (rev 1152) +++ branches/distr-2.7/pkg/distrEx/man/internals.Rd 2018-07-08 11:44:20 UTC (rev 1153) @@ -26,8 +26,8 @@ \details{ \code{.getIntbounds} integration bounds are obtained -as \code{lowB <- max(low, q(object)(lowTQ), median(object)-IQR.fac*IQR(object)} -and \code{uppB <- min(upp, q(object)(1-uppTQ), median(object)+IQR.fac*IQR(object)} +as \code{lowB <- max(low, q.l(object)(lowTQ), median(object)-IQR.fac*IQR(object)} +and \code{uppB <- min(upp, q.l(object)(1-uppTQ), median(object)+IQR.fac*IQR(object)} } From noreply at r-forge.r-project.org Sun Jul 8 13:50:35 2018 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Sun, 8 Jul 2018 13:50:35 +0200 (CEST) Subject: [Distr-commits] r1154 - branches/distr-2.7/pkg/distrEx/R Message-ID: <20180708115035.6B255189DA3@r-forge.r-project.org> Author: ruckdeschel Date: 2018-07-08 13:50:34 +0200 (Sun, 08 Jul 2018) New Revision: 1154 Modified: branches/distr-2.7/pkg/distrEx/R/AsymTotalVarDist.R branches/distr-2.7/pkg/distrEx/R/ClippedMoments.R branches/distr-2.7/pkg/distrEx/R/ContaminationSize.R branches/distr-2.7/pkg/distrEx/R/ConvexContamination.R branches/distr-2.7/pkg/distrEx/R/Expectation.R branches/distr-2.7/pkg/distrEx/R/Functionals.R branches/distr-2.7/pkg/distrEx/R/KolmogorovDist.R branches/distr-2.7/pkg/distrEx/R/Kurtosis.R branches/distr-2.7/pkg/distrEx/R/LMCondDistribution.R branches/distr-2.7/pkg/distrEx/R/OAsymTotalVarDist.R branches/distr-2.7/pkg/distrEx/R/PrognCondDistribution.R branches/distr-2.7/pkg/distrEx/R/Skewness.R branches/distr-2.7/pkg/distrEx/R/distrExIntegrate.R branches/distr-2.7/pkg/distrEx/R/distrExOptions.R branches/distr-2.7/pkg/distrEx/R/sysdata.rda Log: [branches: distrEx]: began with major update to version 2.7 / in R-code changed references to https, calls to q() to q.l() and created further grids for Gauss-Legendre-integration and changed defaults in GLIntegrateOrder Modified: branches/distr-2.7/pkg/distrEx/R/AsymTotalVarDist.R =================================================================== --- branches/distr-2.7/pkg/distrEx/R/AsymTotalVarDist.R 2018-07-08 11:44:20 UTC (rev 1153) +++ branches/distr-2.7/pkg/distrEx/R/AsymTotalVarDist.R 2018-07-08 11:50:34 UTC (rev 1154) @@ -55,9 +55,9 @@ ## goal: range of density quotient d2(x)/d1(x) ## x-range: x.range <- seq(low, up, length=Ngrid/3) - x.range <- c(x.range, q(e1)(seq(TruncQuantile, + x.range <- c(x.range, q.l(e1)(seq(TruncQuantile, 1-TruncQuantile,length=Ngrid/3))) - x.range <- c(x.range, q(e2)(seq(TruncQuantile, + x.range <- c(x.range, q.l(e2)(seq(TruncQuantile, 1-TruncQuantile,length=Ngrid/3))) ## to avoid division by 0: d1x.range <- d10x.range <- d1(x.range) @@ -290,8 +290,8 @@ ### continuous part ## x-range: x.range <- seq(low, up, length=Ngrid/3) - x.range <- c(x.range, q(ac1)(seq(TruncQuantile,1-TruncQuantile,length=Ngrid/3))) - x.range <- c(x.range, q(ac2)(seq(TruncQuantile,1-TruncQuantile,length=Ngrid/3))) + x.range <- c(x.range, q.l(ac1)(seq(TruncQuantile,1-TruncQuantile,length=Ngrid/3))) + x.range <- c(x.range, q.l(ac2)(seq(TruncQuantile,1-TruncQuantile,length=Ngrid/3))) ## to avoid division by 0: d1x.range <- d10x.range <- ac1.d(x.range) d1x.range <- d1x.range+(d1x.range<1e-20) Modified: branches/distr-2.7/pkg/distrEx/R/ClippedMoments.R =================================================================== --- branches/distr-2.7/pkg/distrEx/R/ClippedMoments.R 2018-07-08 11:44:20 UTC (rev 1153) +++ branches/distr-2.7/pkg/distrEx/R/ClippedMoments.R 2018-07-08 11:50:34 UTC (rev 1154) @@ -66,14 +66,14 @@ #setMethod("m1df", "AbscontDistribution", # function(object, upper, ...){ # integrandm1 <- function(x, dfun){ x * dfun(x) } -# return(distrExIntegrate(integrandm1, lower = q(object)(.distrExOptions$m1dfLowerTruncQuantile), +# return(distrExIntegrate(integrandm1, lower = q.l(object)(.distrExOptions$m1dfLowerTruncQuantile), # rel.tol = .distrExOptions$m1dfRelativeTolerance, upper = upper, dfun = d(object), # distr = object)) # }) #setMethod("m2df", "AbscontDistribution", # function(object, upper, ...){ # integrandm2 <- function(x, dfun){ x^2 * dfun(x) } -# return(distrExIntegrate(integrandm2, lower = q(object)(.distrExOptions$m2dfLowerTruncQuantile), +# return(distrExIntegrate(integrandm2, lower = q.l(object)(.distrExOptions$m2dfLowerTruncQuantile), # rel.tol = .distrExOptions$m2dfRelativeTolerance, upper = upper, dfun = d(object), # distr = object)) # }) Modified: branches/distr-2.7/pkg/distrEx/R/ContaminationSize.R =================================================================== --- branches/distr-2.7/pkg/distrEx/R/ContaminationSize.R 2018-07-08 11:44:20 UTC (rev 1153) +++ branches/distr-2.7/pkg/distrEx/R/ContaminationSize.R 2018-07-08 11:50:34 UTC (rev 1154) @@ -6,8 +6,8 @@ e2 = "AbscontDistribution"), function(e1, e2){ ep <- getdistrOption("TruncQuantile") - lower <- min(q(e1)(ep), q(e2)(ep)) - upper <- max(q(e1)(1-ep), q(e2)(1-ep)) + lower <- min(q.l(e1)(ep), q.l(e2)(ep)) + upper <- max(q.l(e1)(1-ep), q.l(e2)(1-ep)) x <- seq(from = lower, to = upper, length = 1e5) d10 <- d(e1)(x); d1 <- d10[ d10>0 ] Modified: branches/distr-2.7/pkg/distrEx/R/ConvexContamination.R =================================================================== --- branches/distr-2.7/pkg/distrEx/R/ConvexContamination.R 2018-07-08 11:44:20 UTC (rev 1153) +++ branches/distr-2.7/pkg/distrEx/R/ConvexContamination.R 2018-07-08 11:50:34 UTC (rev 1154) @@ -48,13 +48,13 @@ }, list(size = size, p1fun = p(e1), p2fun = p(e2))) - m1 <- min(q(e1)(TruncQuantile), q(e2)(TruncQuantile)) + m1 <- min(q.l(e1)(TruncQuantile), q.l(e2)(TruncQuantile)) m21 <- ifelse("lower.tail" %in% names(formals(e1 at q)), - q(e1)(TruncQuantile, lower.tail = FALSE), - q(e1)(1-TruncQuantile)) + q.l(e1)(TruncQuantile, lower.tail = FALSE), + q.l(e1)(1-TruncQuantile)) m22 <- ifelse("lower.tail" %in% names(formals(e2 at q)), - q(e2)(TruncQuantile, lower.tail = FALSE), - q(e2)(1-TruncQuantile)) + q.l(e2)(TruncQuantile, lower.tail = FALSE), + q.l(e2)(1-TruncQuantile)) m2 <- max(m21,m22); rm(m21,m22) qfun <- function(p, lower.tail = TRUE, log.p = FALSE){} @@ -204,13 +204,13 @@ list(size = size, p1fun = p(e1), p2fun = p(e2))) TruncQuantile <- getdistrOption("TruncQuantile") - m1 <- min(q(e1)(TruncQuantile), q(e2)(TruncQuantile)) + m1 <- min(q.l(e1)(TruncQuantile), q.l(e2)(TruncQuantile)) m21 <- ifelse("lower.tail" %in% names(formals(e1 at q)), - q(e1)(TruncQuantile, lower.tail = FALSE), - q(e1)(1-TruncQuantile)) + q.l(e1)(TruncQuantile, lower.tail = FALSE), + q.l(e1)(1-TruncQuantile)) m22 <- ifelse("lower.tail" %in% names(formals(e2 at q)), - q(e2)(TruncQuantile, lower.tail = FALSE), - q(e2)(1-TruncQuantile)) + q.l(e2)(TruncQuantile, lower.tail = FALSE), + q.l(e2)(1-TruncQuantile)) m2 <- max(m21,m22); rm(m21,m22) Modified: branches/distr-2.7/pkg/distrEx/R/Expectation.R =================================================================== --- branches/distr-2.7/pkg/distrEx/R/Expectation.R 2018-07-08 11:44:20 UTC (rev 1153) +++ branches/distr-2.7/pkg/distrEx/R/Expectation.R 2018-07-08 11:50:34 UTC (rev 1154) @@ -1,7 +1,7 @@ ## Helper function: .getIntbounds <- function(object, low, upp, lowTQ, uppTQ, IQR.fac, ...){ - qx <- q(object) + qx <- q.l(object) low0 <- qx(lowTQ, lower.tail = TRUE, ...) upp0 <- ifelse( "lower.tail" %in% names(formals(qx)), qx(uppTQ, lower.tail = FALSE, ...), @@ -440,7 +440,7 @@ else return(shape1(object)/(shape1(object)+shape2(object))) }) -## source: http://mathworld.wolfram.com/BetaDistribution.html +## source: https://mathworld.wolfram.com/BetaDistribution.html setMethod("E", signature(object = "Binom", fun = "missing", @@ -465,7 +465,7 @@ } }) -### source: http://mathworld.wolfram.com/BinomialDistribution.html +### source: https://mathworld.wolfram.com/BinomialDistribution.html setMethod("E", signature(object = "Cauchy", fun = "missing", @@ -488,7 +488,7 @@ # return(E(as(object,"AbscontDistribution"), low=low, upp=upp, ...)) }) -### source http://mathworld.wolfram.com/CauchyDistribution.html +### source https://mathworld.wolfram.com/CauchyDistribution.html setMethod("E", signature(object = "Chisq", fun = "missing", @@ -511,7 +511,7 @@ } } }) -### source http://mathworld.wolfram.com/Chi-SquaredDistribution.html +### source https://mathworld.wolfram.com/Chi-SquaredDistribution.html setMethod("E", signature(object = "Dirac", fun = "missing", @@ -536,7 +536,7 @@ return(E(as(object,"AbscontDistribution"), low=low, upp=upp, ...)) }) -### source http://mathworld.wolfram.com/LaplaceDistribution.html +### source https://mathworld.wolfram.com/LaplaceDistribution.html setMethod("E", signature(object = "Exp", fun = "missing", @@ -560,7 +560,7 @@ } }) - ### source http://mathworld.wolfram.com/ExponentialDistribution.html + ### source https://mathworld.wolfram.com/ExponentialDistribution.html setMethod("E", signature(object = "Fd", fun = "missing", @@ -576,7 +576,7 @@ else return(E(as(object,"AbscontDistribution"), low=low, upp=upp, ...)) }) -### source (without ncp) http://mathworld.wolfram.com/F-Distribution.html +### source (without ncp) https://mathworld.wolfram.com/F-Distribution.html setMethod("E", signature(object = "Gammad", fun = "missing", @@ -589,7 +589,7 @@ return(E(as(object,"AbscontDistribution"), low=low, upp=upp, ...)) }) -### source http://mathworld.wolfram.com/GammaDistribution.html +### source https://mathworld.wolfram.com/GammaDistribution.html setMethod("E", signature(object = "Gammad", fun = "function", @@ -644,7 +644,7 @@ return(E(as(object,"DiscreteDistribution"), low=low, upp=upp, ...)) }) -### source http://mathworld.wolfram.com/GeometricDistribution.html +### source https://mathworld.wolfram.com/GeometricDistribution.html setMethod("E", signature(object = "Hyper", fun = "missing", @@ -657,7 +657,7 @@ else return(E(as(object,"DiscreteDistribution"), low=low, upp=upp, ...)) }) -### source http://mathworld.wolfram.com/HypergeometricDistribution.html +### source https://mathworld.wolfram.com/HypergeometricDistribution.html setMethod("E", signature(object = "Logis", fun = "missing", @@ -668,7 +668,7 @@ else return(E(as(object,"AbscontDistribution"), low=low, upp=upp, ...)) }) -### source http://mathworld.wolfram.com/LogisticDistribution.html +### source https://mathworld.wolfram.com/LogisticDistribution.html setMethod("E", signature(object = "Lnorm", fun = "missing", @@ -680,7 +680,7 @@ else return(E(as(object,"AbscontDistribution"), low=low, upp=upp, ...)) }) -### source http://mathworld.wolfram.com/LogNormalDistribution.html +### source https://mathworld.wolfram.com/LogNormalDistribution.html setMethod("E", signature(object = "Nbinom", fun = "missing", @@ -693,7 +693,7 @@ else return(E(as(object,"DiscreteDistribution"), low=low, upp=upp, ...)) }) -### source http://mathworld.wolfram.com/NegativeBinomialDistribution.html +### source https://mathworld.wolfram.com/NegativeBinomialDistribution.html setMethod("E", signature(object = "Pois", fun = "missing", @@ -706,7 +706,7 @@ else return(E(as(object,"DiscreteDistribution"), low=low, upp=upp, ...)) }) -### source http://mathworld.wolfram.com/PoissonDistribution.html +### source https://mathworld.wolfram.com/PoissonDistribution.html setMethod("E", signature(object = "Td", fun = "missing", @@ -721,7 +721,7 @@ else return(E(as(object,"AbscontDistribution"), low=low, upp=upp, ...)) }) -### source http://mathworld.wolfram.com/NoncentralStudentst-Distribution.html +### source https://mathworld.wolfram.com/NoncentralStudentst-Distribution.html setMethod("E", signature(object = "Unif", fun = "missing", cond = "missing"), @@ -733,7 +733,7 @@ else return(E(as(object,"AbscontDistribution"), low=low, upp=upp, ...)) }) -### source http://mathworld.wolfram.com/UniformDistribution.html +### source https://mathworld.wolfram.com/UniformDistribution.html setMethod("E", signature(object = "Weibull", fun = "missing", @@ -745,7 +745,7 @@ else return(E(as(object,"AbscontDistribution"), low=low, upp=upp, ...)) }) -### source http://mathworld.wolfram.com/WeibullDistribution.html +### source https://mathworld.wolfram.com/WeibullDistribution.html setMethod("E", signature(object = "Arcsine", fun = "missing", cond = "missing"), @@ -861,8 +861,8 @@ function(object, low = NULL, upp = NULL, ...){ S <- object at SummandsDistr N <- object at NumbOfSummandsDistr - if(!is.null(low)) if(low <= q(object)(0)) low <- NULL - if(!is.null(upp)) if(upp >= q(object)(1)) upp <- NULL + if(!is.null(low)) if(low <= q.l(object)(0)) low <- NULL + if(!is.null(upp)) if(upp >= q.l(object)(1)) upp <- NULL if(is(S,"UnivariateDistribution") && is.null(low) && is.null(upp)) return(E(S, ...)*E(N)) Modified: branches/distr-2.7/pkg/distrEx/R/Functionals.R =================================================================== --- branches/distr-2.7/pkg/distrEx/R/Functionals.R 2018-07-08 11:44:20 UTC (rev 1153) +++ branches/distr-2.7/pkg/distrEx/R/Functionals.R 2018-07-08 11:50:34 UTC (rev 1154) @@ -128,12 +128,12 @@ function(x){ if(is(Symmetry(x),"SphericalSymmetry")) return(SymmCenter(Symmetry(x))) - return(q(x)(1/2)) + return(q.l(x)(1/2)) }) setMethod("median", signature(x = "UnivariateCondDistribution"), function(x, cond){ - return(q(x)(1/2, cond = cond)) + return(q.l(x)(1/2, cond = cond)) }) setMethod("median", signature(x = "AffLinDistribution"), @@ -149,10 +149,10 @@ setMethod("mad", signature(x = "UnivariateDistribution"), function(x){ if(is(Symmetry(x),"SphericalSymmetry")) - return(q(x)(3/4)) + return(q.l(x)(3/4)) m <- median(x) y <- abs(x-m) - return(q(y)(1/2)) + return(q.l(y)(1/2)) }) setMethod("mad", signature(x = "AffLinDistribution"), @@ -168,17 +168,17 @@ setMethod("IQR", signature(x = "UnivariateDistribution"), function(x){ if(is(Symmetry(x),"SphericalSymmetry")) - return(2*q(x)(3/4)) - return(q(x)(3/4)-q(x)(1/4)) + return(2*q.l(x)(3/4)) + return(q.l(x)(3/4)-q.l(x)(1/4)) }) setMethod("IQR", signature(x = "UnivariateCondDistribution"), function(x, cond){ - return(q(x)(3/4, cond = cond)-q(x)(1/4, cond = cond)) + return(q.l(x)(3/4, cond = cond)-q.l(x)(1/4, cond = cond)) }) setMethod("IQR", signature(x = "DiscreteDistribution"), - function(x) q.r(x)(3/4)-q(x)(1/4) + function(x) q.r(x)(3/4)-q.l(x)(1/4) ) setMethod("IQR", signature(x = "AffLinDistribution"), @@ -227,7 +227,7 @@ else return(size(x)*prob(x)*(1-prob(x))) }) -### source: http://mathworld.wolfram.com/BinomialDistribution.html +### source: https://mathworld.wolfram.com/BinomialDistribution.html setMethod("var", signature(x = "Cauchy"), @@ -242,7 +242,7 @@ else return(NA) }) -### source http://mathworld.wolfram.com/CauchyDistribution.html +### source https://mathworld.wolfram.com/CauchyDistribution.html setMethod("var", signature(x = "Chisq"), function(x,...){ @@ -256,7 +256,7 @@ else return(2*(df(x)+2*ncp(x))) }) -### source http://mathworld.wolfram.com/Chi-SquaredDistribution.html +### source https://mathworld.wolfram.com/Chi-SquaredDistribution.html setMethod("var", signature(x = "Dirac"), function(x, ...){return(0)}) @@ -274,7 +274,7 @@ else return(2) }) -### source http://mathworld.wolfram.com/LaplaceDistribution.html +### source https://mathworld.wolfram.com/LaplaceDistribution.html setMethod("var", signature(x = "Exp"), function(x, ...){ @@ -289,7 +289,7 @@ return(1/rate(x)^2) }) - ### source http://mathworld.wolfram.com/ExponentialDistribution.html + ### source https://mathworld.wolfram.com/ExponentialDistribution.html setMethod("var", signature(x = "Fd"), function(x, ...){ @@ -308,7 +308,7 @@ Exx <- df2^2/(df2-2)/(df2-4)*((df1+d)^2+2*df1+4*d)/df1^2 return(ifelse(df2>4,Exx-Ex2, NA ))} }) -### source (without ncp) http://mathworld.wolfram.com/F-Distribution.html +### source (without ncp) https://mathworld.wolfram.com/F-Distribution.html setMethod("var", signature(x = "Gammad"), function(x, ...){ @@ -322,7 +322,7 @@ else return(shape(x)*scale(x)^2) }) -### source http://mathworld.wolfram.com/GammaDistribution.html +### source https://mathworld.wolfram.com/GammaDistribution.html setMethod("var", signature(x = "Geom"), function(x, ...){ @@ -335,7 +335,7 @@ return(var(as(x,"DiscreteDistribution"),...)) else {p <- prob(x); e <- 1/p-1; return(e+e^2)} }) -### source http://mathworld.wolfram.com/GeometricDistribution.html +### source https://mathworld.wolfram.com/GeometricDistribution.html setMethod("var", signature(x = "Hyper"), function(x, ...){ @@ -352,7 +352,7 @@ n <- n(x); return(k*n/(m+n)*m/(m+n)*(m+n-k)/(m+n-1))} }) -### source http://mathworld.wolfram.com/HypergeometricDistribution.html +### source https://mathworld.wolfram.com/HypergeometricDistribution.html setMethod("var", signature(x = "Logis"), function(x, ...){ @@ -366,7 +366,7 @@ else return(pi^2/3*scale(x)^2) }) -### source http://mathworld.wolfram.com/LogisticDistribution.html +### source https://mathworld.wolfram.com/LogisticDistribution.html setMethod("var", signature(x = "Lnorm"), function(x, ...){ @@ -380,7 +380,7 @@ else return(exp(2*meanlog(x)+sdlog(x)^2)*(exp(sdlog(x)^2)-1)) }) -### source http://mathworld.wolfram.com/LogNormalDistribution.html +### source https://mathworld.wolfram.com/LogNormalDistribution.html setMethod("var", signature(x = "Nbinom"), function(x, ...){ @@ -393,7 +393,7 @@ return(var(as(x,"DiscreteDistribution"),...)) else {p <- prob(x); e <- 1/p-1; return(size(x)*(e+e^2))} }) -### source http://mathworld.wolfram.com/NegativeBinomialDistribution.html +### source https://mathworld.wolfram.com/NegativeBinomialDistribution.html setMethod("var", signature(x = "Pois"), function(x, ...){ @@ -407,7 +407,7 @@ else return(lambda(x)) }) -### source http://mathworld.wolfram.com/PoissonDistribution.html +### source https://mathworld.wolfram.com/PoissonDistribution.html setMethod("var", signature(x = "Td"), function(x, ...){ @@ -426,7 +426,7 @@ } }) -### source http://mathworld.wolfram.com/NoncentralStudentst-Distribution.html +### source https://mathworld.wolfram.com/NoncentralStudentst-Distribution.html setMethod("var", signature(x = "Unif"), function(x, ...){ @@ -440,7 +440,7 @@ else return((Max(x)-Min(x))^2/12) }) -### source http://mathworld.wolfram.com/UniformDistribution.html +### source https://mathworld.wolfram.com/UniformDistribution.html setMethod("var", signature(x = "Weibull"), function(x, ...){ @@ -454,7 +454,7 @@ else return(scale(x)^2*(gamma(1+2/shape(x))- (gamma(1 + 1/shape(x)))^2)) }) -### source http://mathworld.wolfram.com/WeibullDistribution.html +### source https://mathworld.wolfram.com/WeibullDistribution.html setMethod("var", signature(x = "Beta"), function(x, ...){ @@ -469,7 +469,7 @@ {a<-shape1(x); b<- shape2(x) return(a*b/(a+b)^2/(a+b+1))} }) -## source: http://mathworld.wolfram.com/BetaDistribution.html +## source: https://mathworld.wolfram.com/BetaDistribution.html setMethod("var", signature(x = "Arcsine"), function(x, ...){ Modified: branches/distr-2.7/pkg/distrEx/R/KolmogorovDist.R =================================================================== --- branches/distr-2.7/pkg/distrEx/R/KolmogorovDist.R 2018-07-08 11:44:20 UTC (rev 1153) +++ branches/distr-2.7/pkg/distrEx/R/KolmogorovDist.R 2018-07-08 11:50:34 UTC (rev 1154) @@ -6,18 +6,18 @@ e2 = "AbscontDistribution"), function(e1, e2){ TruncQuantile <- getdistrOption("TruncQuantile") - lower1 <- ifelse(!is.finite(q(e1)(0)), q(e1)(TruncQuantile), q(e1)(0)) - upper1 <- ifelse(!is.finite(q(e1)(1)), + lower1 <- ifelse(!is.finite(q.l(e1)(0)), q.l(e1)(TruncQuantile), q.l(e1)(0)) + upper1 <- ifelse(!is.finite(q.l(e1)(1)), ifelse("lower.tail" %in% names(formals(e1 at q)), - q(e1)(TruncQuantile, lower.tail = FALSE), - q(e1)(1-TruncQuantile)), - q(e1)(1)) - lower2 <- ifelse(!is.finite(q(e2)(0)), q(e2)(TruncQuantile), q(e2)(0)) - upper2 <- ifelse(!is.finite(q(e2)(1)), + q.l(e1)(TruncQuantile, lower.tail = FALSE), + q.l(e1)(1-TruncQuantile)), + q.l(e1)(1)) + lower2 <- ifelse(!is.finite(q.l(e2)(0)), q.l(e2)(TruncQuantile), q.l(e2)(0)) + upper2 <- ifelse(!is.finite(q.l(e2)(1)), ifelse("lower.tail" %in% names(formals(e2 at q)), - q(e2)(TruncQuantile, lower.tail = FALSE), - q(e2)(1-TruncQuantile)), - q(e2)(1)) + q.l(e2)(TruncQuantile, lower.tail = FALSE), + q.l(e2)(1-TruncQuantile)), + q.l(e2)(1)) lower <- min(lower1, lower2) upper <- max(upper1, upper2) @@ -103,18 +103,18 @@ p = e2.erg$pfun, d = e2.erg$dfun, q = e2.erg$qfun, .withSim = TRUE, .withArith = FALSE)} TruncQuantile <- getdistrOption("TruncQuantile") - lower1 <- ifelse(!is.finite(q(e1)(0)), q(e1)(TruncQuantile), q(e1)(0)) - upper1 <- ifelse(!is.finite(q(e1)(1)), + lower1 <- ifelse(!is.finite(q.l(e1)(0)), q.l(e1)(TruncQuantile), q.l(e1)(0)) + upper1 <- ifelse(!is.finite(q.l(e1)(1)), ifelse("lower.tail" %in% names(formals(e1 at q)), - q(e1)(TruncQuantile, lower.tail = FALSE), - q(e1)(1-TruncQuantile)), - q(e1)(1)) - lower2 <- ifelse(!is.finite(q(e2)(0)), q(e2)(TruncQuantile), q(e2)(0)) - upper2 <- ifelse(!is.finite(q(e2)(1)), + q.l(e1)(TruncQuantile, lower.tail = FALSE), + q.l(e1)(1-TruncQuantile)), + q.l(e1)(1)) + lower2 <- ifelse(!is.finite(q.l(e2)(0)), q.l(e2)(TruncQuantile), q.l(e2)(0)) + upper2 <- ifelse(!is.finite(q.l(e2)(1)), ifelse("lower.tail" %in% names(formals(e2 at q)), - q(e2)(TruncQuantile, lower.tail = FALSE), - q(e2)(1-TruncQuantile)), - q(e2)(1)) + q.l(e2)(TruncQuantile, lower.tail = FALSE), + q.l(e2)(1-TruncQuantile)), + q.l(e2)(1)) lower <- min(lower1, lower2) upper <- max(upper1, upper2) Modified: branches/distr-2.7/pkg/distrEx/R/Kurtosis.R =================================================================== --- branches/distr-2.7/pkg/distrEx/R/Kurtosis.R 2018-07-08 11:44:20 UTC (rev 1153) +++ branches/distr-2.7/pkg/distrEx/R/Kurtosis.R 2018-07-08 11:50:34 UTC (rev 1154) @@ -99,7 +99,7 @@ p <- prob(x) return((1-6*p*(1-p))/(size(x)*p*(1-p))) }) -### source: http://mathworld.wolfram.com/BinomialDistribution.html +### source: https://mathworld.wolfram.com/BinomialDistribution.html # setMethod("kurtosis", signature(x = "Cauchy"), @@ -114,7 +114,7 @@ else return(NA) }) -### source http://mathworld.wolfram.com/CauchyDistribution.html +### source https://mathworld.wolfram.com/CauchyDistribution.html # setMethod("kurtosis", signature(x = "Chisq"), @@ -129,7 +129,7 @@ else return(12*(df(x)+4*ncp(x))/(df(x)+2*ncp(x))^2) }) -### source http://mathworld.wolfram.com/Chi-SquaredDistribution.html +### source https://mathworld.wolfram.com/Chi-SquaredDistribution.html # setMethod("kurtosis", signature(x = "Dirac"), @@ -209,7 +209,7 @@ } } }) -### source (without ncp) http://mathworld.wolfram.com/F-Distribution.html +### source (without ncp) https://mathworld.wolfram.com/F-Distribution.html # setMethod("kurtosis", signature(x = "Gammad"), function(x, ...){ @@ -224,7 +224,7 @@ return(6/shape(x)) }) -### source http://mathworld.wolfram.com/GammaDistribution.html +### source https://mathworld.wolfram.com/GammaDistribution.html # setMethod("kurtosis", signature(x = "Geom"), function(x, ...){ @@ -238,7 +238,7 @@ else return(6+ prob(x)^2/(1-prob(x))) }) -### source http://mathworld.wolfram.com/GeometricDistribution.html +### source https://mathworld.wolfram.com/GeometricDistribution.html # setMethod("kurtosis", signature(x = "Hyper"), function(x, ...){ @@ -260,7 +260,7 @@ ) } }) -### source http://mathworld.wolfram.com/HypergeometricDistribution.html +### source https://mathworld.wolfram.com/HypergeometricDistribution.html # setMethod("kurtosis", signature(x = "Logis"), function(x, ...){ @@ -274,7 +274,7 @@ else return(6/5) }) -### source http://mathworld.wolfram.com/LogisticDistribution.html +### source https://mathworld.wolfram.com/LogisticDistribution.html # setMethod("kurtosis", signature(x = "Lnorm"), function(x, ...){ @@ -290,7 +290,7 @@ return( w^4+2*w^3+3*w^2-6) } }) -### source http://mathworld.wolfram.com/LogNormalDistribution.html +### source https://mathworld.wolfram.com/LogNormalDistribution.html # setMethod("kurtosis", signature(x = "Nbinom"), function(x, ...){ @@ -304,7 +304,7 @@ else return(6/size(x)+prob(x)^2/(size(x)*(1-prob(x)))) }) -### source http://mathworld.wolfram.com/NegativeBinomialDistribution.html +### source https://mathworld.wolfram.com/NegativeBinomialDistribution.html # setMethod("kurtosis", signature(x = "Pois"), function(x, ...){ @@ -318,7 +318,7 @@ else return(1/lambda(x)) }) -### source http://mathworld.wolfram.com/PoissonDistribution.html +### source https://mathworld.wolfram.com/PoissonDistribution.html # setMethod("kurtosis", signature(x = "Td"), function(x, ...){ @@ -343,7 +343,7 @@ } } }) -### source http://mathworld.wolfram.com/NoncentralStudentst-Distribution.html +### source https://mathworld.wolfram.com/NoncentralStudentst-Distribution.html # setMethod("kurtosis", signature(x = "Unif"), @@ -358,7 +358,7 @@ else return(-6/5) }) -### source http://mathworld.wolfram.com/UniformDistribution.html +### source https://mathworld.wolfram.com/UniformDistribution.html # setMethod("kurtosis", signature(x = "Weibull"), function(x, ...){ @@ -377,7 +377,7 @@ v <- (g2-g1^2)^2 return( (g4-4*g3*g1+6*g2*g1^2-3*g1^4)/v - 3 ) }) -### source http://mathworld.wolfram.com/WeibullDistribution.html +### source https://mathworld.wolfram.com/WeibullDistribution.html # setMethod("kurtosis", signature(x = "Beta"), function(x, ...){ @@ -392,7 +392,7 @@ {a<-shape1(x); b<- shape2(x) return(6*(a^3-a^2*(2*b-1)+b^2*(b+1)-2*a*b*(b+2))/(a*b*(a+b+2)*(a+b+3)) )} }) -## source: http://mathworld.wolfram.com/BetaDistribution.html +## source: https://mathworld.wolfram.com/BetaDistribution.html ################################################################################### #kurtosis --- code P.R.: Modified: branches/distr-2.7/pkg/distrEx/R/LMCondDistribution.R =================================================================== --- branches/distr-2.7/pkg/distrEx/R/LMCondDistribution.R 2018-07-08 11:44:20 UTC (rev 1153) +++ branches/distr-2.7/pkg/distrEx/R/LMCondDistribution.R 2018-07-08 11:50:34 UTC (rev 1154) @@ -90,7 +90,7 @@ intercept = intercept, theta = theta, scale = scale)) - qfct <- q(Error) + qfct <- q.l(Error) qfun <- function(p, cond, lower.tail = TRUE, log.p = FALSE, ...){} body(qfun) <- substitute({ if(length(cond) != lth) stop("'cond' has wrong dimension") Modified: branches/distr-2.7/pkg/distrEx/R/OAsymTotalVarDist.R =================================================================== --- branches/distr-2.7/pkg/distrEx/R/OAsymTotalVarDist.R 2018-07-08 11:44:20 UTC (rev 1153) +++ branches/distr-2.7/pkg/distrEx/R/OAsymTotalVarDist.R 2018-07-08 11:50:34 UTC (rev 1154) @@ -47,8 +47,8 @@ ## goal: range of density quotient d2(x)/d1(x) ## x-range: x.range <- seq(low, up, length=Ngrid/3) - x.range <- c(x.range, q(e1)(seq(TruncQuantile,1-TruncQuantile,length=Ngrid/3))) - x.range <- c(x.range, q(e2)(seq(TruncQuantile,1-TruncQuantile,length=Ngrid/3))) + x.range <- c(x.range, q.l(e1)(seq(TruncQuantile,1-TruncQuantile,length=Ngrid/3))) + x.range <- c(x.range, q.l(e2)(seq(TruncQuantile,1-TruncQuantile,length=Ngrid/3))) ## to avoid division by 0: d1x.range <- d10x.range <- d1(x.range) d1x.range <- d1x.range+(d1x.range<1e-20) @@ -244,8 +244,8 @@ ### continuous part ## x-range: x.range <- seq(low, up, length=Ngrid/3) - x.range <- c(x.range, q(ac1)(seq(TruncQuantile,1-TruncQuantile,length=Ngrid/3))) - x.range <- c(x.range, q(ac2)(seq(TruncQuantile,1-TruncQuantile,length=Ngrid/3))) + x.range <- c(x.range, q.l(ac1)(seq(TruncQuantile,1-TruncQuantile,length=Ngrid/3))) + x.range <- c(x.range, q.l(ac2)(seq(TruncQuantile,1-TruncQuantile,length=Ngrid/3))) ## to avoid division by 0: d1x.range <- d10x.range <- ac1.d(x.range) d1x.range <- d1x.range+(d1x.range<1e-20) Modified: branches/distr-2.7/pkg/distrEx/R/PrognCondDistribution.R =================================================================== --- branches/distr-2.7/pkg/distrEx/R/PrognCondDistribution.R 2018-07-08 11:44:20 UTC (rev 1153) +++ branches/distr-2.7/pkg/distrEx/R/PrognCondDistribution.R 2018-07-08 11:50:34 UTC (rev 1154) @@ -38,7 +38,7 @@ dxfun <- d(Regr) dufun <- d(Error) - qxfun <- q(Regr) + qxfun <- q.l(Regr) Ib <- .getIntbounds(Error, low=-Inf, upp=Inf, lowerTruncQuantile, upperTruncQuantile, IQR.fac) @@ -84,7 +84,7 @@ }, list(dfun = dfun, qxfun = qxfun)) - qufun <- q(Error) + qufun <- q.l(Error) qfun <- function(p, cond, lower.tail = TRUE, log.p = FALSE){} body(qfun) <- substitute({ qu <- qufun if (log.p) p <- exp(p) Modified: branches/distr-2.7/pkg/distrEx/R/Skewness.R =================================================================== --- branches/distr-2.7/pkg/distrEx/R/Skewness.R 2018-07-08 11:44:20 UTC (rev 1153) +++ branches/distr-2.7/pkg/distrEx/R/Skewness.R 2018-07-08 11:50:34 UTC (rev 1154) @@ -78,7 +78,7 @@ else return((1-2*prob(x))/sqrt(size(x)*prob(x)*(1-prob(x)))) }) -### source: http://mathworld.wolfram.com/BinomialDistribution.html +### source: https://mathworld.wolfram.com/BinomialDistribution.html # setMethod("skewness", signature(x = "Cauchy"), @@ -93,7 +93,7 @@ else return(NA) }) -### source http://mathworld.wolfram.com/CauchyDistribution.html +### source https://mathworld.wolfram.com/CauchyDistribution.html # setMethod("skewness", signature(x = "Chisq"), @@ -108,7 +108,7 @@ else return( sqrt(8)*(df(x)+3*ncp(x))/(df(x)+2*ncp(x))^1.5) }) -### source http://mathworld.wolfram.com/Chi-SquaredDistribution.html +### source https://mathworld.wolfram.com/Chi-SquaredDistribution.html # setMethod("skewness", signature(x = "Dirac"), @@ -127,7 +127,7 @@ else return(0) }) -### source http://mathworld.wolfram.com/LaplaceDistribution.html +### source https://mathworld.wolfram.com/LaplaceDistribution.html # setMethod("skewness", signature(x = "Exp"), @@ -142,7 +142,7 @@ else return(2) }) - ### source http://mathworld.wolfram.com/ExponentialDistribution.html + ### source https://mathworld.wolfram.com/ExponentialDistribution.html # setMethod("skewness", signature(x = "Fd"), @@ -173,7 +173,7 @@ } } }) -### source (without ncp) http://mathworld.wolfram.com/F-Distribution.html +### source (without ncp) https://mathworld.wolfram.com/F-Distribution.html # setMethod("skewness", signature(x = "Gammad"), function(x, ...){ @@ -187,7 +187,7 @@ else return(2/sqrt(shape(x))) }) -### source http://mathworld.wolfram.com/GammaDistribution.html +### source https://mathworld.wolfram.com/GammaDistribution.html # setMethod("skewness", signature(x = "Geom"), function(x, ...){ @@ -203,7 +203,7 @@ return((2-p)/sqrt(1-p)) } }) -### source http://mathworld.wolfram.com/GeometricDistribution.html +### source https://mathworld.wolfram.com/GeometricDistribution.html # setMethod("skewness", signature(x = "Hyper"), function(x, ...){ @@ -221,7 +221,7 @@ return( sqrt((m+n-1)/(k*m*n)/(m+n-k))*(n-m)*(m+n-2*k)/(m+n-2) ) } }) -### source http://mathworld.wolfram.com/HypergeometricDistribution.html +### source https://mathworld.wolfram.com/HypergeometricDistribution.html # [TRUNCATED] To get the complete diff run: svnlook diff /svnroot/distr -r 1154 From noreply at r-forge.r-project.org Sun Jul 8 13:51:29 2018 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Sun, 8 Jul 2018 13:51:29 +0200 (CEST) Subject: [Distr-commits] r1155 - branches/distr-2.7/pkg/distrEx/inst Message-ID: <20180708115129.1B06F18436F@r-forge.r-project.org> Author: ruckdeschel Date: 2018-07-08 13:51:27 +0200 (Sun, 08 Jul 2018) New Revision: 1155 Modified: branches/distr-2.7/pkg/distrEx/inst/NEWS Log: [branches: distrEx]: began with major update to version 2.7 / updated NEWS file Modified: branches/distr-2.7/pkg/distrEx/inst/NEWS =================================================================== --- branches/distr-2.7/pkg/distrEx/inst/NEWS 2018-07-08 11:50:34 UTC (rev 1154) +++ branches/distr-2.7/pkg/distrEx/inst/NEWS 2018-07-08 11:51:27 UTC (rev 1155) @@ -8,6 +8,27 @@ information) ############## +v 2.7 +############## + +user-visible CHANGES: ++ triggered by mail from Peng Rui, larodarchillwind at aliyun.com, implemented + Hellinger and TotalVariation distance for DiscreteMVDistributions ++ alias q.l(X) for q(X) to provide functionality in RStudio / Jupyter IRKernel ++ fixed some URLs in https style + +under the hood: ++ added more detailed author information in DESCRIPTION ++ registered native code for GL integration ++ recreated sysdata.rda file with new tables + .AW.5000, .AW.10000, .AW.50000, .AW.100000 ++ changed defaults in distrExIntegrate / GLIntegrateOrder (with finer grids) + +bug fixes: ++ fixed a bug in CvMDist + + +############## v 2.6 ############## @@ -308,7 +329,7 @@ used wherever possible; but backwards compatibility: always checked whether lowert.tail / log / log.p are formals - + * some exact formulas for mad, median, and IQR * new method for IQR for DiscreteDistributions taking care that between upper and lower quartile there is 50% probability From noreply at r-forge.r-project.org Sun Jul 8 13:54:38 2018 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Sun, 8 Jul 2018 13:54:38 +0200 (CEST) Subject: [Distr-commits] r1156 - branches/distr-2.7/pkg/distrSim/inst Message-ID: <20180708115438.865FD180B58@r-forge.r-project.org> Author: ruckdeschel Date: 2018-07-08 13:54:37 +0200 (Sun, 08 Jul 2018) New Revision: 1156 Modified: branches/distr-2.7/pkg/distrSim/inst/NEWS Log: [branches: distrSim]: began with major update to version 2.7 / updated NEWS file Modified: branches/distr-2.7/pkg/distrSim/inst/NEWS =================================================================== --- branches/distr-2.7/pkg/distrSim/inst/NEWS 2018-07-08 11:51:27 UTC (rev 1155) +++ branches/distr-2.7/pkg/distrSim/inst/NEWS 2018-07-08 11:54:37 UTC (rev 1156) @@ -8,6 +8,12 @@ information) ############## +v 2.7 +############## + +no changes in this package + +############## v 2.6 ############## From noreply at r-forge.r-project.org Sun Jul 8 13:56:29 2018 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Sun, 8 Jul 2018 13:56:29 +0200 (CEST) Subject: [Distr-commits] r1157 - branches/distr-2.7/pkg/distrTEst/inst Message-ID: <20180708115629.1BF00181117@r-forge.r-project.org> Author: ruckdeschel Date: 2018-07-08 13:56:28 +0200 (Sun, 08 Jul 2018) New Revision: 1157 Modified: branches/distr-2.7/pkg/distrTEst/inst/NEWS Log: [branches: distrTEst]: began with major update to version 2.7 / updated NEWS file Modified: branches/distr-2.7/pkg/distrTEst/inst/NEWS =================================================================== --- branches/distr-2.7/pkg/distrTEst/inst/NEWS 2018-07-08 11:54:37 UTC (rev 1156) +++ branches/distr-2.7/pkg/distrTEst/inst/NEWS 2018-07-08 11:56:28 UTC (rev 1157) @@ -2,7 +2,18 @@ # News: to package distrTEst ###################################################################### +(first two numbers of package versions do not necessarily reflect + package-individual development, but rather are chosen for the + distrXXX family as a whole in order to ease updating "depends" + information) + ############## +v 2.7 +############## + +no changes in this version + +############## v 2.6 ############## From noreply at r-forge.r-project.org Sun Jul 8 13:58:46 2018 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Sun, 8 Jul 2018 13:58:46 +0200 (CEST) Subject: [Distr-commits] r1158 - branches/distr-2.7/pkg/distrEllipse Message-ID: <20180708115846.1FF89189095@r-forge.r-project.org> Author: ruckdeschel Date: 2018-07-08 13:58:45 +0200 (Sun, 08 Jul 2018) New Revision: 1158 Modified: branches/distr-2.7/pkg/distrEllipse/DESCRIPTION branches/distr-2.7/pkg/distrEllipse/NAMESPACE Log: [branches: distrEllipse]: began with major update to version 2.7 / added role P.Ruckdeschel = author in DESCRIPTION, deleted .rd accessors from exported methods in NAMESPACE Modified: branches/distr-2.7/pkg/distrEllipse/DESCRIPTION =================================================================== --- branches/distr-2.7/pkg/distrEllipse/DESCRIPTION 2018-07-08 11:56:28 UTC (rev 1157) +++ branches/distr-2.7/pkg/distrEllipse/DESCRIPTION 2018-07-08 11:58:45 UTC (rev 1158) @@ -8,7 +8,7 @@ distrEx(>= 2.2), distrSim(>= 2.2) Suggests: distrMod(>= 2.2), distrTEst(>= 2.2) Imports: startupmsg, stats -Authors at R: person("Peter", "Ruckdeschel", role=c("cre", "cph"), +Authors at R: person("Peter", "Ruckdeschel", role=c("aut", "cre", "cph"), email="peter.ruckdeschel at uni-oldenburg.de") ByteCompile: yes License: LGPL-3 Modified: branches/distr-2.7/pkg/distrEllipse/NAMESPACE =================================================================== --- branches/distr-2.7/pkg/distrEllipse/NAMESPACE 2018-07-08 11:56:28 UTC (rev 1157) +++ branches/distr-2.7/pkg/distrEllipse/NAMESPACE 2018-07-08 11:58:45 UTC (rev 1158) @@ -20,7 +20,6 @@ "MultivarDistrList","MultivarMixingDistribution") exportMethods("dimension", "radDistr", "scale", "location", "dim", "radDistr<-", "scale<-", "location<-", - "plot.rd", "r.rd", "d.rd", "p.rd", "q.rd", "plotRd", "rRd", "dRd", "pRd", "qRd", "E", "var", "mean", "sigma","mixCoeff", "mixDistr") exportMethods("plot", "show", "showobj", "Symmetry") From noreply at r-forge.r-project.org Sun Jul 8 14:00:36 2018 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Sun, 8 Jul 2018 14:00:36 +0200 (CEST) Subject: [Distr-commits] r1159 - branches/distr-2.7/pkg/distrEllipse/man Message-ID: <20180708120042.F0C9D18A306@r-forge.r-project.org> Author: ruckdeschel Date: 2018-07-08 14:00:32 +0200 (Sun, 08 Jul 2018) New Revision: 1159 Added: branches/distr-2.7/pkg/distrEllipse/man/distrEllipse-defunct.Rd Removed: branches/distr-2.7/pkg/distrEllipse/man/distrEllipse-deprecated.Rd Modified: branches/distr-2.7/pkg/distrEllipse/man/SphericalDistribution-class.Rd Log: [branches: distrEllipse]: began with major update to version 2.7 / in manuals set .rd accessors to Defunct Modified: branches/distr-2.7/pkg/distrEllipse/man/SphericalDistribution-class.Rd =================================================================== --- branches/distr-2.7/pkg/distrEllipse/man/SphericalDistribution-class.Rd 2018-07-08 11:58:45 UTC (rev 1158) +++ branches/distr-2.7/pkg/distrEllipse/man/SphericalDistribution-class.Rd 2018-07-08 12:00:32 UTC (rev 1159) @@ -12,11 +12,6 @@ \alias{dRd,SphericalDistribution-method} \alias{pRd,SphericalDistribution-method} \alias{qRd,SphericalDistribution-method} -\alias{plot.rd,SphericalDistribution-method} -\alias{r.rd,SphericalDistribution-method} -\alias{d.rd,SphericalDistribution-method} -\alias{p.rd,SphericalDistribution-method} -\alias{q.rd,SphericalDistribution-method} \alias{radDistr} \alias{radDistr<-} \alias{plotRd} @@ -108,16 +103,16 @@ \item{radDistr}{\code{signature(object = "SphericalDistribution")}: access method for slot \code{radDistr}. } \item{rRd}{\code{signature(object = "SphericalDistribution")}: wrapped access method for - slot \code{r} of slot \code{radDistr}. From version 2.6 on, replaces deprecated + slot \code{r} of slot \code{radDistr}. From version 2.7 on, replaces defunct \code{r.Rd} to avoid clashes with S3-method inheritance. } \item{dRd}{\code{signature(object = "SphericalDistribution")}: wrapped access method for - slot \code{d} of slot \code{radDistr}. From version 2.6 on, replaces deprecated + slot \code{d} of slot \code{radDistr}. From version 2.7 on, replaces defunct \code{d.Rd} to avoid clashes with S3-method inheritance. } \item{pRd}{\code{signature(object = "SphericalDistribution")}: wrapped access method for - slot \code{p} of slot \code{radDistr}. From version 2.6 on, replaces deprecated + slot \code{p} of slot \code{radDistr}. From version 2.7 on, replaces defunct \code{p.Rd} to avoid clashes with S3-method inheritance. } \item{qRd}{\code{signature(object = "SphericalDistribution")}: wrapped access method for - slot \code{q} of slot \code{radDistr}. From version 2.6 on, replaces deprecated + slot \code{q} of slot \code{radDistr}. From version 2.7 on, replaces defunct \code{q.Rd} to avoid clashes with S3-method inheritance. } \item{plotRd}{\code{signature(x = "SphericalDistribution")}: utility; calls \code{plot} for slot \code{radDistr}. From version 2.6 on, replaces deprecated Added: branches/distr-2.7/pkg/distrEllipse/man/distrEllipse-defunct.Rd =================================================================== --- branches/distr-2.7/pkg/distrEllipse/man/distrEllipse-defunct.Rd (rev 0) +++ branches/distr-2.7/pkg/distrEllipse/man/distrEllipse-defunct.Rd 2018-07-08 12:00:32 UTC (rev 1159) @@ -0,0 +1,35 @@ +\name{distrEllipse-defunct} +\alias{distrEllipse-defunct} +\alias{plot.rd} +\alias{r.rd} +\alias{d.rd} +\alias{p.rd} +\alias{q.rd} +\title{Defunct Functions in Package \pkg{distrEllipse}} +\description{ + Functions which are no longer provided in \pkg{distrEllipse} due to + clashes with S3-method inheritance. + } +\section{Methods}{ + From version 2.7 on, former versions of S4-methods + \code{rRd}, \code{dRd}, \code{pRd}, \code{qRd}, and \code{plotRd} of style + .rd are defunct due to clashes with S3-method inheritance. + More specifically, this concerns the following methods: + \describe{ + \item{r.rd}{\code{signature(object = "SphericalDistribution")}: wrapped access method for + slot \code{r} of slot \code{radDistr}.} + \item{d.rd}{\code{signature(object = "SphericalDistribution")}: wrapped access method for + slot \code{d} of slot \code{radDistr}. } + \item{p.rd}{\code{signature(object = "SphericalDistribution")}: wrapped access method for + slot \code{p} of slot \code{radDistr}. } + \item{q.rd}{\code{signature(object = "SphericalDistribution")}: wrapped access method for + slot \code{q} of slot \code{radDistr}. } + \item{plot.rd}{\code{signature(x = "SphericalDistribution")}: utility; calls \code{plot} + for slot \code{radDistr}. } + } +} + +\seealso{ + \code{\link{Defunct}} +} +\keyword{misc} Deleted: branches/distr-2.7/pkg/distrEllipse/man/distrEllipse-deprecated.Rd =================================================================== --- branches/distr-2.7/pkg/distrEllipse/man/distrEllipse-deprecated.Rd 2018-07-08 11:58:45 UTC (rev 1158) +++ branches/distr-2.7/pkg/distrEllipse/man/distrEllipse-deprecated.Rd 2018-07-08 12:00:32 UTC (rev 1159) @@ -1,35 +0,0 @@ -\name{distrEllipse-deprecated} -\alias{distrEllipse-deprecated} -\alias{plot.rd} -\alias{r.rd} -\alias{d.rd} -\alias{p.rd} -\alias{q.rd} -\title{Deprecated Functions in Package \pkg{distrEllipse}} -\description{ - These functions are provided for compatibility with older versions of - \pkg{distrEllipse} only, and may be defunct as soon as the next release. -} -\section{Methods}{ - From version 2.6 on, we deprecate former versions of S4-methods - \code{rRd}, \code{dRd}, \code{pRd}, \code{qRd}, and \code{plotRd} of style - .rd due to clashes with S3-method inheritance. - More specifically, this concerns the following methods: - \describe{ - \item{r.rd}{\code{signature(object = "SphericalDistribution")}: wrapped access method for - slot \code{r} of slot \code{radDistr}.} - \item{d.rd}{\code{signature(object = "SphericalDistribution")}: wrapped access method for - slot \code{d} of slot \code{radDistr}. } - \item{p.rd}{\code{signature(object = "SphericalDistribution")}: wrapped access method for - slot \code{p} of slot \code{radDistr}. } - \item{q.rd}{\code{signature(object = "SphericalDistribution")}: wrapped access method for - slot \code{q} of slot \code{radDistr}. } - \item{plot.rd}{\code{signature(x = "SphericalDistribution")}: utility; calls \code{plot} - for slot \code{radDistr}. } - } -} - -\seealso{ - \code{\link{Deprecated}} -} -\keyword{misc} From noreply at r-forge.r-project.org Sun Jul 8 14:02:39 2018 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Sun, 8 Jul 2018 14:02:39 +0200 (CEST) Subject: [Distr-commits] r1160 - branches/distr-2.7/pkg/distrEllipse/R Message-ID: <20180708120239.57DB3186192@r-forge.r-project.org> Author: ruckdeschel Date: 2018-07-08 14:02:36 +0200 (Sun, 08 Jul 2018) New Revision: 1160 Modified: branches/distr-2.7/pkg/distrEllipse/R/AllGenerics.R branches/distr-2.7/pkg/distrEllipse/R/SphericalDistribution.R Log: [branches: distrEllipse]: began with major update to version 2.7 / in code set .rd accessors to Defunct Modified: branches/distr-2.7/pkg/distrEllipse/R/AllGenerics.R =================================================================== --- branches/distr-2.7/pkg/distrEllipse/R/AllGenerics.R 2018-07-08 12:00:32 UTC (rev 1159) +++ branches/distr-2.7/pkg/distrEllipse/R/AllGenerics.R 2018-07-08 12:02:36 UTC (rev 1160) @@ -12,16 +12,17 @@ setGeneric("radDistr<-", function(object,value) standardGeneric("radDistr<-")) ## wrappers -if(!isGeneric("r.rd")) - setGeneric("r.rd", function(object) standardGeneric("r.rd")) -if(!isGeneric("d.rd")) - setGeneric("d.rd", function(object) standardGeneric("d.rd")) -if(!isGeneric("p.rd")) - setGeneric("p.rd", function(object) standardGeneric("p.rd")) -if(!isGeneric("q.rd")) - setGeneric("q.rd", function(object) standardGeneric("q.rd")) -if(!isGeneric("plot.rd")) - setGeneric("plot.rd", function(x, ...) standardGeneric("plot.rd")) +### defunct +# if(!isGeneric("r.rd")) +# setGeneric("r.rd", function(object) standardGeneric("r.rd")) +# if(!isGeneric("d.rd")) +# setGeneric("d.rd", function(object) standardGeneric("d.rd")) +# if(!isGeneric("p.rd")) +# setGeneric("p.rd", function(object) standardGeneric("p.rd")) +# if(!isGeneric("q.rd")) +# setGeneric("q.rd", function(object) standardGeneric("q.rd")) +# if(!isGeneric("plot.rd")) +# setGeneric("plot.rd", function(x, ...) standardGeneric("plot.rd")) if(!isGeneric("rRd")) Modified: branches/distr-2.7/pkg/distrEllipse/R/SphericalDistribution.R =================================================================== --- branches/distr-2.7/pkg/distrEllipse/R/SphericalDistribution.R 2018-07-08 12:00:32 UTC (rev 1159) +++ branches/distr-2.7/pkg/distrEllipse/R/SphericalDistribution.R 2018-07-08 12:02:36 UTC (rev 1160) @@ -42,28 +42,29 @@ ## wrappers: -setMethod("plot.rd", "SphericalDistribution", - function(x, ... ){ .Deprecated("plotRd") - plot(x at radDistr,...)}) -setMethod("r.rd", "SphericalDistribution", function(object) { - .Deprecated("rRd") - r(object at radDistr)}) -setMethod("d.rd", "SphericalDistribution", function(object) { - .Deprecated("dRd") - d(object at radDistr)}) -setMethod("p.rd", "SphericalDistribution", function(object) { - .Deprecated("pRd") - p(object at radDistr)}) -setMethod("q.rd", "SphericalDistribution", function(object) { - .Deprecated("qRd") - q(object at radDistr)}) +## Defunct accessors +#setMethod("plot.rd", "SphericalDistribution", +# function(x, ... ){ .Deprecated("plotRd") +# plot(x at radDistr,...)}) +#setMethod("r.rd", "SphericalDistribution", function(object) { +# .Deprecated("rRd") +# r(object at radDistr)}) +#setMethod("d.rd", "SphericalDistribution", function(object) { +# .Deprecated("dRd") +# d(object at radDistr)}) +#setMethod("p.rd", "SphericalDistribution", function(object) { +# .Deprecated("pRd") +# p(object at radDistr)}) +#setMethod("q.rd", "SphericalDistribution", function(object) { +# .Deprecated("qRd") +# q.l(object at radDistr)}) setMethod("plotRd", "SphericalDistribution", function(x, ... ) plot(x at radDistr,...)) setMethod("rRd", "SphericalDistribution", function(object) r(object at radDistr)) setMethod("dRd", "SphericalDistribution", function(object) d(object at radDistr)) setMethod("pRd", "SphericalDistribution", function(object) p(object at radDistr)) -setMethod("qRd", "SphericalDistribution", function(object) q(object at radDistr)) +setMethod("qRd", "SphericalDistribution", function(object) q.l(object at radDistr)) ## functionals: From noreply at r-forge.r-project.org Sun Jul 8 14:09:15 2018 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Sun, 8 Jul 2018 14:09:15 +0200 (CEST) Subject: [Distr-commits] r1161 - branches/distr-2.7/pkg/distrEllipse/inst Message-ID: <20180708120915.34CE518759A@r-forge.r-project.org> Author: ruckdeschel Date: 2018-07-08 14:09:10 +0200 (Sun, 08 Jul 2018) New Revision: 1161 Modified: branches/distr-2.7/pkg/distrEllipse/inst/NEWS Log: [branches: distrEllipse]: began with major update to version 2.7 / updated NEWS file Modified: branches/distr-2.7/pkg/distrEllipse/inst/NEWS =================================================================== --- branches/distr-2.7/pkg/distrEllipse/inst/NEWS 2018-07-08 12:02:36 UTC (rev 1160) +++ branches/distr-2.7/pkg/distrEllipse/inst/NEWS 2018-07-08 12:09:10 UTC (rev 1161) @@ -8,6 +8,20 @@ information) ############## +v 2.7 +############## + +user-visible CHANGES: + +defunct: ++ plot.rd, r.rd, d.rd, p.rd, and q.rd are replaced by + plotRd, rRd, dRd, pRd, and qRd (to avoid clashes with S3 inheritance) + +under the hood: ++ wherever possible also use q.l internally instead of q to + provide functionality in IRKernel + +############## v 2.6 ############## From noreply at r-forge.r-project.org Sun Jul 8 14:14:21 2018 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Sun, 8 Jul 2018 14:14:21 +0200 (CEST) Subject: [Distr-commits] r1162 - branches/distr-2.7/pkg/distrRmetrics/man Message-ID: <20180708121421.8A51018A1F1@r-forge.r-project.org> Author: ruckdeschel Date: 2018-07-08 14:13:37 +0200 (Sun, 08 Jul 2018) New Revision: 1162 Modified: branches/distr-2.7/pkg/distrRmetrics/man/SNorm-class.Rd branches/distr-2.7/pkg/distrRmetrics/man/SSTd-class.Rd Log: [branches: distrRmetrics]: began with major update to version 2.7 / in manuals mention problem in RStudio or Jupyter IRKernel, use q.l(.)(.) instead of q(.)(.) Modified: branches/distr-2.7/pkg/distrRmetrics/man/SNorm-class.Rd =================================================================== --- branches/distr-2.7/pkg/distrRmetrics/man/SNorm-class.Rd 2018-07-08 12:09:10 UTC (rev 1161) +++ branches/distr-2.7/pkg/distrRmetrics/man/SNorm-class.Rd 2018-07-08 12:13:37 UTC (rev 1162) @@ -75,6 +75,7 @@ d(SN)(1) # Density of this distribution is 0.1914826 for x = 1. p(SN)(1) # Probability that x < 1 is 0.8374454. q(SN)(.1) # Probability that x < -1.137878 is 0.1. +## in RStudio or Jupyter IRKernel, use q.l(.)(.) instead of q(.)(.) xi(SN) # shape of this distribution is 2. xi(SN) <- 2.5 # shape of this distribution is now 2.5. plot(SN) Modified: branches/distr-2.7/pkg/distrRmetrics/man/SSTd-class.Rd =================================================================== --- branches/distr-2.7/pkg/distrRmetrics/man/SSTd-class.Rd 2018-07-08 12:09:10 UTC (rev 1161) +++ branches/distr-2.7/pkg/distrRmetrics/man/SSTd-class.Rd 2018-07-08 12:13:37 UTC (rev 1162) @@ -83,6 +83,7 @@ d(ST)(1) # Density of this distribution is 0.1204624 for x = 1. p(ST)(1) # Probability that x < 1 is 0.9035449. q(ST)(.1) # Probability that x < -0.4432824 is 0.1. +## in RStudio or Jupyter IRKernel, use q.l(.)(.) instead of q(.)(.) nu(ST) # df of this distribution is 3. nu(ST) <- 4 # df of this distribution is now 4. plot(ST) From noreply at r-forge.r-project.org Sun Jul 8 14:16:13 2018 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Sun, 8 Jul 2018 14:16:13 +0200 (CEST) Subject: [Distr-commits] r1163 - branches/distr-2.7/pkg/distrRmetrics/inst Message-ID: <20180708121613.8A2BF180917@r-forge.r-project.org> Author: ruckdeschel Date: 2018-07-08 14:15:29 +0200 (Sun, 08 Jul 2018) New Revision: 1163 Modified: branches/distr-2.7/pkg/distrRmetrics/inst/NEWS Log: [branches: distrRmetrics]: began with major update to version 2.7 / updated NEWS file Modified: branches/distr-2.7/pkg/distrRmetrics/inst/NEWS =================================================================== --- branches/distr-2.7/pkg/distrRmetrics/inst/NEWS 2018-07-08 12:13:37 UTC (rev 1162) +++ branches/distr-2.7/pkg/distrRmetrics/inst/NEWS 2018-07-08 12:15:29 UTC (rev 1163) @@ -8,6 +8,16 @@ information) ############## +v 2.7 +############## + +user-visible CHANGES: + +under the hood: ++ wherever possible also use q.l internally instead of q to + provide functionality in IRKernel + +############## v 2.6 ############## From noreply at r-forge.r-project.org Sun Jul 8 14:21:57 2018 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Sun, 8 Jul 2018 14:21:57 +0200 (CEST) Subject: [Distr-commits] r1164 - branches/distr-2.7/pkg/distrMod/R Message-ID: <20180708122157.4541F18A4FA@r-forge.r-project.org> Author: ruckdeschel Date: 2018-07-08 14:21:29 +0200 (Sun, 08 Jul 2018) New Revision: 1164 Modified: branches/distr-2.7/pkg/distrMod/R/0distrModUtils.R branches/distr-2.7/pkg/distrMod/R/L2GroupFamilies.R branches/distr-2.7/pkg/distrMod/R/qqplot.R branches/distr-2.7/pkg/distrMod/R/returnlevelplot.R Log: [branches: distrMod]: began with major update to version 2.7 / in R-code changed calls to q(.) to q.l(.) and added a default value for adj.lbl in returnlevelplot.R Modified: branches/distr-2.7/pkg/distrMod/R/0distrModUtils.R =================================================================== --- branches/distr-2.7/pkg/distrMod/R/0distrModUtils.R 2018-07-08 12:15:29 UTC (rev 1163) +++ branches/distr-2.7/pkg/distrMod/R/0distrModUtils.R 2018-07-08 12:21:29 UTC (rev 1164) @@ -16,8 +16,8 @@ lowerTruncQuantile = getdistrExOption("ElowerTruncQuantile"), upperTruncQuantile = getdistrExOption("EupperTruncQuantile"), IQR.fac = getdistrExOption("IQR.fac")){ - low0 <- q(distr)(lowerTruncQuantile) - upp0 <- q(distr)(upperTruncQuantile,lower.tail=FALSE) + low0 <- q.l(distr)(lowerTruncQuantile) + upp0 <- q.l(distr)(upperTruncQuantile,lower.tail=FALSE) me <- median(distr) s1 <- IQR(distr) low1 <- me - IQR.fac * s1 @@ -116,8 +116,8 @@ distr <- L2Fam at distribution ### get a sensible integration range: - low0 <- q(distr)(TruncQuantile) - up0 <- q(distr)(TruncQuantile, lower.tail = FALSE) + low0 <- q.l(distr)(TruncQuantile) + up0 <- q.l(distr)(TruncQuantile, lower.tail = FALSE) m0 <- median(distr); s0 <- IQR(distr) low1 <- m0 - IQR.fac * s0 up1 <- m0 + IQR.fac * s0 @@ -125,8 +125,8 @@ ### get a sensible integration range: if(missing(mu)) mu <- distr - low0.mu <- q(mu)(TruncQuantile) - up0.mu <- q(mu)(TruncQuantile, lower.tail = FALSE) + low0.mu <- q.l(mu)(TruncQuantile) + up0.mu <- q.l(mu)(TruncQuantile, lower.tail = FALSE) m0.mu <- median(mu); s0.mu <- IQR(mu) low1.mu <- m0.mu - IQR.fac * s0.mu up1.mu <- m0.mu + IQR.fac * s0.mu @@ -138,7 +138,7 @@ else {if(is(distr,"AbscontDistribution")){ x.seq0 <- seq(low, up, length = N1) - h0 <- x.seq0[1:2]%*%c(-1,1) + h0 <- diff(x.seq0[2:1]) x.seq <- x.seq0[odd] }else{ x.seq <- seq(low,up, length = N) @@ -149,7 +149,7 @@ else {if(is(mu,"AbscontDistribution")){ x.mu.seq0 <- seq(low.mu, up.mu, length = N1) - h0.mu <- x.mu.seq0[1:2]%*%c(-1,1) + h0.mu <- diff(x.mu.seq0[2:1]) x.mu.seq <- x.mu.seq0[odd] }else{ x.mu.seq <- seq(low.mu, up.mu, length = N) @@ -618,8 +618,8 @@ .NotInSupport <- function(x,D){ if(length(x)==0) return(logical(0)) - nInSupp <- which(x < q(D)(0)) - nInSupp <- unique(sort(c(nInSupp,which(x > q(D)(1))))) + nInSupp <- which(x < q.l(D)(0)) + nInSupp <- unique(sort(c(nInSupp,which(x > q.l(D)(1))))) nInSuppo <- if("support" %in% names(getSlots(class(D)))) @@ -647,7 +647,7 @@ lx[.NotInSupport(x,D)] <- 4 - idx.0 <- ((x>q(D)(1)) | (xq.l(D)(1)) | (x q(y)(1))))) + nInSupp <- unique(sort(c(nInSupp,which( xo > q.l(y)(1))))) if("support" %in% names(getSlots(class(y)))) nInSupp <- unique(sort(c(nInSupp,which( ! xo %in% support(y))))) if("gaps" %in% names(getSlots(class(y)))) Modified: branches/distr-2.7/pkg/distrMod/R/returnlevelplot.R =================================================================== --- branches/distr-2.7/pkg/distrMod/R/returnlevelplot.R 2018-07-08 12:15:29 UTC (rev 1163) +++ branches/distr-2.7/pkg/distrMod/R/returnlevelplot.R 2018-07-08 12:21:29 UTC (rev 1164) @@ -54,7 +54,7 @@ col.pch = par("col"),## color for the plotted symbols cex.lbl = par("cex"),## magnification factor for the plotted observation labels col.lbl = par("col"),## color for the plotted observation labels - adj.lbl = NULL, ## adj parameter for the plotted observation labels + adj.lbl = par("adj"),## adj parameter for the plotted observation labels alpha.trsp = NA, ## alpha transparency to be added afterwards jit.fac = 0, ## jittering factor used for discrete distributions jit.tol = .Machine$double.eps, ## tolerance for jittering: if distance @@ -120,13 +120,13 @@ } pp <- ppoints(length(xj)) - yc.o <- q(y)(pp) + yc.o <- q.l(y)(pp) ycl <- p2rl(yc.o) ### extend range somewhat # pyn <- p(y)(10^(seq(-1, 3.75 + log10(npy), by = 0.1))) xyall <- force(sort(unique(c(yc.o,x, - q(y)(c(seq(0.01, 0.09, by = 0.01),(1:9)/10, + q.l(y)(c(seq(0.01, 0.09, by = 0.01),(1:9)/10, 0.95, 0.99, 0.995, 0.999)) )))) rxyall <- (max(xyall)-min(xyall))*0.6 @@ -162,9 +162,9 @@ if(check.NotInSupport){ xo <- x[ord.x] - nInSupp <- which(xo < q(y)(0)) + nInSupp <- which(xo < q.l(y)(0)) - nInSupp <- unique(sort(c(nInSupp,which( xo > q(y)(1))))) + nInSupp <- unique(sort(c(nInSupp,which( xo > q.l(y)(1))))) if("support" %in% names(getSlots(class(y)))) nInSupp <- unique(sort(c(nInSupp,which( ! xo %in% support(y))))) if("gaps" %in% names(getSlots(class(y)))) From noreply at r-forge.r-project.org Sun Jul 8 14:26:55 2018 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Sun, 8 Jul 2018 14:26:55 +0200 (CEST) Subject: [Distr-commits] r1165 - branches/distr-2.7/pkg/distrMod/man Message-ID: <20180708122655.61B2C184323@r-forge.r-project.org> Author: ruckdeschel Date: 2018-07-08 14:26:47 +0200 (Sun, 08 Jul 2018) New Revision: 1165 Modified: branches/distr-2.7/pkg/distrMod/man/0distrMod-package.Rd branches/distr-2.7/pkg/distrMod/man/internals-qqplot.Rd branches/distr-2.7/pkg/distrMod/man/qqplot.Rd branches/distr-2.7/pkg/distrMod/man/returnlevelplot.Rd Log: [branches: distrMod]: began with major update to version 2.7 / in manuals matched manuals to R-code in qqplot/returnlevelplot as to default value for adj.lbl in returnlevelplot, qqlot and .labelprep, moved RobExtremes to Enhances Modified: branches/distr-2.7/pkg/distrMod/man/0distrMod-package.Rd =================================================================== --- branches/distr-2.7/pkg/distrMod/man/0distrMod-package.Rd 2018-07-08 12:21:29 UTC (rev 1164) +++ branches/distr-2.7/pkg/distrMod/man/0distrMod-package.Rd 2018-07-08 12:26:47 UTC (rev 1165) @@ -20,7 +20,8 @@ Depends: \tab R(>= 2.14.0), distr(>= 2.5.2), distrEx(>= 2.4), RandVar(>= 0.6.3), MASS, stats4, methods \cr Imports: \tab startupmsg, sfsmisc, graphics, stats, grDevices \cr -Suggests: \tab ismev, evd, RobExtremes \cr +Suggests: \tab ismev, evd\cr +Enhances: RobExtremes\cr ByteCompile: \tab yes \cr License: \tab LGPL-3 \cr URL: \tab http://distr.r-forge.r-project.org/\cr @@ -291,7 +292,7 @@ M. Kohl and P. Ruckdeschel (2010): R Package distrMod: S4 Classes and Methods for Probability Models. Journal of Statistical Software, 35(10), 1-27. -\url{http://www.jstatsoft.org/v35/i10/} +\url{https://www.jstatsoft.org/v35/i10/} (see also \code{vignette("distrMod")}) Modified: branches/distr-2.7/pkg/distrMod/man/internals-qqplot.Rd =================================================================== --- branches/distr-2.7/pkg/distrMod/man/internals-qqplot.Rd 2018-07-08 12:21:29 UTC (rev 1164) +++ branches/distr-2.7/pkg/distrMod/man/internals-qqplot.Rd 2018-07-08 12:26:47 UTC (rev 1165) @@ -9,7 +9,7 @@ These functions are used internally by qqplot of package distrMod.} \usage{ -.labelprep(x,y,lab.pts,col.lbl,cex.lbl,which.lbs,which.Order,order.traf) +.labelprep(x,y,lab.pts,col.lbl,cex.lbl,adj.lbl,which.lbs,which.Order,order.traf) } @@ -18,6 +18,7 @@ \item{y}{a (numeric) vector of same length as \code{x}} \item{cex.lbl}{magnification factor for the plotted observation labels} \item{col.lbl}{color for the plotted observation labels} +\item{adj.lbl}{adjustment factor for the plotted observation labels} \item{lab.pts}{character or \code{NULL}; observation labels to be used} \item{which.lbs}{integer or \code{NULL}; which observations shall be labelled} \item{which.Order}{integer or \code{NULL}; which of the ordered (remaining) observations shall be labelled} Modified: branches/distr-2.7/pkg/distrMod/man/qqplot.Rd =================================================================== --- branches/distr-2.7/pkg/distrMod/man/qqplot.Rd 2018-07-08 12:21:29 UTC (rev 1164) +++ branches/distr-2.7/pkg/distrMod/man/qqplot.Rd 2018-07-08 12:26:47 UTC (rev 1165) @@ -18,7 +18,7 @@ col.sCI = "tomato2", lty.sCI = 4, lwd.sCI = 2, pch.sCI = par("pch"), cex.sCI = par("cex"), added.points.CI = TRUE, cex.pch = par("cex"), col.pch = par("col"), - cex.lbl = par("cex"), col.lbl = par("col"), adj.lbl = NULL, + cex.lbl = par("cex"), col.lbl = par("col"), adj.lbl = par("adj"), alpha.trsp = NA, jit.fac = 0, jit.tol = .Machine$double.eps, check.NotInSupport = TRUE, col.NotInSupport = "red", with.legend = TRUE, legend.bg = "white", Modified: branches/distr-2.7/pkg/distrMod/man/returnlevelplot.Rd =================================================================== --- branches/distr-2.7/pkg/distrMod/man/returnlevelplot.Rd 2018-07-08 12:21:29 UTC (rev 1164) +++ branches/distr-2.7/pkg/distrMod/man/returnlevelplot.Rd 2018-07-08 12:26:47 UTC (rev 1165) @@ -21,7 +21,7 @@ col.sCI = "tomato2", lty.sCI = 4, lwd.sCI = 2, pch.sCI = par("pch"), cex.sCI = par("cex"), added.points.CI = TRUE, cex.pch = par("cex"), col.pch = par("col"), - cex.lbl = par("cex"), col.lbl = par("col"), adj.lbl = NULL, + cex.lbl = par("cex"), col.lbl = par("col"), adj.lbl = par("adj"), alpha.trsp = NA, jit.fac = 0, jit.tol = .Machine$double.eps, check.NotInSupport = TRUE, col.NotInSupport = "red", with.legend = TRUE, legend.bg = "white", From noreply at r-forge.r-project.org Sun Jul 8 14:33:29 2018 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Sun, 8 Jul 2018 14:33:29 +0200 (CEST) Subject: [Distr-commits] r1166 - in branches/distr-2.7/pkg/distrMod: . inst vignettes Message-ID: <20180708123329.60DB91807B5@r-forge.r-project.org> Author: ruckdeschel Date: 2018-07-08 14:33:05 +0200 (Sun, 08 Jul 2018) New Revision: 1166 Modified: branches/distr-2.7/pkg/distrMod/DESCRIPTION branches/distr-2.7/pkg/distrMod/inst/NEWS branches/distr-2.7/pkg/distrMod/vignettes/Estimate.pdf branches/distr-2.7/pkg/distrMod/vignettes/ParamFamParameter.pdf branches/distr-2.7/pkg/distrMod/vignettes/ProbFamily.pdf branches/distr-2.7/pkg/distrMod/vignettes/distrMod.Rnw Log: [branches: distrMod]: began with major update to version 2.7 / updated NEWS, DESCRIPTION (moved RobExtremes to Enhances) and vignette (mention problem with Jupyter IRKernel and RStudio) Modified: branches/distr-2.7/pkg/distrMod/DESCRIPTION =================================================================== --- branches/distr-2.7/pkg/distrMod/DESCRIPTION 2018-07-08 12:26:47 UTC (rev 1165) +++ branches/distr-2.7/pkg/distrMod/DESCRIPTION 2018-07-08 12:33:05 UTC (rev 1166) @@ -10,7 +10,8 @@ Depends: R(>= 2.14.0), distr(>= 2.5.2), distrEx(>= 2.4), RandVar(>= 0.6.3), MASS, stats4, methods Imports: startupmsg, sfsmisc, graphics, stats, grDevices -Suggests: ismev, evd, RobExtremes +Suggests: ismev, evd, +Enhances: RobExtremes ByteCompile: yes License: LGPL-3 Encoding: latin1 Modified: branches/distr-2.7/pkg/distrMod/inst/NEWS =================================================================== --- branches/distr-2.7/pkg/distrMod/inst/NEWS 2018-07-08 12:26:47 UTC (rev 1165) +++ branches/distr-2.7/pkg/distrMod/inst/NEWS 2018-07-08 12:33:05 UTC (rev 1166) @@ -8,6 +8,20 @@ information) ############## +v 2.7 +############## + +user-visible CHANGES: ++ replaced http://CRAN... by https://CRAN... (also in CITATION and similar files) ++ exported .CvMMDCovariance in distrMod ++ added call to return value of qqplot + +under the hood: ++ wherever possible also use q.l internally instead of q to + provide functionality in IRKernel ++ fixed omegahat.net issue (raised by K.Hornik,(24.10.2016, 18:08) + +############## v 2.6 ############## Modified: branches/distr-2.7/pkg/distrMod/vignettes/Estimate.pdf =================================================================== (Binary files differ) Modified: branches/distr-2.7/pkg/distrMod/vignettes/ParamFamParameter.pdf =================================================================== --- branches/distr-2.7/pkg/distrMod/vignettes/ParamFamParameter.pdf 2018-07-08 12:26:47 UTC (rev 1165) +++ branches/distr-2.7/pkg/distrMod/vignettes/ParamFamParameter.pdf 2018-07-08 12:33:05 UTC (rev 1166) @@ -1,99 +1,99 @@ -%PDF-1.4 -%???? -5 0 obj -<> -stream -x??R?n?0 }?W?m? -p"u??X???n???g?b?u???:v??`? A:$?E?`???k???|?O??b?5?????!?????U\?Q(hmQ)+?Z? Ec&?)"Kt??1? Eg.~?C???z?,~??????B(aO????4i9?.s??S?'?(?$'o?????3v????U??P=?????H?2??0kCN??0?3 at gx?|}:??N?A}"=??i??m???`Gn?????0?x????d?1f??o??AW???MWm5????3???|???/e_i`?????/?????/??????>l=??j_???????M_???,t?c?8???????????R]yc?R<gv???#??#????Oe?:???????endstream -endobj -6 0 obj -410 -endobj -4 0 obj -<> -/Contents 5 0 R ->> -endobj -3 0 obj -<< /Type /Pages /Kids [ -4 0 R -] /Count 1 ->> -endobj -1 0 obj -<> -endobj -7 0 obj -<>endobj -10 0 obj -<> -endobj -11 0 obj -<> -endobj -9 0 obj -<> -endobj -8 0 obj -<> -endobj -12 0 obj -<>stream - - - - - -Dia v0.96.1 - -/home/btm722/arbeit/Rpackages/ParamFamParameter.diabtm722 - - - - - -endstream -endobj -2 0 obj -<>endobj -xref -0 13 -0000000000 65535 f -0000000724 00000 n -0000002497 00000 n -0000000665 00000 n -0000000514 00000 n -0000000015 00000 n -0000000495 00000 n -0000000789 00000 n -0000000961 00000 n -0000000899 00000 n -0000000830 00000 n -0000000860 00000 n -0000001030 00000 n -trailer -<< /Size 13 /Root 1 0 R /Info 2 0 R -/ID [] ->> -startxref -2718 -%%EOF +%PDF-1.4 +%???? +5 0 obj +<> +stream +x??R?n?0 }?W?m? +p"u??X???n???g?b?u???:v??`? A:$?E?`???k???|?O??b?5?????!?????U\?Q(hmQ)+?Z? Ec&?)"Kt??1? Eg.~?C???z?,~??????B(aO????4i9?.s??S?'?(?$'o?????3v????U??P=?????H?2??0kCN??0?3 at gx?|}:??N?A}"=??i??m???`Gn?????0?x????d?1f??o??AW???MWm5????3???|???/e_i`?????/?????/??????>l=??j_???????M_???,t?c?8???????????R]yc?R<gv???#??#????Oe?:???????endstream +endobj +6 0 obj +410 +endobj +4 0 obj +<> +/Contents 5 0 R +>> +endobj +3 0 obj +<< /Type /Pages /Kids [ +4 0 R +] /Count 1 +>> +endobj +1 0 obj +<> +endobj +7 0 obj +<>endobj +10 0 obj +<> +endobj +11 0 obj +<> +endobj +9 0 obj +<> +endobj +8 0 obj +<> +endobj +12 0 obj +<>stream + + + + + +Dia v0.96.1 + +/home/btm722/arbeit/Rpackages/ParamFamParameter.diabtm722 + + + + + +endstream +endobj +2 0 obj +<>endobj +xref +0 13 +0000000000 65535 f +0000000724 00000 n +0000002497 00000 n +0000000665 00000 n +0000000514 00000 n +0000000015 00000 n +0000000495 00000 n +0000000789 00000 n +0000000961 00000 n +0000000899 00000 n +0000000830 00000 n +0000000860 00000 n +0000001030 00000 n +trailer +<< /Size 13 /Root 1 0 R /Info 2 0 R +/ID [] +>> +startxref +2718 +%%EOF Modified: branches/distr-2.7/pkg/distrMod/vignettes/ProbFamily.pdf =================================================================== (Binary files differ) Modified: branches/distr-2.7/pkg/distrMod/vignettes/distrMod.Rnw =================================================================== --- branches/distr-2.7/pkg/distrMod/vignettes/distrMod.Rnw 2018-07-08 12:26:47 UTC (rev 1165) +++ branches/distr-2.7/pkg/distrMod/vignettes/distrMod.Rnw 2018-07-08 12:33:05 UTC (rev 1166) @@ -328,7 +328,7 @@ $\Lambda_\theta=\frac{d}{d\theta} \log p_\theta$ (the classical scores) for $p_\theta$ the density of $P_\theta$ w.r.t.\ Lebesgue or counting measure. \par -One of the strengths of \proglang{R} (or more accurately of \proglang{S}) right +One of the strengths of \proglang{R} (or more accurately of \proglang{S}) right from the introduction of \proglang{S}3 in \citet{B:C:W:88} is that models, more specifically [generalized] linear models (see functions \code{lm} and \code{glm} in package \pkg{stats}) may be explicitly formulated in terms of the language. @@ -381,6 +381,7 @@ <>= p(Z)(0.4) q(Z)(0.3) +## in RStudio or Jupyter IRKernel, use q.l(.)(.) instead of q(.)(.) r(Z)(5) @ %---------------------------------------------------------------------------- @@ -745,6 +746,7 @@ of the upper quartile of the central distribution, obtainable via <>= (mad.const <- 1/q(myD)(0.75)) +## in RStudio or Jupyter IRKernel, use q.l(.)(.) instead of q(.)(.) @ %\end{Rem} % ----------------------------------------------------------------------------- From noreply at r-forge.r-project.org Sun Jul 8 14:36:41 2018 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Sun, 8 Jul 2018 14:36:41 +0200 (CEST) Subject: [Distr-commits] r1167 - in branches/distr-2.7/pkg/distrTeach: R inst man Message-ID: <20180708123641.B2C451807CD@r-forge.r-project.org> Author: ruckdeschel Date: 2018-07-08 14:36:39 +0200 (Sun, 08 Jul 2018) New Revision: 1167 Modified: branches/distr-2.7/pkg/distrTeach/R/illustLLN.R branches/distr-2.7/pkg/distrTeach/inst/CITATION branches/distr-2.7/pkg/distrTeach/inst/NEWS branches/distr-2.7/pkg/distrTeach/man/0distrTeach-package.Rd branches/distr-2.7/pkg/distrTeach/man/IllustCLT.Rd Log: [branches: distrTeach]: began with major update to version 2.7 / updated manual (to speed examples up), use q.l() instead of q() in R-code, updated ref to stamats, https instead of http, NEWS Modified: branches/distr-2.7/pkg/distrTeach/R/illustLLN.R =================================================================== --- branches/distr-2.7/pkg/distrTeach/R/illustLLN.R 2018-07-08 12:33:05 UTC (rev 1166) +++ branches/distr-2.7/pkg/distrTeach/R/illustLLN.R 2018-07-08 12:36:39 UTC (rev 1167) @@ -136,7 +136,7 @@ for(j in seq(1, m, by = step)) {LLNin(Distr, n, j, j+step-1) do.call(matplot, args = c(list(Ns, t(da), pch = pch, col=col, - axes = FALSE, ylim = q(Distr)(c(0.02,0.98)), + axes = FALSE, ylim = q.l(Distr)(c(0.02,0.98)), xlab = xlab, ylab = "", main = main), dots.for.matplot )) title(ylab = ylab, line = 1.7) Modified: branches/distr-2.7/pkg/distrTeach/inst/CITATION =================================================================== --- branches/distr-2.7/pkg/distrTeach/inst/CITATION 2018-07-08 12:33:05 UTC (rev 1166) +++ branches/distr-2.7/pkg/distrTeach/inst/CITATION 2018-07-08 12:36:39 UTC (rev 1167) @@ -12,7 +12,7 @@ month="July", year="2008", address="{Kaiserslautern, Germany}", - URL = "http://cran.r-project.org/web/packages/distrDoc/vignettes/distr.pdf", + URL = "https://CRAN.R-project.org/web/packages/distrDoc/vignettes/distr.pdf", textVersion = paste("Ruckdeschel, P., Kohl, M., Stabla, T., & Camphausen, F. (2006): ", "S4 Classes for Distributions---a manual for packages distr, distrSim, distrTEst, distrEx, ", "distrMod, and distrTeach") Modified: branches/distr-2.7/pkg/distrTeach/inst/NEWS =================================================================== --- branches/distr-2.7/pkg/distrTeach/inst/NEWS 2018-07-08 12:33:05 UTC (rev 1166) +++ branches/distr-2.7/pkg/distrTeach/inst/NEWS 2018-07-08 12:36:39 UTC (rev 1167) @@ -8,6 +8,17 @@ information) ############## +v 2.7 +############## + +user-visible CHANGES: ++ fixed some URLs in https style + +under the hood: ++ wherever possible also use q.l internally instead of q to + provide functionality in IRKernel + +############## v 2.6 ############## Modified: branches/distr-2.7/pkg/distrTeach/man/0distrTeach-package.Rd =================================================================== --- branches/distr-2.7/pkg/distrTeach/man/0distrTeach-package.Rd 2018-07-08 12:33:05 UTC (rev 1166) +++ branches/distr-2.7/pkg/distrTeach/man/0distrTeach-package.Rd 2018-07-08 12:36:39 UTC (rev 1167) @@ -117,7 +117,7 @@ M. Kohl (2005): \emph{Numerical Contributions to the Asymptotic Theory of Robustness.} PhD Thesis. Bayreuth. Available as -\url{http://www.stamats.de/ThesisMKohl.pdf} +\url{http://www.stamats.de/wp-content/uploads/2018/04/ThesisMKohl.pdf} } \keyword{package} \concept{LLN} Modified: branches/distr-2.7/pkg/distrTeach/man/IllustCLT.Rd =================================================================== --- branches/distr-2.7/pkg/distrTeach/man/IllustCLT.Rd 2018-07-08 12:33:05 UTC (rev 1166) +++ branches/distr-2.7/pkg/distrTeach/man/IllustCLT.Rd 2018-07-08 12:36:39 UTC (rev 1167) @@ -36,11 +36,11 @@ Peter Ruckdeschel \email{peter.ruckdeschel at uni-oldenburg.de}} \examples{ distroptions("DefaultNrFFTGridPointsExponent" = 13) -illustrateCLT(Distr = Unif(), len = 20) +illustrateCLT(Distr = Unif(), len = 10) distroptions("DefaultNrFFTGridPointsExponent" = 12) -illustrateCLT(Distr = Pois(lambda = 2), len = 20) +illustrateCLT(Distr = Pois(lambda = 2), len = 10) distroptions("DefaultNrFFTGridPointsExponent" = 13) -illustrateCLT(Distr = Pois(lambda = 2)+Unif(), len = 20) +illustrateCLT(Distr = Pois(lambda = 2)+Unif(), len = 10) illustrateCLT.tcl(Distr = Unif(), k = 4, "Unif()") } From noreply at r-forge.r-project.org Sun Jul 8 14:43:07 2018 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Sun, 8 Jul 2018 14:43:07 +0200 (CEST) Subject: [Distr-commits] r1168 - in branches/distr-2.7/pkg/distrDoc: . inst vignettes Message-ID: <20180708124307.18AFA1813AF@r-forge.r-project.org> Author: ruckdeschel Date: 2018-07-08 14:43:04 +0200 (Sun, 08 Jul 2018) New Revision: 1168 Modified: branches/distr-2.7/pkg/distrDoc/DESCRIPTION branches/distr-2.7/pkg/distrDoc/NAMESPACE branches/distr-2.7/pkg/distrDoc/inst/NEWS branches/distr-2.7/pkg/distrDoc/vignettes/BiasType.pdf branches/distr-2.7/pkg/distrDoc/vignettes/Confint.pdf branches/distr-2.7/pkg/distrDoc/vignettes/Estimate.pdf branches/distr-2.7/pkg/distrDoc/vignettes/EvaluationList.pdf branches/distr-2.7/pkg/distrDoc/vignettes/NormType.pdf branches/distr-2.7/pkg/distrDoc/vignettes/ParamFamParameter.pdf branches/distr-2.7/pkg/distrDoc/vignettes/ProbFamily.pdf branches/distr-2.7/pkg/distrDoc/vignettes/RiskType.pdf branches/distr-2.7/pkg/distrDoc/vignettes/Symmetry.pdf branches/distr-2.7/pkg/distrDoc/vignettes/dataclass.pdf branches/distr-2.7/pkg/distrDoc/vignettes/distr.Rnw branches/distr-2.7/pkg/distrDoc/vignettes/distribution.pdf branches/distr-2.7/pkg/distrDoc/vignettes/evaluation.pdf branches/distr-2.7/pkg/distrDoc/vignettes/parameter.pdf branches/distr-2.7/pkg/distrDoc/vignettes/rspace.pdf Log: [branches: distrDoc]: began with major update to version 2.7 / updated NEWS, NAMESPACE, DESCRIPTION, vignette (replaced SweaveListingUtils by knitr, mention problem with Jupyter IRKernel and RStudio, https instead of https) Modified: branches/distr-2.7/pkg/distrDoc/DESCRIPTION =================================================================== --- branches/distr-2.7/pkg/distrDoc/DESCRIPTION 2018-07-08 12:36:39 UTC (rev 1167) +++ branches/distr-2.7/pkg/distrDoc/DESCRIPTION 2018-07-08 12:43:04 UTC (rev 1168) @@ -13,8 +13,9 @@ Depends: R(>= 2.14.0) Imports: distr(>= 2.2.0), distrEx(>= 2.2.0), distrSim(>= 2.2.0), distrTEst(>= 2.2.0), distrTeach(>= 2.2.0), RandVar(>= 0.7), distrMod(>= 2.2.0), MASS, methods, - SweaveListingUtils, startupmsg -Suggests: Biobase + startupmsg +Suggests: Biobase, knitr +VignetteBuilder: knitr ByteCompile: yes Encoding: latin1 License: LGPL-3 Modified: branches/distr-2.7/pkg/distrDoc/NAMESPACE =================================================================== --- branches/distr-2.7/pkg/distrDoc/NAMESPACE 2018-07-08 12:36:39 UTC (rev 1167) +++ branches/distr-2.7/pkg/distrDoc/NAMESPACE 2018-07-08 12:43:04 UTC (rev 1168) @@ -1,5 +1,4 @@ import("methods") -import("SweaveListingUtils") importFrom("startupmsg","buildStartupMessage") import("MASS") import("distr") Modified: branches/distr-2.7/pkg/distrDoc/inst/NEWS =================================================================== --- branches/distr-2.7/pkg/distrDoc/inst/NEWS 2018-07-08 12:36:39 UTC (rev 1167) +++ branches/distr-2.7/pkg/distrDoc/inst/NEWS 2018-07-08 12:43:04 UTC (rev 1168) @@ -8,6 +8,21 @@ information) ############## +v 2.7 +############## + +user-visible CHANGES: ++ more precise formulation of how to use calls to q() for RStudio + and Jupyter IRKernel (i.e., use q.l) ++ switch from SweaveListingUtils to knitr in vignettes ++ replaced http://CRAN... by https://CRAN... (also in CITATION and similar files) ++ updated address (Oldenburg) in several vignettes + +under the hood: ++ fixed CITATION issue (raised by K.Hornik,(12.10., 12:26) ++ fixed omegahat.net issue (raised by K.Hornik,(24.10.2016, 18:08) + +############## v 2.6 ############## Modified: branches/distr-2.7/pkg/distrDoc/vignettes/BiasType.pdf =================================================================== (Binary files differ) Modified: branches/distr-2.7/pkg/distrDoc/vignettes/Confint.pdf =================================================================== --- branches/distr-2.7/pkg/distrDoc/vignettes/Confint.pdf 2018-07-08 12:36:39 UTC (rev 1167) +++ branches/distr-2.7/pkg/distrDoc/vignettes/Confint.pdf 2018-07-08 12:43:04 UTC (rev 1168) @@ -1,98 +1,98 @@ -%PDF-1.4 -%???? -5 0 obj -<> -stream -x????N? ???S?;]L?PJ?.5?????S????????u??? ???????q??5M????u???%?%???B3!1W??y??????f?T? G1|}????D?????? -xW?`Y?s?-???+?(? -?a)????B? -?(????k|???4H???????????M????_s???=SM?4???>?[?}o:;?{?&??L?|?=>? -?????endstream -endobj -6 0 obj -310 -endobj -4 0 obj -<> -/Contents 5 0 R ->> -endobj -3 0 obj -<< /Type /Pages /Kids [ -4 0 R -] /Count 1 ->> -endobj -1 0 obj -<> -endobj -7 0 obj -<>endobj -10 0 obj -<> -endobj -11 0 obj -<> -endobj -9 0 obj -<> -endobj -8 0 obj -<> -endobj -12 0 obj -<>stream - - - - - -UnknownApplication - -Untitled - - - - - -endstream -endobj -2 0 obj -<>endobj -xref -0 13 -0000000000 65535 f -0000000624 00000 n -0000002294 00000 n -0000000565 00000 n -0000000414 00000 n -0000000015 00000 n -0000000395 00000 n -0000000689 00000 n -0000000861 00000 n -0000000799 00000 n -0000000730 00000 n -0000000760 00000 n -0000000930 00000 n -trailer -<< /Size 13 /Root 1 0 R /Info 2 0 R -/ID [] ->> -startxref -2417 -%%EOF +%PDF-1.4 +%???? +5 0 obj +<> +stream +x????N? ???S?;]L?PJ?.5?????S????????u??? ???????q??5M????u???%?%???B3!1W??y??????f?T? G1|}????D?????? +xW?`Y?s?-???+?(? +?a)????B? -?(????k|???4H???????????M????_s???=SM?4???>?[?}o:;?{?&??L?|?=>? +?????endstream +endobj +6 0 obj +310 +endobj +4 0 obj +<> +/Contents 5 0 R +>> +endobj +3 0 obj +<< /Type /Pages /Kids [ +4 0 R +] /Count 1 +>> +endobj +1 0 obj +<> +endobj +7 0 obj +<>endobj +10 0 obj +<> +endobj +11 0 obj +<> +endobj +9 0 obj +<> +endobj +8 0 obj +<> +endobj +12 0 obj +<>stream + + + + + +UnknownApplication + +Untitled + + + + + +endstream +endobj +2 0 obj +<>endobj +xref +0 13 +0000000000 65535 f +0000000624 00000 n +0000002294 00000 n +0000000565 00000 n +0000000414 00000 n +0000000015 00000 n +0000000395 00000 n +0000000689 00000 n +0000000861 00000 n +0000000799 00000 n +0000000730 00000 n +0000000760 00000 n +0000000930 00000 n +trailer +<< /Size 13 /Root 1 0 R /Info 2 0 R +/ID [] +>> +startxref +2417 +%%EOF Modified: branches/distr-2.7/pkg/distrDoc/vignettes/Estimate.pdf =================================================================== (Binary files differ) Modified: branches/distr-2.7/pkg/distrDoc/vignettes/EvaluationList.pdf =================================================================== --- branches/distr-2.7/pkg/distrDoc/vignettes/EvaluationList.pdf 2018-07-08 12:36:39 UTC (rev 1167) +++ branches/distr-2.7/pkg/distrDoc/vignettes/EvaluationList.pdf 2018-07-08 12:43:04 UTC (rev 1168) @@ -1,68 +1,68 @@ -%PDF-1.2 -%???? -5 0 obj -<> -stream -x????j?0E??w???T?????`??&?~??M?S????Wrt??4???a?z???HPb|%V??a -??aW????b?iK?? -???Y???[/?????> -/Contents 5 0 R ->> -endobj -3 0 obj -<< /Type /Pages /Kids [ -4 0 R -] /Count 1 ->> -endobj -1 0 obj -<> -endobj -9 0 obj -<> -endobj -7 0 obj -<> -endobj -8 0 obj -<> -endobj -2 0 obj -<>endobj -xref -0 10 -0000000000 65535 f -0000000536 00000 n -0000000753 00000 n -0000000477 00000 n -0000000336 00000 n -0000000015 00000 n -0000000317 00000 n -0000000622 00000 n -0000000691 00000 n -0000000584 00000 n -trailer -<< /Size 10 /Root 1 0 R /Info 2 0 R -/ID [] ->> -startxref -864 -%%EOF +%PDF-1.2 +%???? +5 0 obj +<> +stream +x????j?0E??w???T?????`??&?~??M?S????Wrt??4???a?z???HPb|%V??a +??aW????b?iK?? +???Y???[/?????> +/Contents 5 0 R +>> +endobj +3 0 obj +<< /Type /Pages /Kids [ +4 0 R +] /Count 1 +>> +endobj +1 0 obj +<> +endobj +9 0 obj +<> +endobj +7 0 obj +<> +endobj +8 0 obj +<> +endobj +2 0 obj +<>endobj +xref +0 10 +0000000000 65535 f +0000000536 00000 n +0000000753 00000 n +0000000477 00000 n +0000000336 00000 n +0000000015 00000 n +0000000317 00000 n +0000000622 00000 n +0000000691 00000 n +0000000584 00000 n +trailer +<< /Size 10 /Root 1 0 R /Info 2 0 R +/ID [] +>> +startxref +864 +%%EOF Modified: branches/distr-2.7/pkg/distrDoc/vignettes/NormType.pdf =================================================================== (Binary files differ) Modified: branches/distr-2.7/pkg/distrDoc/vignettes/ParamFamParameter.pdf =================================================================== --- branches/distr-2.7/pkg/distrDoc/vignettes/ParamFamParameter.pdf 2018-07-08 12:36:39 UTC (rev 1167) +++ branches/distr-2.7/pkg/distrDoc/vignettes/ParamFamParameter.pdf 2018-07-08 12:43:04 UTC (rev 1168) @@ -1,9 +1,101 @@ -%PDF-1.4 -%???? -5 0 obj -<> -stream -x??R?N?0??+??& -???#pa'????B+?|&MR?T?B>???????? A??a?ku????Ct?}V?d???Y?r?9"??0m?J??q??????r???-C???a?k8Kc +?i.?P?JfHK??%?98 -???????.k????Q???Su?A ?`W?8h4?z-{?v2OPt??=?d1x~S???g? -???O +%PDF-1.4 +%???? +5 0 obj +<> +stream +x??R?N?0??+??& +???#pa'????B+?|&MR?T?B>???????? A??a?ku????Ct?}V?d???Y?r?9"??0m?J??q??????r???-C???a?k8Kc +?i.?P?JfHK??%?98 +???????.k????Q???Su?A ?`W?8h4?z-{?v2OPt??=?d1x~S???g? +???Oa>??E$??A?!z?Q?p??i???{?k??eJ???!??F?/?zK#?q?E??;??` ?_2@?"??7???A?U??E]?U????3:/?\ua-????%???y5k???Pt?6?????????y??? \g??????&? +?[??A/Y8?? +?????N????? +h2?C?v*6???V??*??V?"???7?-??endstream +endobj +6 0 obj +404 +endobj +4 0 obj +<> +/Contents 5 0 R +>> +endobj +3 0 obj +<< /Type /Pages /Kids [ +4 0 R +] /Count 1 +>> +endobj +1 0 obj +<> +endobj +7 0 obj +<>endobj +10 0 obj +<> +endobj +11 0 obj +<> +endobj +9 0 obj +<> +endobj +8 0 obj +<> +endobj +12 0 obj +<>stream + + + + + +UnknownApplication + +Untitled + + + + + +endstream +endobj +2 0 obj +<>endobj +xref +0 13 +0000000000 65535 f +0000000718 00000 n +0000002388 00000 n +0000000659 00000 n +0000000508 00000 n +0000000015 00000 n +0000000489 00000 n +0000000783 00000 n +0000000955 00000 n +0000000893 00000 n +0000000824 00000 n +0000000854 00000 n +0000001024 00000 n +trailer +<< /Size 13 /Root 1 0 R /Info 2 0 R +/ID [] +>> +startxref +2511 +%%EOF Modified: branches/distr-2.7/pkg/distrDoc/vignettes/ProbFamily.pdf =================================================================== (Binary files differ) Modified: branches/distr-2.7/pkg/distrDoc/vignettes/RiskType.pdf =================================================================== (Binary files differ) Modified: branches/distr-2.7/pkg/distrDoc/vignettes/Symmetry.pdf =================================================================== (Binary files differ) Modified: branches/distr-2.7/pkg/distrDoc/vignettes/dataclass.pdf =================================================================== (Binary files differ) Modified: branches/distr-2.7/pkg/distrDoc/vignettes/distr.Rnw =================================================================== --- branches/distr-2.7/pkg/distrDoc/vignettes/distr.Rnw 2018-07-08 12:36:39 UTC (rev 1167) +++ branches/distr-2.7/pkg/distrDoc/vignettes/distr.Rnw 2018-07-08 12:43:04 UTC (rev 1168) @@ -4,6 +4,7 @@ %\VignetteKeyword{simulation} %\VignetteKeyword{estimation} %\VignettePackage{distr} +%\VignetteEngine{knitr::knitr} % \documentclass[11pt]{article} % @@ -57,7 +58,7 @@ \usepackage{amssymb} \usepackage{url} \usepackage[% -baseurl={http://www.bioconductor.org},% +baseurl={https://www.bioconductor.org},% pdftitle={S4 Classes for Distributions---a manual for packages distr, distrSim, distrTEst, distrEx, distrMod, and distrTeach},% pdfauthor={Peter Ruckdeschel, Matthias Kohl, Thomas Stabla, Florian Camphausen},% @@ -71,19 +72,24 @@ \RequirePackage{listings} %\usepackage{Sweave} no longer needed % ------------------------------------------------------------------------------- -\SweaveOpts{keep.source=TRUE} -% ------------------------------------------------------------------------------- \definecolor{distrCol}{rgb}{0.0,0.4,0.4} -<>= -require(SweaveListingUtils) -SweaveListingPreparations() -setToBeDefinedPkgs(pkgs = c("distr","distrEx","distrTEst","distrSim", - "distrDoc","distrTeach","distrMod","RandVar"), - keywordstyles = "\\bf\\color{distrCol}") -@ +%% +%% ------------------------------------------------------------------------------ +%% before version 2.7, we used package SweaveListingUtils for syntax highlighting +%% from version 2.7 on, we switch to knitR +%% ------------------------------------------------------------------------------ +%% +%%#(ll)SweaveListingsPreparations, results="asis", echo=FALSE(ggeq) +%%#require(SweaveListingUtils) +%%#SweaveListingPreparations() +%%#setToBeDefinedPkgs(pkgs = c("distr","distrEx","distrTEst","distrSim", +%%# "distrDoc","distrTeach","distrMod","RandVar"), +%%# keywordstyles = "\\bf\\color{distrCol}") +%%#(at) +%% +%% ------------------------------------------------------------------------------ % % ------------------------------------------------------------------------------- -\renewcommand{\pkgversion}{{\tt 2.7}} \newcommand{\pkgExversion}{{\tt 2.7}} \newcommand{\Reals}{\mathbb{R}} \newcommand{\R}{\mathbb{R}} @@ -100,18 +106,52 @@ % ------------------------------------------------------------------------------- \begin{document} % ------------------------------------------------------------------------------- -\title{{\tt S4} Classes for Distributions---a manual for packages \pkg{distr}, +<>= +library(knitr) +opts_chunk$set(tidy=FALSE) +@ +% ------------------------------------------------------------------------------- +\lstdefinelanguage{Rd}[common]{TeX}% +{moretexcs={acronym,alias,arguments,author,bold,cite,% + code,command,concept,cr,deqn,describe,% + description,details,dfn,doctype,dots,% + dontrun,dontshow,donttest,dQuote,% + email,emph,enc,encoding,enumerate,env,eqn,% + examples,file,format,if,ifelse,item,itemize,kbd,keyword,% + ldots,link,linkS4class,method,name,note,% + option,out,pkg,preformatted,R,Rdopts,Rdversion,% + references,S3method,S4method,Sexpr,samp,section,% + seealso,source,sp,special,sQuote,strong,% + subsection,synopsis,tab,tabular,testonly,% + title,url,usage,value,var,verb}, + sensitive=true,% + morecomment=[l]\%% 2008/9 Peter Ruckdeschel +}[keywords,comments]%% +\lstdefinestyle{Rdstyle}{fancyvrb=TRUE,language=Rd, keywordstyle={\bf},% + basicstyle={\color{black}\footnotesize},% + commentstyle={\ttfamily\itshape},% + alsolanguage=R}% +\global\def\Rdlstset{\lstset{style=Rdstyle}}% +% ------------------------------------------------------------------------------- +\lstset{language=R,basicstyle={\color{Rcolor}\footnotesize},keywordstyle={\bf}} +\let\code\lstinline +\def\Code#1{{\tt\color{Rcolor} #1}} +\def\file#1{{\tt #1}} +\def\pkg#1{{\tt"#1"}} +\newcommand{\pkgversion}{{\tt 2.7}} +% ------------------------------------------------------------------------------- +\title{{\tt S4} Classes for Distributions---a manual for packages \pkg{distr}, \pkg{distrEx}, \pkg{distrEllipse}, \pkg{distrMod}, \pkg{distrSim}, \pkg{distrTEst}, \pkg{distrTeach}, version \pkgversion} %,version \pkgExversion} \author{\small Peter Ruckdeschel\thanks{Carl von Ossietzky Universit\"at Oldenburg} \\[-.5ex] -\small Matthias Kohl\thanks{FH Furtwangen} +\small Matthias Kohl\thanks{Hochschule Furtwangen} \\[-.5ex] \small Thomas Stabla\thanks{Graf-M\"unster-Gymnasium, Bayreuth} \\[-.5ex] -\small Florian Camphausen\thanks{West-LB, London} +\small Florian Camphausen\thanks{European Central Bank, Frankfurt} \smallskip\\ \small Institute for Mathematics\\[-.5ex] \small School of Mathematics and Science\\[-.5ex] @@ -227,8 +267,9 @@ function $f\colon \Reals^2 \to \Reals$ which is already realized as a function in {\sf R}.\\ This is possible with package \pkg{distr}. As an example, try -<>= -## preparation: set option withSweave to true + +<>= +## preparation: set option withSweave to TRUE require(distrTEst) require(distrEx) require(distrTeach) @@ -236,7 +277,8 @@ distroptions(withSweave = TRUE) options("newDevice" = TRUE) @ -<>= + +<>= require(distr) N <- Norm(mean = 2, sd = 1.3) P <- Pois(lambda = 1.2) @@ -245,18 +287,27 @@ plot(Z) p(Z)(0.4) q(Z)(0.3) +## in RStudio or Jupyter IRKernel, use q.l(.)(.) instead of q(.)(.) Zs <- r(Z)(50) Zs @ \par \begin{small} -Due to a non-conformal implementation of function \code{q} in \texttt{RStudio}, -our approach to overload function \code{q} by method dispatch does not work -from an \texttt{RStudio} console (it does work, though within a function -environment). To overcome this, from version 2.6 on, we have aliases -\code{p.r} and \code{q.l} for functions \code{p} and \code{q}, alluding to -the right (resp. left) continous form of the cdf and the quantile function. -these two aliases (in particular \code{q.l}) do work in \texttt{RStudio}. +In the environments of \texttt{RStudio}, see \url{https://www.rstudio.com/} and +\texttt{Jupyter IRKernel}, see \url{https://github.com/IRkernel/IRkernel}, +calls to \code{q} are caught away from standard {\sf R} evaluation and are treated +in a non-standard way. This non-standard evaluation in particular throws +errors at calls to our accessor methods \code{q} to slot \code{q} of the +respective distribution object. For \texttt{RStudio}, this holds for calls from the +console (i.e., in the \code{.GlobalEnv} environment) only, while calls +to our accessor \code{q} in different environment are not affected. This +is not true in \texttt{IRKernel}, where all calls to our accessor \code{q} are +affected. To amend this, from version 2.6 on, we provide function \code{q.l} +(for left-continuous quantile function) as alias to our accessors \code{q}, so +that all our package functionality also becomes available in \texttt{RStudio} +and \texttt{IRKernel}. The same holds, albeit with less consequences in +\texttt{RStudio} and \texttt{IRKernel} for accessor \code{p}: Here we have an +alias \code{p.r} (for the right-continuous cdf) for it.\\ \end{small} \par \begin{small} @@ -386,9 +437,9 @@ % ------------------------------------------------------------------------------- \subsubsection{Subclasses} % ------------------------------------------------------------------------------- -To begin with, we have considered univariate distributions giving the +To begin with, we consider univariate distributions giving {\tt S4}-class \code{UnivariateDistribution}, and as typical subclasses, we -have introduced classes for absolutely continuous and discrete distributions +introduce classes for absolutely continuous and discrete distributions ---\code{AbscontDistribution} and \code{DiscreteDistribution}.\\ The former, from version 1.9 on, has a slot \code{gaps} of class @@ -443,20 +494,20 @@ the corresponding help. E.g., to produce a discrete distribution with support $(1,5,7,21)$ with corresponding probabilities $(0.1,0.1,0.6,0.2)$ we may write -<>= +<>= D <- DiscreteDistribution(supp = c(1,5,7,21), prob = c(0.1,0.1,0.6,0.2)) D plot(D) @ -\newline +%\newline and to generate an absolutely continuos distribution with density proportional to $e^{-|x|^3}$, we write -<>= +<>= AC <- AbscontDistribution(d = function(x) exp(-abs(x)^3), withStand = TRUE) AC plot(AC) @ -\newline +%\newline As subclasses of these absolutely continuous and discrete classes, we have implemented all parametric families which already exist in the \pkg{stats} package of {\sf R} in form of @@ -1142,24 +1193,24 @@ Having implemented a class for Lebesgue decomposed distributions, we have been able to realize further binary operators, in particular we have exact analytical constructions for multiplication, division, exponentiation: -<>= +<>= A1 <- Norm(); A2 <- Unif() A1A2 <- A1*A2 plot(A1A2) @ -<>= +<>= A12 <- 1/(A2 + .3) plot(A12) @ -<>= +<>= B <- Binom(5,.2)+1 A1B <- A1^B plot(A1B, xlim=c(-3,3)) @ -<>= +<>= plot(1.2^A1) @ -<>= +<>= plot(B^A1) @ % @@ -1170,23 +1221,23 @@ the last three could not be realized in a completely satisfactory manour, as Lebesgue decomposed distributions had not been available before. Now these illustrations have moved into the package itself: -<>= +<>= H <- Huberize(Norm(),lower=-1,upper=2) plot(H) @ -<>= +<>= T <- Truncate(Norm(),lower=-1,upper=2) plot(T) @ -<>= +<>= M1 <- Maximum(Unif(0,1), Minimum(Unif(0,1), Unif(0,1))) plot(M1) @ -<>= +<>= M2 <- Minimum(Exp(4),4) plot(M2) @ -<>= +<>= M3 <- Minimum(Norm(2,2), Pois(3)) plot(M3) @ @@ -1271,7 +1322,7 @@ Note that in the result, slots \code{p} and \code{q} are not replaced but rather taken unchanged from the argument: -<>= +<>= par(mfrow=c(2,3)) plot(makeAbscontDistribution(Nbinom(5,.5)),mfColRow=FALSE) plot(makeAbscontDistribution(HN),mfColRow=FALSE) @@ -1323,10 +1374,10 @@ \paragraph{\code{xlim} argument:} More importantly, you may also override the automatically chosen $x$-region by passing an \code{xlim} argument: -<>= +<>= plot(Cauchy()) @ -<>= +<>= plot(Cauchy(),xlim=c(-4,4)) @ From version 2.1, the automatic choice of the x-range of \code{plot} @@ -1383,7 +1434,7 @@ \begin{figure}[p] \begin{center} -<>= +<>= plot(Binom(size = 4, prob = 0.3)) @ \caption{\label{plotexPic1}{Standard plot for discrete distributions @@ -1397,7 +1448,7 @@ gives Figure~\ref{plotexPic2}. \begin{figure}[p] \begin{center} -<>= +<>= plot(Binom(size = 4, prob = 0.3), do.points = FALSE, verticals = FALSE) @ \caption{\label{plotexPic2}{Plot for discrete distributions without @@ -1414,7 +1465,7 @@ \begin{figure}[p] \begin{center} -<>= +<>= plot(Binom(size = 4, prob = 0.3), main = TRUE, inner = FALSE, cex.main = 1.6, tmar = 6) @ @@ -1431,7 +1482,7 @@ \begin{figure}[p] \begin{center} -<>= +<>= plot(Binom(size = 4, prob = 0.3), cex.points = 1.2, pch = 20, lwd = 2) @ \caption{\label{plotexPic4}{Plot for discrete distributions using panel @@ -1450,7 +1501,7 @@ \begin{figure}[p] \begin{center} -<>= +<>= B <- Binom(size = 4, prob = 0.3) plot(B, col="red", col.points = "green", main = TRUE, col.main="blue", col.sub = "orange", sub = TRUE, cex.sub = 0.6, col.inner = "brown") @@ -1468,7 +1519,7 @@ \begin{figure}[p] \begin{center} -<>= +<>= plot(Nbinom(size = 4,prob = 0.3), cex.points = 1.2, pch.u = 20, pch.a = 10) @ \caption{\label{plotexPic6}{Plot for discrete distributions with different @@ -1483,7 +1534,7 @@ \begin{figure}[p] \begin{center} -<>= +<>= plot(Chisq(), log = "xy", ngrid = 100) @ \caption{\label{plotexPic7}{Plot for absolutely continuous distributions @@ -1498,7 +1549,7 @@ Figure~\ref{plotexPic8}. \begin{figure}[p] \begin{center} -<>= +<>= plot(Norm(), lwd=3, col = "red", ngrid = 200, lty = 3, las = 2) @ \caption{\label{plotexPic8}{Plot for absolutely continuous distributions @@ -1514,7 +1565,7 @@ \begin{figure}[p] \begin{center} -<>= +<>= plot(Norm(), panel.first = grid(), main = "my Distribution: %A", inner = list(expression(paste(lambda, "-density of %C(%P)")), "CDF", "Pseudo-inverse with param's %N"), @@ -1535,7 +1586,7 @@ \begin{figure}[p] \begin{center} -<>= +<>= Ch <- Chisq(); setgaps(Ch, exactq = 3) plot(Ch, cex = 1.2, pch.u = 20, pch.a = 10, col.points = "green", col.vert = "red") @@ -1552,7 +1603,7 @@ \begin{figure}[p] \begin{center} -<>= +<>= layout(matrix(c(1,3,2,3), nrow=2)) plot(N, mfColRow = FALSE) @ @@ -1572,7 +1623,7 @@ \begin{figure}[p] \begin{center} -<>= +<>= layout(matrix(c(rep(1,6),2,2,3,3,4,4,5,5,5,6,6,6), nrow=3, byrow=TRUE)) plot(HN, mfColRow = FALSE, @@ -1753,9 +1804,9 @@ \code{Nbinom}, \code{Norm}, %\code{Pareto}, -> moved to RobExtremes \code{Pois}, \code{Td}, \code{Unif}. % \code{Weibull} -> moved to RobExtremes \paragraph{examples} $ \mbox{ }$\newline -%<>= +%(ll)expectationPrep, eval = TRUE, echo=FALSE(ggeq) %SweaveListingOptions("inSweave"=TRUE) -%@ +%(at) <>= D4 <- LMCondDistribution(theta = 1) D4 # corresponds to Norm(cond, 1) @@ -1806,9 +1857,13 @@ bounds as ${\rm median} \pm s_f \,{\rm IQR}$ where $s_f$ is a scaling factor to be passed on as argument \code{IQR.fac} which defaults to global option \code{IQR.fac}. -%<>= -%SweaveListingOptions("inSweave"=TRUE) -%@ +% +%% no longer needed in knitr: +%% +%%(ll)expectationPrep, eval = TRUE, echo = FALSE(ggeg) +%%SweaveListingOptions("inSweave"=TRUE) +%%(at) +% <>= E(N, function(x)x^2) E(N, function(x)x^2, lowerTruncQuantile = 1e-5) @@ -2435,7 +2490,7 @@ output by setting global options with \code{distrModOptions}, see also subsection~\ref{distrModO}. As example consider the following: -<>= +<>= require(distrMod) ## some transformation mtrafo <- function(x){ @@ -2783,10 +2838,10 @@ confer\newline %\href{http://www.gnu.org/copyleft/gpl.html}% %{\tt http://www.gnu.org/copyleft/gpl.html} -\href{http://www.gnu.org/copyleft/gpl.html}% -{\footnotesize \tt http://www.gnu.org/copyleft/gpl.html}, -\href{http://en.wikipedia.org/wiki/GNU_Lesser_General_Public_License}% -{\footnotesize\tt \url{http://en.wikipedia.org/wiki/GNU_Lesser_General_Public_License}} +\href{https://www.gnu.org/copyleft/gpl.html}% +{\footnotesize \tt https://www.gnu.org/copyleft/gpl.html}, +\href{https://en.wikipedia.org/wiki/GNU_Lesser_General_Public_License}% +{\footnotesize\tt \url{https://en.wikipedia.org/wiki/GNU_Lesser_General_Public_License}} \section{Details to the implementation} \begin{itemize} @@ -2926,7 +2981,7 @@ but rather convolution of two independent identically distributed random variables. \end{small} -<>= +<>= require(distr) N <- Norm(0,1) @@ -2974,7 +3029,7 @@ compute the convolution: We know that ${\cal L}({\tt A+B})={\cal N}(5,13)$ --- if the second argument of ${\cal N}$ is the variance \end{small} -<>= [TRUNCATED] To get the complete diff run: svnlook diff /svnroot/distr -r 1168 From noreply at r-forge.r-project.org Sun Jul 8 14:52:28 2018 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Sun, 8 Jul 2018 14:52:28 +0200 (CEST) Subject: [Distr-commits] r1169 - branches Message-ID: <20180708125228.7B0C518A515@r-forge.r-project.org> Author: ruckdeschel Date: 2018-07-08 14:52:27 +0200 (Sun, 08 Jul 2018) New Revision: 1169 Added: branches/distr-2.8/ Log: created new branch 2.8 From noreply at r-forge.r-project.org Sun Jul 8 14:53:41 2018 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Sun, 8 Jul 2018 14:53:41 +0200 (CEST) Subject: [Distr-commits] r1170 - branches/distr-2.8 Message-ID: <20180708125341.A05B4185C71@r-forge.r-project.org> Author: ruckdeschel Date: 2018-07-08 14:53:40 +0200 (Sun, 08 Jul 2018) New Revision: 1170 Added: branches/distr-2.8/pkg/ Log: pkg folder From noreply at r-forge.r-project.org Sun Jul 8 14:55:19 2018 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Sun, 8 Jul 2018 14:55:19 +0200 (CEST) Subject: [Distr-commits] r1171 - branches/distr-2.7/pkg/utils Message-ID: <20180708125519.DA99C187A0B@r-forge.r-project.org> Author: ruckdeschel Date: 2018-07-08 14:55:18 +0200 (Sun, 08 Jul 2018) New Revision: 1171 Modified: branches/distr-2.7/pkg/utils/DESCRIPTIONutils.R branches/distr-2.7/pkg/utils/compactify-Vignettes.R branches/distr-2.7/pkg/utils/finde.R Log: [branches: utils]: minor changes in branch 2.7 Modified: branches/distr-2.7/pkg/utils/DESCRIPTIONutils.R =================================================================== --- branches/distr-2.7/pkg/utils/DESCRIPTIONutils.R 2018-07-08 12:53:40 UTC (rev 1170) +++ branches/distr-2.7/pkg/utils/DESCRIPTIONutils.R 2018-07-08 12:55:18 UTC (rev 1171) @@ -24,7 +24,7 @@ } ## needs: getRevNr() in getRevNr.R in utils/ e.g. -## source("C:/rtest/distr/branches/distr-2.4/pkg/utils/getRevNr.R") +## source("C:/rtest/distr/branches/distr-2.7/pkg/utils/getRevNr.R") changeDescription <- function(startDir ## folder with pkgs to be updated, ### e.g. "C:/rtest/distr/branches/distr-2.6" Modified: branches/distr-2.7/pkg/utils/compactify-Vignettes.R =================================================================== --- branches/distr-2.7/pkg/utils/compactify-Vignettes.R 2018-07-08 12:53:40 UTC (rev 1170) +++ branches/distr-2.7/pkg/utils/compactify-Vignettes.R 2018-07-08 12:55:18 UTC (rev 1171) @@ -1,8 +1,8 @@ ########## compactify all vignettes compactVignettes <- function(startDir="C:/rtest",rforgeproject="distr", - qpdf = "C:/R/qpdf-4.0.0/bin/qpdf", - gs = "C:/Program Files (x86)/Ghostscript/gs9.00/bin/gswin32", - select = "distr-2.5", invert = FALSE){ + qpdf = "C:/R/qpdf-7.0.0/bin/qpdf", + gs = "C:/Program Files (x86)/gs/gs9.22/bin/gswin32", + select = "distr-2.7", invert = FALSE){ startD <- file.path(startDir,rforgeproject) dir0 <- paste(startD,dir(startD, recursive=TRUE),sep="/") dir1 <- grep("inst/doc/.+\\.pdf",dir0,value=TRUE) Modified: branches/distr-2.7/pkg/utils/finde.R =================================================================== --- branches/distr-2.7/pkg/utils/finde.R 2018-07-08 12:53:40 UTC (rev 1170) +++ branches/distr-2.7/pkg/utils/finde.R 2018-07-08 12:55:18 UTC (rev 1171) @@ -20,6 +20,7 @@ } infind(dir) } +finde(x="q\\(", dir ="C:/rtest/distr/branches/distr-2.7/pkg/", rec=TRUE) finde(x="http\\:/", dir ="C:/rtest/distr/branches/distr-2.7/pkg/distr/", rec=TRUE) #finde(x="Wow6432Node", dir ="C:/R/devel/src/gnuwin32", rec=TRUE, ext="") finde(x="omega", dir ="C:/rtest/distr/branches/distr-2.7/pkg/distrMod/", rec=TRUE) @@ -55,5 +56,8 @@ } infind(dir) } +ersetze(x0="https://distr.r-forge.r-project.org/",x1="http://distr.r-forge.r-project.org/", dir ="C:/rtest/distr/branches/distr-2.7/pkg", rec=TRUE,ext="Rd") + ersetze(x0="href=\"distr.pdf\"",x1="href=\"http://cran.r-project.org/web/packages/distrDoc/vignettes/distr.pdf\"", dir ="C:/rtest/distr/www", rec=TRUE,ext="html") ersetze(x0="peter.ruckdeschel at uni-bayreuth.de",x1="peter.ruckdeschel at uni-oldenburg.de", dir ="C:/rtest/distr/www", rec=TRUE, ext="html") +ersetze(x0="peter.ruckdeschel at itwm.fraunhofer.de", x1="peter.ruckdeschel at uni-oldenburg.de", dir ="C:/rtest/robast/branches/robast-1.1", rec=TRUE, ext="Rd") From noreply at r-forge.r-project.org Sun Jul 8 15:50:11 2018 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Sun, 8 Jul 2018 15:50:11 +0200 (CEST) Subject: [Distr-commits] r1172 - in branches/distr-2.8/pkg: . distr distr/demo distr/inst distr/man distr/vignettes distrDoc distrDoc/inst distrDoc/man distrDoc/vignettes distrEllipse distrEllipse/inst distrEllipse/man distrEx distrEx/R distrEx/demo distrEx/inst distrEx/man distrEx/src distrMod distrMod/man distrRmetrics distrRmetrics/man distrSim distrSim/inst distrSim/man distrTEst distrTEst/inst distrTEst/man distrTeach distrTeach/R distrTeach/inst distrTeach/man startupmsg utils Message-ID: <20180708135011.28D3E189E60@r-forge.r-project.org> Author: ruckdeschel Date: 2018-07-08 15:50:09 +0200 (Sun, 08 Jul 2018) New Revision: 1172 Added: branches/distr-2.8/pkg/distr/ branches/distr-2.8/pkg/distr/DESCRIPTION branches/distr-2.8/pkg/distr/NAMESPACE branches/distr-2.8/pkg/distr/R/ branches/distr-2.8/pkg/distr/demo/ConvolutionNormalDistr.R branches/distr-2.8/pkg/distr/demo/Expectation.R branches/distr-2.8/pkg/distr/demo/StationaryRegressorDistr.R branches/distr-2.8/pkg/distr/demo/nFoldConvolution.R branches/distr-2.8/pkg/distr/demo/range.R branches/distr-2.8/pkg/distr/inst/NEWS branches/distr-2.8/pkg/distr/man/ branches/distr-2.8/pkg/distr/vignettes/newDistributions-knitr.Rnw branches/distr-2.8/pkg/distrDoc/ branches/distr-2.8/pkg/distrDoc/DESCRIPTION branches/distr-2.8/pkg/distrDoc/NAMESPACE branches/distr-2.8/pkg/distrDoc/inst/NEWS branches/distr-2.8/pkg/distrDoc/vignettes/BiasType.pdf branches/distr-2.8/pkg/distrDoc/vignettes/Confint.pdf branches/distr-2.8/pkg/distrDoc/vignettes/Estimate.pdf branches/distr-2.8/pkg/distrDoc/vignettes/EvaluationList.pdf branches/distr-2.8/pkg/distrDoc/vignettes/NormType.pdf branches/distr-2.8/pkg/distrDoc/vignettes/ParamFamParameter.pdf branches/distr-2.8/pkg/distrDoc/vignettes/ProbFamily.pdf branches/distr-2.8/pkg/distrDoc/vignettes/RiskType.pdf branches/distr-2.8/pkg/distrDoc/vignettes/Symmetry.pdf branches/distr-2.8/pkg/distrDoc/vignettes/dataclass.pdf branches/distr-2.8/pkg/distrDoc/vignettes/distr.Rnw branches/distr-2.8/pkg/distrDoc/vignettes/distribution.pdf branches/distr-2.8/pkg/distrDoc/vignettes/evaluation.pdf branches/distr-2.8/pkg/distrDoc/vignettes/parameter.pdf branches/distr-2.8/pkg/distrDoc/vignettes/rspace.pdf branches/distr-2.8/pkg/distrEllipse/ branches/distr-2.8/pkg/distrEllipse/inst/NEWS branches/distr-2.8/pkg/distrEx/ branches/distr-2.8/pkg/distrEx/R/AsymTotalVarDist.R branches/distr-2.8/pkg/distrEx/R/ClippedMoments.R branches/distr-2.8/pkg/distrEx/R/ContaminationSize.R branches/distr-2.8/pkg/distrEx/R/ConvexContamination.R branches/distr-2.8/pkg/distrEx/R/Expectation.R branches/distr-2.8/pkg/distrEx/R/Functionals.R branches/distr-2.8/pkg/distrEx/R/KolmogorovDist.R branches/distr-2.8/pkg/distrEx/R/Kurtosis.R branches/distr-2.8/pkg/distrEx/R/LMCondDistribution.R branches/distr-2.8/pkg/distrEx/R/OAsymTotalVarDist.R branches/distr-2.8/pkg/distrEx/R/PrognCondDistribution.R branches/distr-2.8/pkg/distrEx/R/Skewness.R branches/distr-2.8/pkg/distrEx/R/distrExIntegrate.R branches/distr-2.8/pkg/distrEx/R/distrExOptions.R branches/distr-2.8/pkg/distrEx/R/sysdata.rda branches/distr-2.8/pkg/distrEx/demo/Prognose.R branches/distr-2.8/pkg/distrEx/inst/NEWS branches/distr-2.8/pkg/distrEx/man/0distrEx-package.Rd branches/distr-2.8/pkg/distrEx/man/AsymTotalVarDist.Rd branches/distr-2.8/pkg/distrEx/man/DiscreteMVDistribution-class.Rd branches/distr-2.8/pkg/distrEx/man/LMCondDistribution.Rd branches/distr-2.8/pkg/distrEx/man/OAsymTotalVarDist.Rd branches/distr-2.8/pkg/distrEx/man/internals.Rd branches/distr-2.8/pkg/distrEx/src/GLaw.c branches/distr-2.8/pkg/distrMod/ branches/distr-2.8/pkg/distrRmetrics/ branches/distr-2.8/pkg/distrSim/ branches/distr-2.8/pkg/distrSim/inst/NEWS branches/distr-2.8/pkg/distrTEst/ branches/distr-2.8/pkg/distrTEst/inst/NEWS branches/distr-2.8/pkg/distrTeach/ branches/distr-2.8/pkg/distrTeach/R/illustLLN.R branches/distr-2.8/pkg/distrTeach/inst/CITATION branches/distr-2.8/pkg/distrTeach/inst/NEWS branches/distr-2.8/pkg/distrTeach/man/0distrTeach-package.Rd branches/distr-2.8/pkg/distrTeach/man/IllustCLT.Rd branches/distr-2.8/pkg/startupmsg/ branches/distr-2.8/pkg/utils/ branches/distr-2.8/pkg/utils/DESCRIPTIONutils.R branches/distr-2.8/pkg/utils/compactify-Vignettes.R branches/distr-2.8/pkg/utils/finde.R Removed: branches/distr-2.8/pkg/distr/DESCRIPTION branches/distr-2.8/pkg/distr/NAMESPACE branches/distr-2.8/pkg/distr/R/ branches/distr-2.8/pkg/distr/demo/ConvolutionNormalDistr.R branches/distr-2.8/pkg/distr/demo/Expectation.R branches/distr-2.8/pkg/distr/demo/StationaryRegressorDistr.R branches/distr-2.8/pkg/distr/demo/nFoldConvolution.R branches/distr-2.8/pkg/distr/demo/range.R branches/distr-2.8/pkg/distr/inst/NEWS branches/distr-2.8/pkg/distr/man/ branches/distr-2.8/pkg/distr/vignettes/newDistributions.Rnw branches/distr-2.8/pkg/distrDoc/DESCRIPTION branches/distr-2.8/pkg/distrDoc/NAMESPACE branches/distr-2.8/pkg/distrDoc/inst/NEWS branches/distr-2.8/pkg/distrDoc/vignettes/BiasType.pdf branches/distr-2.8/pkg/distrDoc/vignettes/Confint.pdf branches/distr-2.8/pkg/distrDoc/vignettes/Estimate.pdf branches/distr-2.8/pkg/distrDoc/vignettes/EvaluationList.pdf branches/distr-2.8/pkg/distrDoc/vignettes/NormType.pdf branches/distr-2.8/pkg/distrDoc/vignettes/ParamFamParameter.pdf branches/distr-2.8/pkg/distrDoc/vignettes/ProbFamily.pdf branches/distr-2.8/pkg/distrDoc/vignettes/RiskType.pdf branches/distr-2.8/pkg/distrDoc/vignettes/Symmetry.pdf branches/distr-2.8/pkg/distrDoc/vignettes/dataclass.pdf branches/distr-2.8/pkg/distrDoc/vignettes/distr.Rnw branches/distr-2.8/pkg/distrDoc/vignettes/distribution.pdf branches/distr-2.8/pkg/distrDoc/vignettes/evaluation.pdf branches/distr-2.8/pkg/distrDoc/vignettes/parameter.pdf branches/distr-2.8/pkg/distrDoc/vignettes/rspace.pdf branches/distr-2.8/pkg/distrEllipse/inst/NEWS branches/distr-2.8/pkg/distrEx/R/AsymTotalVarDist.R branches/distr-2.8/pkg/distrEx/R/ClippedMoments.R branches/distr-2.8/pkg/distrEx/R/ContaminationSize.R branches/distr-2.8/pkg/distrEx/R/ConvexContamination.R branches/distr-2.8/pkg/distrEx/R/Expectation.R branches/distr-2.8/pkg/distrEx/R/Functionals.R branches/distr-2.8/pkg/distrEx/R/KolmogorovDist.R branches/distr-2.8/pkg/distrEx/R/Kurtosis.R branches/distr-2.8/pkg/distrEx/R/LMCondDistribution.R branches/distr-2.8/pkg/distrEx/R/OAsymTotalVarDist.R branches/distr-2.8/pkg/distrEx/R/PrognCondDistribution.R branches/distr-2.8/pkg/distrEx/R/Skewness.R branches/distr-2.8/pkg/distrEx/R/distrExIntegrate.R branches/distr-2.8/pkg/distrEx/R/distrExOptions.R branches/distr-2.8/pkg/distrEx/R/sysdata.rda branches/distr-2.8/pkg/distrEx/demo/Prognose.R branches/distr-2.8/pkg/distrEx/inst/NEWS branches/distr-2.8/pkg/distrEx/man/0distrEx-package.Rd branches/distr-2.8/pkg/distrEx/man/AsymTotalVarDist.Rd branches/distr-2.8/pkg/distrEx/man/DiscreteMVDistribution-class.Rd branches/distr-2.8/pkg/distrEx/man/LMCondDistribution.Rd branches/distr-2.8/pkg/distrEx/man/OAsymTotalVarDist.Rd branches/distr-2.8/pkg/distrEx/man/internals.Rd branches/distr-2.8/pkg/distrEx/src/GLaw.c branches/distr-2.8/pkg/distrSim/inst/NEWS branches/distr-2.8/pkg/distrTEst/inst/NEWS branches/distr-2.8/pkg/distrTeach/R/illustLLN.R branches/distr-2.8/pkg/distrTeach/inst/CITATION branches/distr-2.8/pkg/distrTeach/inst/NEWS branches/distr-2.8/pkg/distrTeach/man/0distrTeach-package.Rd branches/distr-2.8/pkg/distrTeach/man/IllustCLT.Rd branches/distr-2.8/pkg/utils/DESCRIPTIONutils.R branches/distr-2.8/pkg/utils/compactify-Vignettes.R branches/distr-2.8/pkg/utils/finde.R Modified: branches/distr-2.8/pkg/distr/man/0distr-package.Rd branches/distr-2.8/pkg/distrDoc/man/0distrDoc-package.Rd branches/distr-2.8/pkg/distrEllipse/DESCRIPTION branches/distr-2.8/pkg/distrEllipse/man/0distrEllipse-package.Rd branches/distr-2.8/pkg/distrEx/DESCRIPTION branches/distr-2.8/pkg/distrMod/DESCRIPTION branches/distr-2.8/pkg/distrMod/man/0distrMod-package.Rd branches/distr-2.8/pkg/distrRmetrics/DESCRIPTION branches/distr-2.8/pkg/distrRmetrics/man/0distrRmetrics-package.Rd branches/distr-2.8/pkg/distrSim/DESCRIPTION branches/distr-2.8/pkg/distrSim/man/0distrSim-package.Rd branches/distr-2.8/pkg/distrTEst/DESCRIPTION branches/distr-2.8/pkg/distrTEst/man/0distrTEst-package.Rd branches/distr-2.8/pkg/distrTeach/DESCRIPTION branches/distr-2.8/pkg/startupmsg/DESCRIPTION branches/distr-2.8/pkg/utils/DESCRIPTIONutilsExamples.R Log: created & filled branch 2.8 Deleted: branches/distr-2.8/pkg/distr/DESCRIPTION =================================================================== --- branches/distr-2.7/pkg/distr/DESCRIPTION 2018-04-13 16:25:40 UTC (rev 1142) +++ branches/distr-2.8/pkg/distr/DESCRIPTION 2018-07-08 13:50:09 UTC (rev 1172) @@ -1,22 +0,0 @@ -Package: distr -Version: 2.7 -Date: 2015-11-07 -Title: Object Oriented Implementation of Distributions -Description: S4-classes and methods for distributions. -Authors at R: c(person("Florian", "Camphausen", role="ctb", comment="contributed as student in the - initial phase --2005"), person("Matthias", "Kohl", role=c("aut", "cph")), - person("Peter", "Ruckdeschel", role=c("cre", "cph"), - email="peter.ruckdeschel at uni-oldenburg.de"), person("Thomas", "Stabla", role="ctb", - comment="contributed as student in the initial phase --2005"), person("R Core Team", - role = c("ctb", "cph"), comment="for source file ks.c/ routines 'pKS2' and - 'pKolmogorov2x'")) -Depends: R(>= 2.14.0), methods, graphics, startupmsg, sfsmisc, SweaveListingUtils -Suggests: distrEx, svUnit (>= 0.7-11) -Imports: stats, grDevices, utils, MASS -ByteCompile: yes -Encoding: latin1 -License: LGPL-3 -URL: http://distr.r-forge.r-project.org/ -LastChangedDate: {$LastChangedDate$} -LastChangedRevision: {$LastChangedRevision$} -SVNRevision: 1080 Copied: branches/distr-2.8/pkg/distr/DESCRIPTION (from rev 1146, branches/distr-2.7/pkg/distr/DESCRIPTION) =================================================================== --- branches/distr-2.8/pkg/distr/DESCRIPTION (rev 0) +++ branches/distr-2.8/pkg/distr/DESCRIPTION 2018-07-08 13:50:09 UTC (rev 1172) @@ -0,0 +1,23 @@ +Package: distr +Version: 2.8.0 +Date: 2018-07-08 +Title: Object Oriented Implementation of Distributions +Description: S4-classes and methods for distributions. +Authors at R: c(person("Florian", "Camphausen", role="ctb", comment="contributed as student in the + initial phase --2005"), person("Matthias", "Kohl", role=c("aut", "cph")), + person("Peter", "Ruckdeschel", role=c("cre", "cph"), + email="peter.ruckdeschel at uni-oldenburg.de"), person("Thomas", "Stabla", role="ctb", + comment="contributed as student in the initial phase --2005"), person("R Core Team", + role = c("ctb", "cph"), comment="for source file ks.c/ routines 'pKS2' and + 'pKolmogorov2x'")) +Depends: R(>= 2.14.0), methods, graphics, startupmsg, sfsmisc +Suggests: distrEx, svUnit (>= 0.7-11), knitr +Imports: stats, grDevices, utils, MASS +VignetteBuilder: knitr +ByteCompile: yes +Encoding: latin1 +License: LGPL-3 +URL: http://distr.r-forge.r-project.org/ +LastChangedDate: {$LastChangedDate$} +LastChangedRevision: {$LastChangedRevision$} +SVNRevision: 1171 Deleted: branches/distr-2.8/pkg/distr/NAMESPACE =================================================================== --- branches/distr-2.7/pkg/distr/NAMESPACE 2018-04-13 16:25:40 UTC (rev 1142) +++ branches/distr-2.8/pkg/distr/NAMESPACE 2018-07-08 13:50:09 UTC (rev 1172) @@ -1,104 +0,0 @@ -useDynLib(distr, .registration = TRUE, .fixes = "C_") -import("methods") -import("stats") -importFrom("grDevices", "dev.list", "dev.new", "xy.coords") -importFrom("graphics", "plot", "abline", "layout", "legend", "lines", "mtext", "par", "points", "title") -importFrom("MASS", "ginv") -importFrom("utils", "str") -importFrom("sfsmisc", "D1ss") -import("startupmsg") -import("SweaveListingUtils") - -export("Beta", "Binom", "Cauchy", "Chisq", - "Dirac","Exp", "DExp", "Fd", "Gammad", - "Geom", "Hyper", "Lnorm", "Logis", - "Nbinom", "Norm", "Pois", "RtoDPQ", - "RtoDPQ.d", "Td", "Unif", "Weibull", "Arcsine", - "distroptions", "getdistrOption", "simplifyr", - "Lattice", "DiscreteDistribution", - "EmpiricalDistribution", - "LatticeDistribution", "EuclideanSpace", "Reals", - "Naturals", "standardMethods", - "distrARITH", "distrMASK", "getLabel", "devNew") -export("AbscontDistribution") -export("DistrList", "UnivarDistrList") -export("makeAbscontDistribution") -exportClasses("rSpace", "EuclideanSpace", "Reals", - "Naturals") -exportClasses("Parameter") -exportClasses("OptionalParameter", "OptionalMatrix") -exportClasses("BetaParameter", "BinomParameter", - "CauchyParameter", "ChisqParameter", - "DiracParameter", "ExpParameter", - "FParameter", "GammaParameter", - "HyperParameter", "GeomParameter", - "LogisParameter", "LnormParameter", - "NbinomParameter", "NormParameter", - "PoisParameter", "TParameter", - "UnifParameter", "WeibullParameter", - "UniNormParameter") -exportClasses("Distribution") -exportClasses("UnivariateDistribution", "AbscontDistribution", - "DiscreteDistribution", "LatticeDistribution", - "AffLinAbscontDistribution", "AffLinDiscreteDistribution", - "AffLinLatticeDistribution", "AffLinDistribution", "Lattice", - "Beta", "Binom", "Cauchy", "Chisq", "Dirac", - "DExp", "Exp", "Fd", "Gammad", "Geom", - "Hyper", "Logis", "Lnorm", "Nbinom", "Norm", - "Pois", "Td", "Unif", "Weibull", "Arcsine", - "ExpOrGammaOrChisq") -exportClasses("UnivDistrListOrDistribution") -exportClasses("CompoundDistribution") -exportClasses("DistrList", - "UnivarDistrList") -exportClasses("OptionalNumeric", "PosSemDefSymmMatrix", - "PosDefSymmMatrix", - "Symmetry", "DistributionSymmetry", - "NoSymmetry", "EllipticalSymmetry", "SphericalSymmetry", - "DistrSymmList") -exportMethods("Max", "Max<-", "Min", "Min<-", "d", "df", - "df<-", "df1", "df1<-", "df2", - "df2<-", "dimension", "dimension<-", "name", - "name<-", "img", "k", "k<-", - "lambda", "lambda<-", "liesIn", "location", - "location<-", "m", "m<-", "mean", - "mean<-", "meanlog", "meanlog<-", "n", - "n<-", "ncp", "ncp<-", "p", "param", - "prob", "prob<-", "q", "r", "rate", "p.l", "q.r", - "rate<-", "scale", "scale<-", "sd", "sd<-", - "sdlog", "sdlog<-", "shape", "shape<-", - "shape1", "shape1<-", "shape2", "shape2<-", - "size", "size<-", "support", "initialize", - "print", "plot", "+", "-", "/", "*", "coerce", - "Math", "log", "log10", "gamma", "lgamma", "digamma", - "dim", "show", "convpow", "pivot", "sign", - "lattice", "width", "Length", "pivot<-", - "width<-", "Length<-", "liesInSupport", - "isOldVersion", "conv2NewVersion", "gaps", - "gaps<-", "setgaps", "getLow", "getUp") -exportClasses("UnivarMixingDistribution", - "UnivarLebDecDistribution", - "AffLinUnivarLebDecDistribution", - "AcDcLcDistribution") -exportMethods("mixCoeff", "mixCoeff<-", "mixDistr", "mixDistr<-", - "discretePart", "discretePart<-", "acPart", "acPart<-", - "discreteWeight", "discreteWeight<-", "acWeight", "acWeight<-", - "p.discrete", "d.discrete", "q.discrete", "r.discrete", - "p.ac", "d.ac", "q.ac", "r.ac", "p.r", "q.l") -exportMethods("decomposePM", "simplifyD", "showobj") -exportMethods("Truncate","Minimum","Maximum","Huberize") -exportMethods("solve", "sqrt") -exportMethods("type", "SymmCenter", "Symmetry", ".logExact", ".lowerExact") -export("UnivarMixingDistribution", "UnivarLebDecDistribution") -export("RtoDPQ.LC", "flat.LCD", "flat.mix") -exportMethods("abs","exp","^") -exportMethods("NumbOfSummandsDistr","SummandsDistr") -export("CompoundDistribution") -export("PosDefSymmMatrix","PosSemDefSymmMatrix") -export("NoSymmetry", "EllipticalSymmetry", "SphericalSymmetry", - "DistrSymmList") -export("qqbounds","igamma") -exportMethods("qqplot") -export(".isEqual",".isEqual01", ".inArgs", ".fillList", - ".presubs", ".makeLenAndOrder", ".DistrCollapse") -export("samplesize", "distribution", "samplesize<-") Copied: branches/distr-2.8/pkg/distr/NAMESPACE (from rev 1146, branches/distr-2.7/pkg/distr/NAMESPACE) =================================================================== --- branches/distr-2.8/pkg/distr/NAMESPACE (rev 0) +++ branches/distr-2.8/pkg/distr/NAMESPACE 2018-07-08 13:50:09 UTC (rev 1172) @@ -0,0 +1,103 @@ +useDynLib(distr, .registration = TRUE, .fixes = "C_") +import("methods") +import("stats") +importFrom("grDevices", "dev.list", "dev.new", "xy.coords") +importFrom("graphics", "plot", "abline", "layout", "legend", "lines", "mtext", "par", "points", "title") +importFrom("MASS", "ginv") +importFrom("utils", "str") +importFrom("sfsmisc", "D1ss") +import("startupmsg") + +export("Beta", "Binom", "Cauchy", "Chisq", + "Dirac","Exp", "DExp", "Fd", "Gammad", + "Geom", "Hyper", "Lnorm", "Logis", + "Nbinom", "Norm", "Pois", "RtoDPQ", + "RtoDPQ.d", "Td", "Unif", "Weibull", "Arcsine", + "distroptions", "getdistrOption", "simplifyr", + "Lattice", "DiscreteDistribution", + "EmpiricalDistribution", + "LatticeDistribution", "EuclideanSpace", "Reals", + "Naturals", "standardMethods", + "distrARITH", "distrMASK", "getLabel", "devNew") +export("AbscontDistribution") +export("DistrList", "UnivarDistrList") +export("makeAbscontDistribution") +exportClasses("rSpace", "EuclideanSpace", "Reals", + "Naturals") +exportClasses("Parameter") +exportClasses("OptionalParameter", "OptionalMatrix") +exportClasses("BetaParameter", "BinomParameter", + "CauchyParameter", "ChisqParameter", + "DiracParameter", "ExpParameter", + "FParameter", "GammaParameter", + "HyperParameter", "GeomParameter", + "LogisParameter", "LnormParameter", + "NbinomParameter", "NormParameter", + "PoisParameter", "TParameter", + "UnifParameter", "WeibullParameter", + "UniNormParameter") +exportClasses("Distribution") +exportClasses("UnivariateDistribution", "AbscontDistribution", + "DiscreteDistribution", "LatticeDistribution", + "AffLinAbscontDistribution", "AffLinDiscreteDistribution", + "AffLinLatticeDistribution", "AffLinDistribution", "Lattice", + "Beta", "Binom", "Cauchy", "Chisq", "Dirac", + "DExp", "Exp", "Fd", "Gammad", "Geom", + "Hyper", "Logis", "Lnorm", "Nbinom", "Norm", + "Pois", "Td", "Unif", "Weibull", "Arcsine", + "ExpOrGammaOrChisq") +exportClasses("UnivDistrListOrDistribution") +exportClasses("CompoundDistribution") +exportClasses("DistrList", + "UnivarDistrList") +exportClasses("OptionalNumeric", "PosSemDefSymmMatrix", + "PosDefSymmMatrix", + "Symmetry", "DistributionSymmetry", + "NoSymmetry", "EllipticalSymmetry", "SphericalSymmetry", + "DistrSymmList") +exportMethods("Max", "Max<-", "Min", "Min<-", "d", "df", + "df<-", "df1", "df1<-", "df2", + "df2<-", "dimension", "dimension<-", "name", + "name<-", "img", "k", "k<-", + "lambda", "lambda<-", "liesIn", "location", + "location<-", "m", "m<-", "mean", + "mean<-", "meanlog", "meanlog<-", "n", + "n<-", "ncp", "ncp<-", "p", "param", + "prob", "prob<-", "q", "r", "rate", "p.l", "q.r", + "rate<-", "scale", "scale<-", "sd", "sd<-", + "sdlog", "sdlog<-", "shape", "shape<-", + "shape1", "shape1<-", "shape2", "shape2<-", + "size", "size<-", "support", "initialize", + "print", "plot", "+", "-", "/", "*", "coerce", + "Math", "log", "log10", "gamma", "lgamma", "digamma", + "dim", "show", "convpow", "pivot", "sign", + "lattice", "width", "Length", "pivot<-", + "width<-", "Length<-", "liesInSupport", + "isOldVersion", "conv2NewVersion", "gaps", + "gaps<-", "setgaps", "getLow", "getUp") +exportClasses("UnivarMixingDistribution", + "UnivarLebDecDistribution", + "AffLinUnivarLebDecDistribution", + "AcDcLcDistribution") +exportMethods("mixCoeff", "mixCoeff<-", "mixDistr", "mixDistr<-", + "discretePart", "discretePart<-", "acPart", "acPart<-", + "discreteWeight", "discreteWeight<-", "acWeight", "acWeight<-", + "p.discrete", "d.discrete", "q.discrete", "r.discrete", + "p.ac", "d.ac", "q.ac", "r.ac", "p.r", "q.l") +exportMethods("decomposePM", "simplifyD", "showobj") +exportMethods("Truncate","Minimum","Maximum","Huberize") +exportMethods("solve", "sqrt") +exportMethods("type", "SymmCenter", "Symmetry", ".logExact", ".lowerExact") +export("UnivarMixingDistribution", "UnivarLebDecDistribution") +export("RtoDPQ.LC", "flat.LCD", "flat.mix") +exportMethods("abs","exp","^") +exportMethods("NumbOfSummandsDistr","SummandsDistr") +export("CompoundDistribution") +export("PosDefSymmMatrix","PosSemDefSymmMatrix") +export("NoSymmetry", "EllipticalSymmetry", "SphericalSymmetry", + "DistrSymmList") +export("qqbounds","igamma") +exportMethods("qqplot") +export(".isEqual",".isEqual01", ".inArgs", ".fillList", + ".presubs", ".makeLenAndOrder", ".DistrCollapse") +export("samplesize", "distribution", "samplesize<-") Deleted: branches/distr-2.8/pkg/distr/demo/ConvolutionNormalDistr.R =================================================================== --- branches/distr-2.7/pkg/distr/demo/ConvolutionNormalDistr.R 2018-04-13 16:25:40 UTC (rev 1142) +++ branches/distr-2.8/pkg/distr/demo/ConvolutionNormalDistr.R 2018-07-08 13:50:09 UTC (rev 1172) @@ -1,91 +0,0 @@ -########################################################### -## Demo: Convolution of normal distributions -########################################################### -require(distr) -options("newDevice"=TRUE) - -## initialize two normal distributions -A <- Norm(mean=1, sd=2) -B <- Norm(mean=4, sd=3) - -## convolution via addition of moments -AB <- A+B - -## casting of A,B as absolutely continuous distributions -## that is, ``forget'' that A,B are normal distributions -A1 <- as(A, "AbscontDistribution") -B1 <- as(B, "AbscontDistribution") - -## for higher precision we change the global variable -## "TruncQuantile" from 1e-5 to 1e-8 -oldeps <- getdistrOption("TruncQuantile") -eps <- 1e-8 -distroptions("TruncQuantile" = eps) -## support of A1+B1 for FFT convolution is -## [q(A1)(TruncQuantile), -## q(B1)(TruncQuantile, lower.tail = FALSE)] - -## convolution via FFT -AB1 <- A1+B1 - -############################# -## plots of the results -############################# -par(mfrow=c(1,3)) -low <- q(AB)(1e-15) -upp <- q(AB)(1e-15, lower.tail = FALSE) -x <- seq(from = low, to = upp, length = 10000) - -## densities -plot(x, d(AB)(x), type = "l", lwd = 5) -lines(x , d(AB1)(x), col = "orange", lwd = 1) -title("Densities") -legend("topleft", legend=c("exact", "FFT"), - fill=c("black", "orange")) - -## cdfs -plot(x, p(AB)(x), type = "l", lwd = 5) -lines(x , p(AB1)(x), col = "orange", lwd = 1) -title("Cumulative distribution functions") -legend("topleft", legend=c("exact", "FFT"), - fill=c("black", "orange")) - -## quantile functions -x <- seq(from = eps, to = 1-eps, length = 1000) -plot(x, q(AB)(x), type = "l", lwd = 5) -lines(x , q(AB1)(x), col = "orange", lwd = 1) -title("Quantile functions") -legend(0, q(AB)(eps, lower.tail = FALSE), - legend = c("exact", "FFT"), - fill = c("black", "orange")) - -## Since the plots of the results show no -## recognizable differencies, we also compute -## the total variation distance of the densities -## and the Kolmogorov distance of the cdfs - -## total variation distance of densities -total.var <- function(z, N1, N2){ - 0.5*abs(d(N1)(z) - d(N2)(z)) -} -dv <- integrate(f = total.var, lower = -Inf, - upper = Inf, rel.tol = 1e-8, - N1 = AB, N2 = AB1) -cat("Total variation distance of densities:\t") -print(dv) # 4.25e-07 - -### meanwhile realized in package "distrEx" -### as TotalVarDist(N1,N2) - -## Kolmogorov distance of cdfs -## the distance is evaluated on a random grid -z <- r(Unif(Min=low, Max=upp))(1e5) -dk <- max(abs(p(AB)(z)-p(AB1)(z))) -cat("Kolmogorov distance of cdfs:\t", dk, "\n") -# 2.03e-07 - -### meanwhile realized in package "distrEx" -### as KolmogorovDist(N1,N2) - -## old distroptions -distroptions("TruncQuantile" = oldeps) Copied: branches/distr-2.8/pkg/distr/demo/ConvolutionNormalDistr.R (from rev 1148, branches/distr-2.7/pkg/distr/demo/ConvolutionNormalDistr.R) =================================================================== --- branches/distr-2.8/pkg/distr/demo/ConvolutionNormalDistr.R (rev 0) +++ branches/distr-2.8/pkg/distr/demo/ConvolutionNormalDistr.R 2018-07-08 13:50:09 UTC (rev 1172) @@ -0,0 +1,91 @@ +########################################################### +## Demo: Convolution of normal distributions +########################################################### +require(distr) +options("newDevice"=TRUE) + +## initialize two normal distributions +A <- Norm(mean=1, sd=2) +B <- Norm(mean=4, sd=3) + +## convolution via addition of moments +AB <- A+B + +## casting of A,B as absolutely continuous distributions +## that is, ``forget'' that A,B are normal distributions +A1 <- as(A, "AbscontDistribution") +B1 <- as(B, "AbscontDistribution") + +## for higher precision we change the global variable +## "TruncQuantile" from 1e-5 to 1e-8 +oldeps <- getdistrOption("TruncQuantile") +eps <- 1e-8 +distroptions("TruncQuantile" = eps) +## support of A1+B1 for FFT convolution is +## [q.l(A1)(TruncQuantile), +## q.l(B1)(TruncQuantile, lower.tail = FALSE)] + +## convolution via FFT +AB1 <- A1+B1 + +############################# +## plots of the results +############################# +par(mfrow=c(1,3)) +low <- q.l(AB)(1e-15) +upp <- q.l(AB)(1e-15, lower.tail = FALSE) +x <- seq(from = low, to = upp, length = 10000) + +## densities +plot(x, d(AB)(x), type = "l", lwd = 5) +lines(x , d(AB1)(x), col = "orange", lwd = 1) +title("Densities") +legend("topleft", legend=c("exact", "FFT"), + fill=c("black", "orange")) + +## cdfs +plot(x, p(AB)(x), type = "l", lwd = 5) +lines(x , p(AB1)(x), col = "orange", lwd = 1) +title("Cumulative distribution functions") +legend("topleft", legend=c("exact", "FFT"), + fill=c("black", "orange")) + +## quantile functions +x <- seq(from = eps, to = 1-eps, length = 1000) +plot(x, q.l(AB)(x), type = "l", lwd = 5) +lines(x , q.l(AB1)(x), col = "orange", lwd = 1) +title("Quantile functions") +legend(0, q.l(AB)(eps, lower.tail = FALSE), + legend = c("exact", "FFT"), + fill = c("black", "orange")) + +## Since the plots of the results show no +## recognizable differencies, we also compute +## the total variation distance of the densities +## and the Kolmogorov distance of the cdfs + +## total variation distance of densities +total.var <- function(z, N1, N2){ + 0.5*abs(d(N1)(z) - d(N2)(z)) +} +dv <- integrate(f = total.var, lower = -Inf, + upper = Inf, rel.tol = 1e-8, + N1 = AB, N2 = AB1) +cat("Total variation distance of densities:\t") +print(dv) # 4.25e-07 + +### meanwhile realized in package "distrEx" +### as TotalVarDist(N1,N2) + +## Kolmogorov distance of cdfs +## the distance is evaluated on a random grid +z <- r(Unif(Min=low, Max=upp))(1e5) +dk <- max(abs(p(AB)(z)-p(AB1)(z))) +cat("Kolmogorov distance of cdfs:\t", dk, "\n") +# 2.03e-07 + +### meanwhile realized in package "distrEx" +### as KolmogorovDist(N1,N2) + +## old distroptions +distroptions("TruncQuantile" = oldeps) Deleted: branches/distr-2.8/pkg/distr/demo/Expectation.R =================================================================== --- branches/distr-2.7/pkg/distr/demo/Expectation.R 2018-04-13 16:25:40 UTC (rev 1142) +++ branches/distr-2.8/pkg/distr/demo/Expectation.R 2018-07-08 13:50:09 UTC (rev 1172) @@ -1,40 +0,0 @@ -require(distr) -options("newDevice"=TRUE) - -if(!isGeneric("E")) - setGeneric("E", - function(object, fun) standardGeneric("E")) - -setMethod("E", - signature(object = "AbscontDistribution", - fun = "function"), - function(object, fun){ - integrand <- function(x) fun(x) * d(object)(x) - return(integrate(f = integrand, - lower = q(object)(0), - upper = q(object)(1))$value) - }) - -setMethod("E", - signature(object = "DiscreteDistribution", - fun = "function"), - function(object, fun){ - supp = support(object) - return(sum(fun(supp) * d(object)(supp))) - }) - - - -# Example -id <- function(x) x -sq <- function(x) x^2 - -# Expectation and Variance of Binom(6,0.5) -B <- Binom(6, 0.5) -E(B, id) -E(B, sq) - E(B, id)^2 - -# Expectation and Variance of Norm(1,1) -N <- Norm(1, 1) -E(N, id) -E(N, sq) - E(N, id)^2 Copied: branches/distr-2.8/pkg/distr/demo/Expectation.R (from rev 1148, branches/distr-2.7/pkg/distr/demo/Expectation.R) =================================================================== --- branches/distr-2.8/pkg/distr/demo/Expectation.R (rev 0) +++ branches/distr-2.8/pkg/distr/demo/Expectation.R 2018-07-08 13:50:09 UTC (rev 1172) @@ -0,0 +1,40 @@ +require(distr) +options("newDevice"=TRUE) + +if(!isGeneric("E")) + setGeneric("E", + function(object, fun) standardGeneric("E")) + +setMethod("E", + signature(object = "AbscontDistribution", + fun = "function"), + function(object, fun){ + integrand <- function(x) fun(x) * d(object)(x) + return(integrate(f = integrand, + lower = q.l(object)(0), + upper = q.l(object)(1))$value) + }) + +setMethod("E", + signature(object = "DiscreteDistribution", + fun = "function"), + function(object, fun){ + supp = support(object) + return(sum(fun(supp) * d(object)(supp))) + }) + + + +# Example +id <- function(x) x +sq <- function(x) x^2 + +# Expectation and Variance of Binom(6,0.5) +B <- Binom(6, 0.5) +E(B, id) +E(B, sq) - E(B, id)^2 + +# Expectation and Variance of Norm(1,1) +N <- Norm(1, 1) +E(N, id) +E(N, sq) - E(N, id)^2 Deleted: branches/distr-2.8/pkg/distr/demo/StationaryRegressorDistr.R =================================================================== --- branches/distr-2.7/pkg/distr/demo/StationaryRegressorDistr.R 2018-04-13 16:25:40 UTC (rev 1142) +++ branches/distr-2.8/pkg/distr/demo/StationaryRegressorDistr.R 2018-07-08 13:50:09 UTC (rev 1172) @@ -1,101 +0,0 @@ -##################################################### -## Demo: Stationary Regressor Distribution of an AR(1) -## Process -##################################################### -require(distr) -options("newDevice"=TRUE) - -## Approximation of the stationary regressor -## distribution of an AR(1) process -## X_t = phi X_{t-1} + V_t -## where V_t i.i.d N(0,1) and phi\in(0,1) -## We obtain -## X_t = \sum_{j=1}^\infty phi^j V_{t-j} -## i.e., X_t \sim N(0,1/(1-phi^2)) -phi <- 0.5 - -## casting of V as absolutely continuous distributions -## that is, ``forget'' that V is a normal distribution -V <- as(Norm(), "AbscontDistribution") - -## for higher precision we change the global variable -## "TruncQuantile" from 1e-5 to 1e-8 -oldeps <- getdistrOption("TruncQuantile") -eps <- 1e-8 -distroptions("TruncQuantile" = eps) - -## Computation of the approximation -## H=\sum_{j=1}^n phi^j V_{t-j} -## of the stationary regressor distribution -## (via convolution using FFT) -H <- V -n <- 15 -## may take some time -for(i in 1:n){Vi <- phi^i*V; H <- H + Vi } - -## the stationary regressor distribution (exact) -X <- Norm(sd=sqrt(1/(1-phi^2))) - -############################# -## plots of the results -############################# -par(mfrow=c(1,3)) -low <- q(X)(1e-15) -upp <- q(X)(1e-15, lower.tail = FALSE) -x <- seq(from = low, to = upp, length = 10000) - -## densities -plot(x, d(X)(x),type = "l", lwd = 5) -lines(x , d(H)(x), col = "orange", lwd = 1) -title("Densities") -legend("topleft", legend=c("exact", "FFT"), - fill=c("black", "orange")) - -## cdfs -plot(x, p(X)(x),type = "l", lwd = 5) -lines(x , p(H)(x), col = "orange", lwd = 1) -title("Cumulative distribution functions") -legend("topleft", legend=c("exact", "FFT"), - fill=c("black", "orange")) - -## quantile functions -x <- seq(from = eps, to = 1-eps, length = 1000) -plot(x, q(X)(x),type = "l", lwd = 5) -lines(x , q(H)(x), col = "orange", lwd = 1) -title("Quantile functions") -legend( "topleft", - legend=c("exact", "FFT"), - fill=c("black", "orange")) - -## Since the plots of the results show no -## recognizable differencies, we also compute -## the total variation distance of the densities -## and the Kolmogorov distance of the cdfs - -## total variation distance of densities -total.var <- function(z, N1, N2){ - 0.5*abs(d(N1)(z) - d(N2)(z)) -} -dv <- integrate(f = total.var, lower = -Inf, - upper = Inf, rel.tol = 1e-5, - N1=X, N2=H) -cat("Total variation distance of densities:\t") -print(dv) # 8.0e-06 - -### meanwhile realized in package "distrEx" -### as TotalVarDist(N1,N2) - - -## Kolmogorov distance of cdfs -## the distance is evaluated on a random grid -z <- r(Unif(Min=low, Max=upp))(1e5) -dk <- max(abs(p(X)(z)-p(H)(z))) -cat("Kolmogorov distance of cdfs:\t", dk, "\n") -# 3.7e-05 - -### meanwhile realized in package "distrEx" -### as KolmogorovDist(N1,N2) - - -## old distroptions -distroptions("TruncQuantile" = oldeps) Copied: branches/distr-2.8/pkg/distr/demo/StationaryRegressorDistr.R (from rev 1148, branches/distr-2.7/pkg/distr/demo/StationaryRegressorDistr.R) =================================================================== --- branches/distr-2.8/pkg/distr/demo/StationaryRegressorDistr.R (rev 0) +++ branches/distr-2.8/pkg/distr/demo/StationaryRegressorDistr.R 2018-07-08 13:50:09 UTC (rev 1172) @@ -0,0 +1,101 @@ +##################################################### +## Demo: Stationary Regressor Distribution of an AR(1) +## Process +##################################################### +require(distr) +options("newDevice"=TRUE) + +## Approximation of the stationary regressor +## distribution of an AR(1) process +## X_t = phi X_{t-1} + V_t +## where V_t i.i.d N(0,1) and phi\in(0,1) +## We obtain +## X_t = \sum_{j=1}^\infty phi^j V_{t-j} +## i.e., X_t \sim N(0,1/(1-phi^2)) +phi <- 0.5 + +## casting of V as absolutely continuous distributions +## that is, ``forget'' that V is a normal distribution +V <- as(Norm(), "AbscontDistribution") + +## for higher precision we change the global variable +## "TruncQuantile" from 1e-5 to 1e-8 +oldeps <- getdistrOption("TruncQuantile") +eps <- 1e-8 +distroptions("TruncQuantile" = eps) + +## Computation of the approximation +## H=\sum_{j=1}^n phi^j V_{t-j} +## of the stationary regressor distribution +## (via convolution using FFT) +H <- V +n <- 15 +## may take some time +for(i in 1:n){Vi <- phi^i*V; H <- H + Vi } + +## the stationary regressor distribution (exact) +X <- Norm(sd=sqrt(1/(1-phi^2))) + +############################# +## plots of the results +############################# +par(mfrow=c(1,3)) +low <- q.l(X)(1e-15) +upp <- q.l(X)(1e-15, lower.tail = FALSE) +x <- seq(from = low, to = upp, length = 10000) + +## densities +plot(x, d(X)(x),type = "l", lwd = 5) +lines(x , d(H)(x), col = "orange", lwd = 1) +title("Densities") +legend("topleft", legend=c("exact", "FFT"), + fill=c("black", "orange")) + +## cdfs +plot(x, p(X)(x),type = "l", lwd = 5) +lines(x , p(H)(x), col = "orange", lwd = 1) +title("Cumulative distribution functions") +legend("topleft", legend=c("exact", "FFT"), + fill=c("black", "orange")) + +## quantile functions +x <- seq(from = eps, to = 1-eps, length = 1000) +plot(x, q.l(X)(x),type = "l", lwd = 5) +lines(x , q.l(H)(x), col = "orange", lwd = 1) +title("Quantile functions") +legend( "topleft", + legend=c("exact", "FFT"), + fill=c("black", "orange")) + +## Since the plots of the results show no +## recognizable differencies, we also compute +## the total variation distance of the densities +## and the Kolmogorov distance of the cdfs + +## total variation distance of densities +total.var <- function(z, N1, N2){ + 0.5*abs(d(N1)(z) - d(N2)(z)) +} +dv <- integrate(f = total.var, lower = -Inf, + upper = Inf, rel.tol = 1e-5, + N1=X, N2=H) +cat("Total variation distance of densities:\t") +print(dv) # 8.0e-06 + +### meanwhile realized in package "distrEx" +### as TotalVarDist(N1,N2) + + +## Kolmogorov distance of cdfs +## the distance is evaluated on a random grid +z <- r(Unif(Min=low, Max=upp))(1e5) +dk <- max(abs(p(X)(z)-p(H)(z))) +cat("Kolmogorov distance of cdfs:\t", dk, "\n") +# 3.7e-05 + +### meanwhile realized in package "distrEx" +### as KolmogorovDist(N1,N2) + + +## old distroptions +distroptions("TruncQuantile" = oldeps) Deleted: branches/distr-2.8/pkg/distr/demo/nFoldConvolution.R =================================================================== --- branches/distr-2.7/pkg/distr/demo/nFoldConvolution.R 2018-04-13 16:25:40 UTC (rev 1142) +++ branches/distr-2.8/pkg/distr/demo/nFoldConvolution.R 2018-07-08 13:50:09 UTC (rev 1172) @@ -1,166 +0,0 @@ -########################################################## -## Demo: n-fold convolution of absolutely continuous -## probability distributions -########################################################## -require(distr) -options("newDevice"=TRUE) - -### from version 1.9 of distr on available in the package -### already - -if(!isGeneric("convpow")) - setGeneric("convpow", - function(D1, ...) standardGeneric("convpow")) - -########################################################## -## Function for n-fold convolution -## -- absolute continuous distribution -- -########################################################## - -##implentation of Algorithm 3.4. of -#P. Ruckdeschel, M. Kohl (2014): General Purpose Convolution Algorithm for -# Distributions in S4 Classes by Means of FFT. J. Statist. Softw. 59(4), 1-25. - - -setMethod("convpow", - signature(D1 = "AbscontDistribution"), - function(D1, N){ - if((N<1)||(abs(floor(N)-N)>.Machine$double.eps)) - stop("N has to be a natural greater than 0") - - m <- getdistrOption("DefaultNrFFTGridPointsExponent") - - ##STEP 1 - - lower <- ifelse((q(D1)(0) > - Inf), q(D1)(0), - q(D1)(getdistrOption("TruncQuantile")) - ) - upper <- ifelse((q(D1)(1) < Inf), q(D1)(1), - q(D1)(getdistrOption("TruncQuantile"), - lower.tail = FALSE) - ) - - ##STEP 2 - - M <- 2^m - h <- (upper-lower)/M - if(h > 0.01) - warning(paste("Grid for approxfun too wide,", - "increase DefaultNrFFTGridPointsExponent")) - x <- seq(from = lower, to = upper, by = h) - p1 <- p(D1)(x) - - ##STEP 3 - - p1 <- p1[2:(M + 1)] - p1[1:M] - - ##STEP 4 - - ## computation of DFT - pn <- c(p1, numeric((N-1)*M)) - fftpn <- fft(pn) - - ##STEP 5 - - ## convolution theorem for DFTs - pn <- Re(fft(fftpn^N, inverse = TRUE)) / (N*M) - pn <- (abs(pn) >= .Machine$double.eps)*pn - i.max <- N*M-(N-2) - pn <- c(0,pn[1:i.max]) - dn <- pn / h - pn <- cumsum(pn) - - ##STEP 6(density) - - ## density - x <- seq(from = N*lower+N/2*h, - to = N*upper-N/2*h, by=h) - x <- c(x[1]-h,x[1],x+h) - dnfun1 <- approxfun(x = x, y = dn, yleft = 0, yright = 0) - - ##STEP 7(density) - - standardizer <- sum(dn) - (dn[1]+dn[i.max+1]) / 2 - dnfun2 <- function(x) dnfun1(x) / standardizer - - ##STEP 6(cdf) - - ## cdf with continuity correction h/2 - pnfun1 <- approxfun(x = x+0.5*h, y = pn, - yleft = 0, yright = pn[i.max+1]) - - ##STEP 7(cdf) - - pnfun2 <- function(x) pnfun1(x) / pn[i.max+1] - - - ## quantile with continuity correction h/2 - yleft <- ifelse(((q(D1)(0) == -Inf)| - (q(D1)(0) == -Inf)), -Inf, N*lower) - yright <- ifelse(((q(D1)(1) == Inf)| - (q(D1)(1) == Inf)), Inf, N*upper) - w0 <- options("warn") - options(warn = -1) - qnfun1 <- approxfun(x = pnfun2(x+0.5*h), y = x+0.5*h, - yleft = yleft, yright = yright) - qnfun2 <- function(x){ - ind1 <- (x == 0)*(1:length(x)) - ind2 <- (x == 1)*(1:length(x)) - y <- qnfun1(x) [TRUNCATED] To get the complete diff run: svnlook diff /svnroot/distr -r 1172 From noreply at r-forge.r-project.org Sun Jul 8 15:51:31 2018 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Sun, 8 Jul 2018 15:51:31 +0200 (CEST) Subject: [Distr-commits] r1173 - in branches/distr-2.7/pkg: . utils Message-ID: <20180708135131.F22511882EA@r-forge.r-project.org> Author: ruckdeschel Date: 2018-07-08 15:51:29 +0200 (Sun, 08 Jul 2018) New Revision: 1173 Removed: branches/distr-2.7/pkg/versuch.txt Modified: branches/distr-2.7/pkg/utils/DESCRIPTIONutils.R branches/distr-2.7/pkg/utils/DESCRIPTIONutilsExamples.R Log: updated utils in branch 2.7 Modified: branches/distr-2.7/pkg/utils/DESCRIPTIONutils.R =================================================================== --- branches/distr-2.7/pkg/utils/DESCRIPTIONutils.R 2018-07-08 13:50:09 UTC (rev 1172) +++ branches/distr-2.7/pkg/utils/DESCRIPTIONutils.R 2018-07-08 13:51:29 UTC (rev 1173) @@ -54,14 +54,16 @@ startD <- gsub("/branches/[^/]+","",startDir) if(is.null(pathRepo)) pathRepo <- gsub(".*/([^/]+)/*$","\\1", startD) svnrev <- getRevNr(startD, pathRepo, inRforge, withlogin, - PathToBash, PathToreadsvnlog.sh)[[1]] + PathToBash, PathToreadsvnlog.sh) print(svnrev) + if("SVNRevision" %in% names){ - values[which(names=="SVNRevision"),] <- svnrev + values[which(names=="SVNRevision"),] <- c(svnrev[[1]]) }else{ nr <- nrow(values) names <- c(names,"SVNRevision") - values <- rbind(values,rep(svnrev,ncol(values))) + vlsvn <- rep(c(svnrev[[1]]),ncol(values)) + values <- base::rbind(values,vlsvn) rownames(values)[nr+1] <- "SVNRevision" } } @@ -70,7 +72,7 @@ nr <- nrow(values) dat <- format(Sys.time(), format="%Y-%m-%d") names <- c(names,"Date") - values <- rbind(values,rep(dat,ncol(values))) + values <- base::rbind(values,rep(dat,ncol(values))) rownames(values)[nr+1] <- "Date" } } @@ -85,6 +87,7 @@ if(length(idx)) idx <- -idx else idx <- TRUE pkgs <- pkgs[idx] } + print(values) if (length(pkgs) && length(names) && length(values)){ pkgs <- pkgs[sapply(pkgs, function(x) file.exists(file.path("pkg",x,"DESCRIPTION")))] Modified: branches/distr-2.7/pkg/utils/DESCRIPTIONutilsExamples.R =================================================================== --- branches/distr-2.7/pkg/utils/DESCRIPTIONutilsExamples.R 2018-07-08 13:50:09 UTC (rev 1172) +++ branches/distr-2.7/pkg/utils/DESCRIPTIONutilsExamples.R 2018-07-08 13:51:29 UTC (rev 1173) @@ -98,5 +98,18 @@ Values["Version",,drop=FALSE] <- c("0.9.1", "0.7", rep("2.6",6)) changeDescription(startDir = "C:/rtest/distr/branches/distr-2.6",names=Names, pkgs=Pkgs, values=Values) + + +Pkgs <- c("startupmsg", "distr", "distrEx", "distrDoc", "distrSim", + "distrTeach", "distrMod", + "distrTEst", "distrEllipse", "distrRmetrics") +Names <- c("Version") +Values <- matrix(c("2.8"),1,length(Pkgs)) +colnames(Values) <- Pkgs +rownames(Values) <- Names +Values["Version",] <- matrix(c("0.9.1", rep("2.8.0",9)),1,10) +changeDescription(startDir = "C:/rtest/distr/branches/distr-2.8",names=Names, + pkgs=Pkgs, values=Values, verbose=TRUE) } + ############################################################################## Deleted: branches/distr-2.7/pkg/versuch.txt =================================================================== --- branches/distr-2.7/pkg/versuch.txt 2018-07-08 13:50:09 UTC (rev 1172) +++ branches/distr-2.7/pkg/versuch.txt 2018-07-08 13:51:29 UTC (rev 1173) @@ -1 +0,0 @@ -probleme beim commit \ No newline at end of file From noreply at r-forge.r-project.org Sun Jul 8 16:20:16 2018 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Sun, 8 Jul 2018 16:20:16 +0200 (CEST) Subject: [Distr-commits] r1174 - pkg/utils Message-ID: <20180708142016.D28A918A1E9@r-forge.r-project.org> Author: ruckdeschel Date: 2018-07-08 16:20:16 +0200 (Sun, 08 Jul 2018) New Revision: 1174 Modified: pkg/utils/DESCRIPTIONutils.R pkg/utils/DESCRIPTIONutilsExamples.R pkg/utils/compactify-Vignettes.R pkg/utils/finde.R Log: [utils] Update / Branch 2.7 merged back into trunk Modified: pkg/utils/DESCRIPTIONutils.R =================================================================== --- pkg/utils/DESCRIPTIONutils.R 2018-07-08 13:51:29 UTC (rev 1173) +++ pkg/utils/DESCRIPTIONutils.R 2018-07-08 14:20:16 UTC (rev 1174) @@ -24,7 +24,7 @@ } ## needs: getRevNr() in getRevNr.R in utils/ e.g. -## source("C:/rtest/distr/branches/distr-2.4/pkg/utils/getRevNr.R") +## source("C:/rtest/distr/branches/distr-2.7/pkg/utils/getRevNr.R") changeDescription <- function(startDir ## folder with pkgs to be updated, ### e.g. "C:/rtest/distr/branches/distr-2.6" @@ -54,14 +54,16 @@ startD <- gsub("/branches/[^/]+","",startDir) if(is.null(pathRepo)) pathRepo <- gsub(".*/([^/]+)/*$","\\1", startD) svnrev <- getRevNr(startD, pathRepo, inRforge, withlogin, - PathToBash, PathToreadsvnlog.sh)[[1]] + PathToBash, PathToreadsvnlog.sh) print(svnrev) + if("SVNRevision" %in% names){ - values[which(names=="SVNRevision"),] <- svnrev + values[which(names=="SVNRevision"),] <- c(svnrev[[1]]) }else{ nr <- nrow(values) names <- c(names,"SVNRevision") - values <- rbind(values,rep(svnrev,ncol(values))) + vlsvn <- rep(c(svnrev[[1]]),ncol(values)) + values <- base::rbind(values,vlsvn) rownames(values)[nr+1] <- "SVNRevision" } } @@ -70,7 +72,7 @@ nr <- nrow(values) dat <- format(Sys.time(), format="%Y-%m-%d") names <- c(names,"Date") - values <- rbind(values,rep(dat,ncol(values))) + values <- base::rbind(values,rep(dat,ncol(values))) rownames(values)[nr+1] <- "Date" } } @@ -85,6 +87,7 @@ if(length(idx)) idx <- -idx else idx <- TRUE pkgs <- pkgs[idx] } + print(values) if (length(pkgs) && length(names) && length(values)){ pkgs <- pkgs[sapply(pkgs, function(x) file.exists(file.path("pkg",x,"DESCRIPTION")))] Modified: pkg/utils/DESCRIPTIONutilsExamples.R =================================================================== --- pkg/utils/DESCRIPTIONutilsExamples.R 2018-07-08 13:51:29 UTC (rev 1173) +++ pkg/utils/DESCRIPTIONutilsExamples.R 2018-07-08 14:20:16 UTC (rev 1174) @@ -98,5 +98,18 @@ Values["Version",,drop=FALSE] <- c("0.9.1", "0.7", rep("2.6",6)) changeDescription(startDir = "C:/rtest/distr/branches/distr-2.6",names=Names, pkgs=Pkgs, values=Values) + + +Pkgs <- c("startupmsg", "distr", "distrEx", "distrDoc", "distrSim", + "distrTeach", "distrMod", + "distrTEst", "distrEllipse", "distrRmetrics") +Names <- c("Version") +Values <- matrix(c("2.8"),1,length(Pkgs)) +colnames(Values) <- Pkgs +rownames(Values) <- Names +Values["Version",] <- matrix(c("0.9.1", rep("2.8.0",9)),1,10) +changeDescription(startDir = "C:/rtest/distr/branches/distr-2.8",names=Names, + pkgs=Pkgs, values=Values, verbose=TRUE) } + ############################################################################## Modified: pkg/utils/compactify-Vignettes.R =================================================================== --- pkg/utils/compactify-Vignettes.R 2018-07-08 13:51:29 UTC (rev 1173) +++ pkg/utils/compactify-Vignettes.R 2018-07-08 14:20:16 UTC (rev 1174) @@ -1,8 +1,8 @@ ########## compactify all vignettes compactVignettes <- function(startDir="C:/rtest",rforgeproject="distr", - qpdf = "C:/R/qpdf-4.0.0/bin/qpdf", - gs = "C:/Program Files (x86)/Ghostscript/gs9.00/bin/gswin32", - select = "distr-2.5", invert = FALSE){ + qpdf = "C:/R/qpdf-7.0.0/bin/qpdf", + gs = "C:/Program Files (x86)/gs/gs9.22/bin/gswin32", + select = "distr-2.7", invert = FALSE){ startD <- file.path(startDir,rforgeproject) dir0 <- paste(startD,dir(startD, recursive=TRUE),sep="/") dir1 <- grep("inst/doc/.+\\.pdf",dir0,value=TRUE) Modified: pkg/utils/finde.R =================================================================== --- pkg/utils/finde.R 2018-07-08 13:51:29 UTC (rev 1173) +++ pkg/utils/finde.R 2018-07-08 14:20:16 UTC (rev 1174) @@ -20,18 +20,12 @@ } infind(dir) } +finde(x="q\\(", dir ="C:/rtest/distr/branches/distr-2.7/pkg/", rec=TRUE) +finde(x="http\\:/", dir ="C:/rtest/distr/branches/distr-2.7/pkg/distr/", rec=TRUE) #finde(x="Wow6432Node", dir ="C:/R/devel/src/gnuwin32", rec=TRUE, ext="") +finde(x="omega", dir ="C:/rtest/distr/branches/distr-2.7/pkg/distrMod/", rec=TRUE) #finde(x="getPos", dir ="C:/rtest/distr/branches/distr-2.4/pkg/distrMod/", rec=TRUE) -finde(x="\\.rd", dir ="C:/rtest/distr/pkg/distrEllipse/R") -finde(x="RobExtremes", dir ="C:/rtest/distr/pkg/distrMod/man") -finde(x="getFromNamespace", dir ="C:/rtest/robast/branches/robast-1.0/pkg/RobAStBase/",rec=TRUE) - -finde(x="getFiRisk", dir ="C:/rtest/robast/pkg/RobAStBase/",rec=TRUE) -finde(x="\\.LowerCaseMultivariateTV", dir ="C:/rtest/robast/branches/robast-1.0/pkg/RobAStBase/R") -finde(x="\\.checkEstClassForParamFamily", dir ="C:/rtest/distr/pkg/distrMod/R") -finde(x="\\.cexscale", dir ="C:/rtest/robast/branches/robast-1.1/pkg/RobAStBase", rec=TRUE) -finde(x="updatePackageHelp", dir ="C:/rtest/distr/pkg/utils", rec=TRUE) finde(x="roptest\\(", dir ="C:/rtest/robast/branches/robast-0.9/pkg/ROptEst/", rec=TRUE) finde(x="getSlots\\(", dir ="C:/rtest/distr/branches/distr-2.4/pkg/distrMod/", rec=TRUE) finde(x="\"loc\"", dir ="C:/rtest/distr/branches/distr-2.4/pkg/distrEx/", rec=TRUE) @@ -62,5 +56,8 @@ } infind(dir) } +ersetze(x0="https://distr.r-forge.r-project.org/",x1="http://distr.r-forge.r-project.org/", dir ="C:/rtest/distr/branches/distr-2.7/pkg", rec=TRUE,ext="Rd") + ersetze(x0="href=\"distr.pdf\"",x1="href=\"http://cran.r-project.org/web/packages/distrDoc/vignettes/distr.pdf\"", dir ="C:/rtest/distr/www", rec=TRUE,ext="html") ersetze(x0="peter.ruckdeschel at uni-bayreuth.de",x1="peter.ruckdeschel at uni-oldenburg.de", dir ="C:/rtest/distr/www", rec=TRUE, ext="html") +ersetze(x0="peter.ruckdeschel at itwm.fraunhofer.de", x1="peter.ruckdeschel at uni-oldenburg.de", dir ="C:/rtest/robast/branches/robast-1.1", rec=TRUE, ext="Rd") From noreply at r-forge.r-project.org Sun Jul 8 16:21:11 2018 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Sun, 8 Jul 2018 16:21:11 +0200 (CEST) Subject: [Distr-commits] r1175 - in pkg/startupmsg: . R man tests/Examples Message-ID: <20180708142111.BA193189FCD@r-forge.r-project.org> Author: ruckdeschel Date: 2018-07-08 16:21:11 +0200 (Sun, 08 Jul 2018) New Revision: 1175 Modified: pkg/startupmsg/DESCRIPTION pkg/startupmsg/R/illustration.R pkg/startupmsg/man/myStartupUtilities.Rd pkg/startupmsg/tests/Examples/startupmsg-Ex.Rout.save Log: [startupmsg] merged branch 2.7 back to trunk Modified: pkg/startupmsg/DESCRIPTION =================================================================== --- pkg/startupmsg/DESCRIPTION 2018-07-08 14:20:16 UTC (rev 1174) +++ pkg/startupmsg/DESCRIPTION 2018-07-08 14:21:11 UTC (rev 1175) @@ -1,7 +1,7 @@ Package: startupmsg Encoding: latin1 -Version: 0.9.4 -Date: 2017-04-23 +Version: 0.9.5 +Date: 2016-04-23 Title: Utilities for Start-Up Messages Description: Provides utilities to create or suppress start-up messages. Authors at R: person("Peter", "Ruckdeschel", role=c("cre", "cph", "aut"), @@ -11,4 +11,4 @@ License: LGPL-3 LastChangedDate: {$LastChangedDate$} LastChangedRevision: {$LastChangedRevision$} -SVNRevision: 1137 +SVNRevision: 1080 Modified: pkg/startupmsg/R/illustration.R =================================================================== --- pkg/startupmsg/R/illustration.R 2018-07-08 14:20:16 UTC (rev 1174) +++ pkg/startupmsg/R/illustration.R 2018-07-08 14:21:11 UTC (rev 1175) @@ -64,7 +64,7 @@ MANUALL <- FALSE MANUALS <- "" if(!is.null(MANUAL)) - {if (all(substr(as.character(MANUAL),1,7)=="http://")) + {if (all(substr(as.character(MANUAL),1,7)=="https://")) {MANUALL <- TRUE MANUALS <- c("\n ",MANUAL)} else {MANUAL1 <- paste(MANUAL, Modified: pkg/startupmsg/man/myStartupUtilities.Rd =================================================================== --- pkg/startupmsg/man/myStartupUtilities.Rd 2018-07-08 14:20:16 UTC (rev 1174) +++ pkg/startupmsg/man/myStartupUtilities.Rd 2018-07-08 14:21:11 UTC (rev 1175) @@ -110,7 +110,7 @@ buildStartupMessage(pkg="stats", msg) -MNH <- "http://www.r-project.org/" +MNH <- "https://www.r-project.org/" buildStartupMessage(pkg="stats", msg, packageHelp=TRUE, MANUAL=MNH) ## not quite a manual, but to illustrate the principle: ## "demo/nlm.R" as a "manual": to be system-independent the Modified: pkg/startupmsg/tests/Examples/startupmsg-Ex.Rout.save =================================================================== --- pkg/startupmsg/tests/Examples/startupmsg-Ex.Rout.save 2018-07-08 14:20:16 UTC (rev 1174) +++ pkg/startupmsg/tests/Examples/startupmsg-Ex.Rout.save 2018-07-08 14:21:11 UTC (rev 1175) @@ -1,6 +1,6 @@ -R Under development (unstable) (2016-04-22 r70532) -- "Unsuffered Consequences" -Copyright (C) 2016 The R Foundation for Statistical Computing +R version 3.0.1 Patched (2013-09-02 r63805) -- "Good Sport" +Copyright (C) 2013 The R Foundation for Statistical Computing Platform: i386-w64-mingw32/i386 (32-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. @@ -21,8 +21,20 @@ > source(file.path(R.home("share"), "R", "examples-header.R")) > options(warn = 1) > options(pager = "console") +> base::assign(".ExTimings", "startupmsg-Ex.timings", pos = 'CheckExEnv') +> base::cat("name\tuser\tsystem\telapsed\n", file=base::get(".ExTimings", pos = 'CheckExEnv')) +> base::assign(".format_ptime", ++ function(x) { ++ if(!is.na(x[4L])) x[1L] <- x[1L] + x[4L] ++ if(!is.na(x[5L])) x[2L] <- x[2L] + x[5L] ++ options(OutDec = '.') ++ format(x[1L:3L], digits = 7L) ++ }, ++ pos = 'CheckExEnv') +> +> ### * > library('startupmsg') -:startupmsg> Utilities for Start-Up Messages (version 0.9.2) +:startupmsg> Utilities for start-up messages (version 0.9) :startupmsg> :startupmsg> For more information see ?"startupmsg", :startupmsg> NEWS("startupmsg") @@ -35,6 +47,7 @@ > > flush(stderr()); flush(stdout()) > +> base::assign(".ptime", proc.time(), pos = "CheckExEnv") > ### Name: StartupUtilities > ### Title: Utilities for start-up messages > ### Aliases: startupmsg infoShow TOBEDONE NEWS readVersionInformation @@ -95,7 +108,7 @@ > ### reading information file utilities > readVersionInformation("stats") $ver -[1] "3.4.0" +[1] "3.0.1" $title [1] "The R Stats Package" @@ -107,17 +120,20 @@ NULL > NEWS("stats") ## no NEWS file; Warning in file.show(file.path(system.file(package = pkg, lib.loc = library), : - file.show(): file 'C:/PROGRA~1/R/R-devel/library/stats/NEWS' does not exist + file.show(): file 'C:/PROGRA~1/R/R-30~1.1PA/library/stats/NEWS' does not exist > ## for packages with NEWS file see e.g. randomForest, distr > > > +> base::assign(".dptime", (proc.time() - get(".ptime", pos = "CheckExEnv")), pos = "CheckExEnv") +> base::cat("StartupUtilities", base::get(".format_ptime", pos = 'CheckExEnv')(get(".dptime", pos = "CheckExEnv")), "\n", file=base::get(".ExTimings", pos = 'CheckExEnv'), append=TRUE, sep="\t") > cleanEx() > nameEx("myStartupUtilities") > ### * myStartupUtilities > > flush(stderr()); flush(stdout()) > +> base::assign(".ptime", proc.time(), pos = "CheckExEnv") > ### Name: myStartupUtilities > ### Title: Example functions to utilities for start-up messages > ### Aliases: mystartupMessage mySMHandler buildStartupMessage @@ -131,7 +147,7 @@ > > ## issuing of messages controlled by options() > buildStartupMessage(pkg="stats", msg) -:stats> The R Stats Package (version 3.4.0) +:stats> The R Stats Package (version 3.0.1) :stats> :stats> Note that you may set global options by options() --- cf. :stats> ?"options". @@ -140,13 +156,13 @@ > suppressMessages(buildStartupMessage(pkg="stats", msg)) > onlytypeStartupMessages(buildStartupMessage(pkg="stats", msg), + atypes="version") -The R Stats Package (version 3.4.0) +The R Stats Package (version 3.0.1) > > getOption("StartupBanner") NULL > buildStartupMessage(pkg="stats", msg) -:stats> The R Stats Package (version 3.4.0) +:stats> The R Stats Package (version 3.0.1) :stats> :stats> Note that you may set global options by options() --- cf. :stats> ?"options". @@ -159,7 +175,7 @@ > options("StartupBanner"="complete");getOption("StartupBanner") [1] "complete" > buildStartupMessage(pkg="stats", msg) -:stats> The R Stats Package (version 3.4.0) +:stats> The R Stats Package (version 3.0.1) :stats> :stats> Note that you may set global options by options() --- cf. :stats> ?"options". @@ -168,13 +184,13 @@ > options("StartupBanner"="something else");getOption("StartupBanner") [1] "something else" > buildStartupMessage(pkg="stats", msg) -:stats> The R Stats Package (version 3.4.0) +:stats> The R Stats Package (version 3.0.1) :stats> > > options("StartupBanner"=NULL);getOption("StartupBanner") NULL > buildStartupMessage(pkg="stats", msg) -:stats> The R Stats Package (version 3.4.0) +:stats> The R Stats Package (version 3.0.1) :stats> :stats> Note that you may set global options by options() --- cf. :stats> ?"options". @@ -183,7 +199,7 @@ > > MNH <- "http://www.r-project.org/" > buildStartupMessage(pkg="stats", msg, packageHelp=TRUE, MANUAL=MNH) -:stats> The R Stats Package (version 3.4.0) +:stats> The R Stats Package (version 3.0.1) :stats> :stats> Note that you may set global options by options() --- cf. :stats> ?"options". @@ -195,33 +211,33 @@ > ## "demo/nlm.R" as a "manual": to be system-independent the > ## first call is to be preferred > buildStartupMessage(pkg="stats", msg, packageHelp=TRUE, MANUAL=c("demo","nlm.R")) -:stats> The R Stats Package (version 3.4.0) +:stats> The R Stats Package (version 3.0.1) :stats> :stats> Note that you may set global options by options() --- cf. :stats> ?"options". :stats> -:stats> For more information see ?"stats", as well as -:stats> C:/PROGRA~1/R/R-devel/library/stats/demo/nlm.R +:stats> For more information see ?"stats" > ### works, too, (i.e. is equivalent) under Linux and Windows (at least): > buildStartupMessage(pkg="stats", msg, packageHelp=TRUE, MANUAL="demo/nlm.R") -:stats> The R Stats Package (version 3.4.0) +:stats> The R Stats Package (version 3.0.1) :stats> :stats> Note that you may set global options by options() --- cf. :stats> ?"options". :stats> -:stats> For more information see ?"stats", as well as -:stats> C:/PROGRA~1/R/R-devel/library/stats/demo/nlm.R +:stats> For more information see ?"stats" > > > > +> base::assign(".dptime", (proc.time() - get(".ptime", pos = "CheckExEnv")), pos = "CheckExEnv") +> base::cat("myStartupUtilities", base::get(".format_ptime", pos = 'CheckExEnv')(get(".dptime", pos = "CheckExEnv")), "\n", file=base::get(".ExTimings", pos = 'CheckExEnv'), append=TRUE, sep="\t") > ### *