[Distr-commits] r1371 - in pkg/distr: . R inst man tests/Examples vignettes

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat Nov 12 14:43:27 CET 2022


Author: ruckdeschel
Date: 2022-11-12 14:43:27 +0100 (Sat, 12 Nov 2022)
New Revision: 1371

Added:
   pkg/distr/tests/Examples/distr-Ex.Rout.save
Removed:
   pkg/distr/tests/Examples/distr-Ex_i386.Rout.save
   pkg/distr/tests/Examples/distr-Ex_x64.Rout.save
Modified:
   pkg/distr/DESCRIPTION
   pkg/distr/R/AllInitialize.R
   pkg/distr/R/BinomialDistribution.R
   pkg/distr/R/CompoundDistribution.R
   pkg/distr/R/bAcDcLcDistribution.R
   pkg/distr/R/internalUtils_LCD.R
   pkg/distr/inst/CITATION
   pkg/distr/inst/NEWS
   pkg/distr/man/0distr-package.Rd
   pkg/distr/man/Truncate-methods.Rd
   pkg/distr/man/internals.Rd
   pkg/distr/man/qqbounds.Rd
   pkg/distr/vignettes/newDistributions-knitr.Rnw
Log:
[distr] merged branch 2.9 into trunk (but only for package distr, the others remain unchanged) and fixed some issues (multiple items in man pages, invalid URLs, the new RStudio URL), see NEWS; switched from i386/x64-specific Rout.saves to only one (64bit) Rout.save

Modified: pkg/distr/DESCRIPTION
===================================================================
--- pkg/distr/DESCRIPTION	2022-11-12 11:11:56 UTC (rev 1370)
+++ pkg/distr/DESCRIPTION	2022-11-12 13:43:27 UTC (rev 1371)
@@ -1,17 +1,17 @@
 Package: distr
-Version: 2.8.0
-Date: 2019-03-12
+Version: 2.9.0
+Date: 2022-11-12
 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'"))
+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(>= 3.4), methods, graphics, startupmsg, sfsmisc
-Suggests: distrEx, svUnit (>= 0.7-11), knitr
+Suggests: distrEx, svUnit (>= 0.7-11), knitr, distrMod, ROptEst
 Imports: stats, grDevices, utils, MASS
 VignetteBuilder: knitr
 ByteCompile: yes
@@ -20,4 +20,4 @@
 URL: http://distr.r-forge.r-project.org/
 LastChangedDate: {$LastChangedDate$}
 LastChangedRevision: {$LastChangedRevision$}
-VCS/SVNRevision: 1319
+VCS/SVNRevision: 1370

Modified: pkg/distr/R/AllInitialize.R
===================================================================
--- pkg/distr/R/AllInitialize.R	2022-11-12 11:11:56 UTC (rev 1370)
+++ pkg/distr/R/AllInitialize.R	2022-11-12 13:43:27 UTC (rev 1371)
@@ -425,7 +425,7 @@
                              list(sizeSub = size, probSub = prob)
                                          )
             .Object at support = 0:size
-            .Object at lattice = new("Lattice", pivot = 0, width = 1, 
+            .Object at lattice = new("Lattice", pivot = 0, width = 1,
                                    Length = size+1)
             .Object at .withArith <- .withArith
             .Object at .finSupport <- c(TRUE,TRUE)

Modified: pkg/distr/R/BinomialDistribution.R
===================================================================
--- pkg/distr/R/BinomialDistribution.R	2022-11-12 11:11:56 UTC (rev 1370)
+++ pkg/distr/R/BinomialDistribution.R	2022-11-12 13:43:27 UTC (rev 1371)
@@ -38,7 +38,16 @@
 ##
 ################################
 
-Binom <- function(size = 1,prob = 0.5) new("Binom", size = size, prob = prob)
+Binom <- function(size = 1,prob = 0.5){
+   if(length(size)!=1 || length(prob)!=1)
+      stop("Arguments 'size' and 'prob' must be of length 1")
+   if(!.isInteger(size) || size < 1 )
+      stop("Argument 'size' must be a positive integer")
+   if(prob < 0  || prob > 1 )
+      stop("Argument 'prob' must be in [0,1]")
+   if(!.isEqual01(prob)) return(new("Binom", size = size, prob = prob))
+   if(prob < 0.1) return(Dirac(0)) else return(Dirac(size))
+}
 
 ## wrapped access methods
 setMethod("prob", "Binom", function(object) prob(param(object)))

Modified: pkg/distr/R/CompoundDistribution.R
===================================================================
--- pkg/distr/R/CompoundDistribution.R	2022-11-12 11:11:56 UTC (rev 1370)
+++ pkg/distr/R/CompoundDistribution.R	2022-11-12 13:43:27 UTC (rev 1371)
@@ -8,9 +8,10 @@
                                  withSimplify = FALSE){
 
   Symmetry <- NoSymmetry()
-  
+
   if(!is(NumbOfSummandsDistr,"DiscreteDistribution"))
     stop("Argument 'NumbOfSummandsDistr' must be of class 'DiscreteDistribution'")
+
   supp <- support(NumbOfSummandsDistr)
   if(!(all(.isInteger(supp))&&all(supp >=0)))
     stop("Support of 'NumbOfSummandsDistr' must be non neg. integers")
@@ -17,9 +18,19 @@
 
   if(!is(SummandsDistr,"UnivDistrListOrDistribution"))
     stop("Argument 'SummandsDistr' must be of class 'UnivDistrListOrDistribution'")
-  supp <- support(NumbOfSummandsDistr)
+
+##20200918 can be deleted:  supp <- support(NumbOfSummandsDistr)
+
   supp <- as(supp,"integer")
   suppNot0 <- supp[supp!=0L]
+
+  ## new 20200918 triggered by mail by Vlada Milchevskaya vmilchev at uni-koeln.de
+  ## special treatment of case support is of length 1
+  if(length(supp)==1L){
+     if(supp[1]==0L) return(Dirac(0))
+     return(convpow(SummandsDistr,supp[1]))
+  }
+
   is0 <- 0 %in% supp
   lI <- vector("list", length(supp))
   if(is0) lI[[1]] <- Dirac(0)
@@ -33,7 +44,7 @@
              S <- convpow(SummandsDistr,suppNot0[i])
 #             S <- S + x0
              lI[[i+is0]] <- S
-        }     
+        }
       Symmetry <- Symmetry(SummandsDistr)
      }else{
        supp <- min(supp):max(supp)
@@ -52,11 +63,11 @@
               SymmL <- is(SymmI, "SphericalSymmetry")
               if(SymmL)
                  SymmL <- .isEqual(SymmCenter(SymmI),SymmC)
-           }    
+           }
            S <- S + SummandsDistr[[i]]
            lI[[i+is0]] <- S
        }
-       if(SymmL) Symmetry <- SphericalSymmetry(SymmC) 
+       if(SymmL) Symmetry <- SphericalSymmetry(SymmC)
      }
   UV <- do.call("UnivarMixingDistribution",
                  args = c(list(mixCoeff = d(NumbOfSummandsDistr)(supp),

Modified: pkg/distr/R/bAcDcLcDistribution.R
===================================================================
--- pkg/distr/R/bAcDcLcDistribution.R	2022-11-12 11:11:56 UTC (rev 1370)
+++ pkg/distr/R/bAcDcLcDistribution.R	2022-11-12 13:43:27 UTC (rev 1371)
@@ -104,10 +104,17 @@
 setMethod("/", c("numeric",
                  "AcDcLcDistribution"),
 function(e1,e2){
-  if (is((e2s <- as.character(deparse(match.call(
-                call = sys.call(sys.parent(1)))$e2))), "try-error"))
-      e2s <- "e2"
-
+  i <- 1; stopit <- FALSE; sL <- length(sys.calls())
+  e2s <- "e2"
+  while(!stopit && i <= sL){
+    i <- i + 1
+	trcall <- sys.call(sys.parent(i))
+    myc <- paste(as.list(trcall)[[1]])
+	if(myc=="/"){
+	   e2s <- as.character(deparse(match.call(call=trcall)$e2))
+	   stopit <- TRUE
+	}
+  }  
  e2 <- .ULC.cast(e2)
 
 #         if( is(e2,"AffLinUnivarLebDecDistribution"))
@@ -168,9 +175,17 @@
 setMethod("/", c("AcDcLcDistribution",
                  "AcDcLcDistribution"),
 function(e1,e2){
-  if (is((e2s <- as.character(deparse(match.call(
-                call = sys.call(sys.parent(1)))$e2))), "try-error"))
-      e2s <- "e2"
+  i <- 1; stopit <- FALSE; sL <- length(sys.calls())
+  e2s <- "e2"
+  while(!stopit && i <= sL){
+    i <- i + 1
+	trcall <- sys.call(sys.parent(i))
+    myc <- paste(as.list(trcall)[[1]])
+	if(myc=="/"){
+	   e2s <- as.character(deparse(match.call(call=trcall)$e2))
+	   stopit <- TRUE
+	}
+  }  
 
 #         if( is(e2,"AbscontDistribution"))
 #             e2 <- as(as(e2,"AbscontDistribution"), "UnivarLebDecDistribution")
@@ -279,11 +294,19 @@
 
 setMethod("^", c("AcDcLcDistribution","numeric"),
 function(e1,e2){
-  if (is(try(mc <- match.call(call = sys.call(sys.parent(1))),
-         silent=TRUE), "try-error"))
-      {e1s <- "e1"; e2s <- "e2"}
-  else {e1s <- as.character(deparse(mc$e1))
-        e2s <- as.character(deparse(mc$e2))}
+  i <- 1; stopit <- FALSE; sL <- length(sys.calls())
+  e1s <- "e1"; e2s <- "e2"
+  while(!stopit && i <= sL){
+    i <- i + 1
+	trcall <- sys.call(sys.parent(i))
+    myc <- paste(as.list(trcall)[[1]])
+	if(myc=="^"){
+	   mc <- match.call(call=trcall)
+	   e1s <- as.character(deparse(mc$e1))
+	   e2s <- as.character(deparse(mc$e2))
+	   stopit <- TRUE
+	}
+  }  
 
   if (length(e2)>1) stop("length of operator must be 1")
   if (isTRUE(all.equal(e2,1))) return(e1)
@@ -369,13 +392,19 @@
 setMethod("^", c("AcDcLcDistribution","AcDcLcDistribution"),
 function(e1,e2){
  ### check if there are problems
-  if (is((e1s <- as.character(deparse(match.call(
-                call = sys.call(sys.parent(1)))$e1))), "try-error"))
-      e1s <- "e1"
-  if (is((e2s <- as.character(deparse(match.call(
-                call = sys.call(sys.parent(1)))$e2))), "try-error"))
-      e2s <- "e2"
-
+  i <- 1; stopit <- FALSE; sL <- length(sys.calls())
+  e1s <- "e1"; e2s <- "e2"
+  while(!stopit && i <= sL){
+    i <- i + 1
+	trcall <- sys.call(sys.parent(i))
+    myc <- paste(as.list(trcall)[[1]])
+	if(myc=="/"){
+	   mc <- match.call(call=trcall)
+	   e1s <- as.character(deparse(mc$e1))
+	   e2s <- as.character(deparse(mc$e2))
+	   stopit <- TRUE
+	}
+  }  
 # if( is(e1,"AffLinUnivarLebDecDistribution"))
 #     e1 <- as(e1, "UnivarLebDecDistribution")
 # if( is(e2,"AffLinUnivarLebDecDistribution"))
@@ -456,12 +485,19 @@
 setMethod("^", c("numeric","AcDcLcDistribution"),
 function(e1,e2){
  ### check if there are problems
-  if (is((e1s <- as.character(deparse(match.call(
-                call = sys.call(sys.parent(1)))$e1))), "try-error"))
-      e1s <- "e1"
-  if (is((e2s <- as.character(deparse(match.call(
-                call = sys.call(sys.parent(1)))$e2))), "try-error"))
-      e2s <- "e2"
+  i <- 1; stopit <- FALSE; sL <- length(sys.calls())
+  e1s <- "e1"; e2s <- "e2"
+  while(!stopit && i <= sL){
+    i <- i + 1
+	trcall <- sys.call(sys.parent(i))
+    myc <- paste(as.list(trcall)[[1]])
+	if(myc=="^"){
+	   mc <- match.call(call=trcall)
+	   e1s <- as.character(deparse(mc$e1))
+	   e2s <- as.character(deparse(mc$e2))
+	   stopit <- TRUE
+	}
+  }  
 
  e2 <- .ULC.cast(e2)
  #e2 <- .if( is(e2,"AffLinUnivarLebDecDistribution"))

Modified: pkg/distr/R/internalUtils_LCD.R
===================================================================
--- pkg/distr/R/internalUtils_LCD.R	2022-11-12 11:11:56 UTC (rev 1370)
+++ pkg/distr/R/internalUtils_LCD.R	2022-11-12 13:43:27 UTC (rev 1371)
@@ -201,14 +201,27 @@
     qL1 <- as.vector(unlist(lapply(mixDistr, function(x)
                          do.call(x at q,list(p = getdistrOption("TruncQuantile"),
                                  lower.tail = TRUE)))))
-    qL  <- min(qL0); ql <- min(qL1)
 
+## start patch 20200131 : in the last line added na.rm=TRUE
+    qL1[!is.finite(qL1)] <- NA
+    if(all(is.na(qL1))) qL1[1] <- Inf
+    if(all(is.na(qL0))) qL0[1] <- Inf
+    qL  <- min(qL0, na.rm = TRUE); ql <- min(qL1, na.rm = TRUE)
+## end patch 20200131
+
     qU0 <- as.vector(unlist(lapply(mixDistr, function(x)
                          do.call(x at q,list(p = 0, lower.tail = FALSE)))))
     qU1 <- as.vector(unlist(lapply(mixDistr, function(x)
                          do.call(x at q,list(p = getdistrOption("TruncQuantile"),
                                  lower.tail = FALSE)))))
-    qU  <- max(qU0); qu <- max(qU1)
+
+## start patch 20200131 : in the last line added na.rm=TRUE
+    qU1[!is.finite(qU1)] <- NA
+    if(all(is.na(qU1))) qU1[1] <- -Inf
+    if(all(is.na(qU0))) qU0[1] <- -Inf
+    qU  <- max(qU0, na.rm = TRUE); qu <- max(qU1, na.rm = TRUE)
+## end patch 20200131
+
     return(list(qL = qL, ql = ql, qU = qU, qu = qu))
     }
 

Modified: pkg/distr/inst/CITATION
===================================================================
--- pkg/distr/inst/CITATION	2022-11-12 11:11:56 UTC (rev 1370)
+++ pkg/distr/inst/CITATION	2022-11-12 13:43:27 UTC (rev 1371)
@@ -30,7 +30,7 @@
   volume       = "59",
   number       = "4",
   pages        = "1--25",
-  url          = "http://www.jstatsoft.org/v59/i04/",
+  doi          =  "10.18637/jss.v059.i04",
   textVersion  =
   paste("Peter Ruckdeschel, Matthias Kohl (2014).",
         "General Purpose Convolution Algorithm in S4 Classes by Means of FFT.",

Modified: pkg/distr/inst/NEWS
===================================================================
--- pkg/distr/inst/NEWS	2022-11-12 11:11:56 UTC (rev 1370)
+++ pkg/distr/inst/NEWS	2022-11-12 13:43:27 UTC (rev 1371)
@@ -8,6 +8,41 @@
  information)
  
 ##############
+v 2.9
+##############
+
+user-visible CHANGES:
++ replaced obsolete URLs to JSS papers by respective DOIs
+  
+bug fixes
++ fixed a glitch in catching argument names in bAcDcLcDistribution.R 
+  detected by Elio Campitelli <elio.campitelli at cima.fcen.uba.ar>
++ fixed some error in distributional arithmetics brought up by Andrew Robinson <apro at unimelb.edu.au>
+    to produce meaningful error messages we had code that tried to deparse operands in operations
+	with restricted definition domains like "/", "^"; it turned our that our idea to catch errors
+	in this deparsing within a try()-catch did not work any longer when called from within a function; 
+	as way out, we now have code which no longer needs the try()-catch and instead climbs up the 
+	parsing tree and searches for the first occurrence of "/" resp. "^" and deparses this
+
+under the hood:
++ triggered by an email by Santhosh V <Santhosh.V at se.com>, we added a patch to be more careful when producing
+  slot q for compound and mixing distributions
++ detected by Vlada Milchevskaya vmilchev at uni-koeln.de:
+  CompoundDistribution(): special treatment of case that NumbOfSummandsDistr is a Dirac distribution
+  (and detect that for prob in {0,1} Binom(size, prob) is in fact a Dirac distribution)
++ fixed some broken URLs and changed URLs from http to https where possible
+  changed rstudio.com to posit.co
+
+##############
+v 2.8.1
+##############
+
+under the hood:
++ triggered by new NOTES uncovered by R CMD check, we deleted duplicate entries for items f and supp
+  in internals.Rd, and cross references for packages distrMod and RobAStBase, which need not be available. 
++ fixed URL references to nabble.com which are no longer available
+
+##############
 v 2.8
 ##############
 
@@ -24,6 +59,7 @@
 + modified devNew(): in interactive mode it now asks the user to shut some devices first when 
   length(dev.list())>20; and in non-interactive mode, when length(dev.list())>20, it shuts 
   the first 15 open devices first; this is documented now in ?devNew
++ included pkgs distrMod and ROptEst into suggested pkgs in DESCRIPTION 
 under the hood:
 + DiscreteDistribution(s) gain a logical slot .finSupport to better control whether the 
   "true" support (not the possibly truncated one in slot support) is infinite (more precisely
@@ -43,6 +79,7 @@
   from q(obj) starts with ..q0fun (if this exists); otherwise, i.e., if ..q0fun does not exist, it uses q(obj) and 
   afterwords stores the old q(obj) as ..q0fun ... 
 + .modifyqgaps can now digest args pfun and qfun with or without arguments log.p and lower.tail
+
   
 bug fixes
 + fixed a (newly introduced) bug in exp() for DiscreteDistribution -- forgot to return obj ...

Modified: pkg/distr/man/0distr-package.Rd
===================================================================
--- pkg/distr/man/0distr-package.Rd	2022-11-12 11:11:56 UTC (rev 1370)
+++ pkg/distr/man/0distr-package.Rd	2022-11-12 13:43:27 UTC (rev 1371)
@@ -11,17 +11,14 @@
 parameter and ---most important--- for the four constitutive methods \code{r},
 \code{d}, \code{p}, and \code{q} for simulation respectively for evaluation of
 density / c.d.f.\ and quantile function of the corresponding distribution.
-
 Most distributions of  package \pkg{stats} (like normal, Poisson, etc.)
 are implemented as subclasses of either \code{AbscontDistribution} or
 \code{DiscreteDistribution}, which themselves are again subclasses of
 \code{Distribution}.
-
 Up to arguments referring to a parameter of the distribution (like
 \code{mean} for the normal distribution), these function slots have the
 same arguments as those of package \pkg{stats}, i.e.; for a distribution object
 \code{X} we may call these functions as
-
 \itemize{
 \item \code{r(X)(n)}
 \item \code{d(X)(x, log = FALSE)}
@@ -28,12 +25,10 @@
 \item \code{p(X)(q, lower.tail = TRUE, log.p = FALSE)}
 \item \code{q(X)(p, lower.tail = TRUE, log.p = FALSE)}
 }
-
 For the arguments of these function slots see e.g. \code{\link{rnorm}}.
 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
+In the environments of Posit, see \url{https://www.posit.co} 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
@@ -41,28 +36,24 @@
 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
 like \code{3*X+sin(exp(-Y/4+3))} have their natural interpretation as
 corresponding image distributions.
 }
-
 \details{
 \tabular{ll}{
 Package: \tab distr \cr
-Version: \tab 2.8.0 \cr
-Date: \tab 2019-03-12 \cr
+Version: \tab 2.9.0 \cr
+Date: \tab 2022-11-12 \cr
 Depends: \tab R(>= 3.4), methods, graphics, startupmsg, sfsmisc \cr
-Suggests: \tab distrEx, svUnit (>= 0.7-11) \cr
+Suggests: \tab distrEx, svUnit (>= 0.7-11), knitr, distrMod, ROptEst \cr
 Imports: \tab stats, grDevices, utils, MASS \cr
 LazyLoad: \tab yes \cr
 License: \tab LGPL-3 \cr
-URL: \tab http://distr.r-forge.r-project.org/\cr
-VCS/SVNRevision: \tab 1319 \cr
+URL: \tab https://distr.r-forge.r-project.org/\cr
+VCS/SVNRevision: \tab 1370 \cr
 }}
-
-
 \section{Classes}{
 Distribution classes have a slot \code{param} the class of which
 is is specialized for the particualar distributions. The parameter
@@ -74,7 +65,6 @@
 \code{DiscreteDistribution} and descendants have
 an additional slot \code{\link{support}}, which is again specialized
 to be a lattice for class \code{LatticeDistribution}. \cr
-
 For saved objects from earlier versions, we provide the methods
 \code{\link{isOldVersion}}, and  \code{\link{conv2NewVersion}}
 to check whether the object was generated by an older version of
@@ -83,7 +73,6 @@
 \code{AbscontDistribution} lacking a \code{gap}-slot as well as to
 to objects of subclasses of \code{LatticeDistribution} lacking a
 \code{lattice}-slot.\cr
-
 To enhance accuracy, from version 1.9 on, we also provide
 subclasses \code{AffLinAbscontDistribution}, \code{AffLinDiscreteDistribution},
 and \code{AffLinLatticeDistribution}, as well as the class union
@@ -92,7 +81,6 @@
 These classes have additional slots \code{a}, \code{b}, and \code{X0} to
 reflect the fact, that a distribution object of theses classes has the
 same distribution as \code{a*X0+b}.\cr
-
 For all particular distributions, as well as for classes
 \code{AbscontDistribution}, \code{DiscreteDistribution},
 \code{LatticeDistribution}, \code{UnivarDistrList} and \code{DistrList}
@@ -100,7 +88,6 @@
 The same goes for the space classes.
 All slots should be inspected / modified by means of corresponding
 accessor- /replacement functions; e.g. \code{mean(X) <- 3}
-
 Again to enhance accuracy, from version 2.0 on, we also provide
 subclasses \code{UnivarMixingDistribution} to support mixing distributions,
 \code{UnivarLebDecDistribution}, to support Lebesgue decomposed distributions
@@ -112,12 +99,9 @@
    +  affine linear transformations
    +  truncation, huberization, min/max
 which are all now available analytically.\cr
-
 (see Parameter classes).
-
 \preformatted{
 [*]: there is a generating function with the same name
-
 ##########################
 Distribution classes
 ##########################
@@ -126,8 +110,6 @@
 r(function), d(OptionalFunction), p(OptionalFunction), q(OptionalFunction),
 .withSim(logical), .withArith(logical), .logExact(logical), .lowerExact(logical),
 Symmetry(DistributionSymmetry)
-
-
 "Distribution"
 |>"UnivariateDistribution"
 |>|>"UnivarMixingDistribution"            [*]
@@ -160,22 +142,17 @@
 |>|>|>|>"NBinom"                          [*]
 |>|>|>|>|>"Geom"                          [*]
 |>|>|>|>"Pois"                            [*]
-
 "AffLinDistribution" = union ( "AffLinAbscontDistribution",
                                "AffLinDiscreteDistribution",
                                "AffLinUnivarLebDecDistribution" )
-
 "DistrList"
 |>"UnivarDistrList"                       [*]
-
 "AcDcLc" = union ( "AbscontDistribution",
                    "DiscreteDistribution",
                    "UnivarLebDecDistribution" )
-
 ##########################
 Parameter classes
 ##########################
-
 "OptionalParameter"
 |>"Parameter"
 |>|>"BetaParameter"
@@ -197,23 +174,19 @@
 |>|>"TParameter"
 |>|>"UnifParameter"
 |>|>"WeibullParameter"
-
 ##########################
 Space classes
 ##########################
-
 "rSpace"
 |>"EuclideanSpace"
 |>|>"Reals"
 |>"Lattice"
 |>"Naturals"
-
 ##########################
 Symmetry classes
 ##########################
 slots:
 type(character), SymmCenter(ANY)
-
 "Symmetry"
 |>"NoSymmetry"          [*]
 |>"EllipticalSymmetry"  [*]
@@ -223,12 +196,9 @@
 |>|>"NonSymmetric"      [*]
 |>|>"EvenSymmetric"     [*]
 |>|>"OddSymmetric"      [*]
-
 list thereof
 "DistrSymmList"         [*]
 "FunSymmList"           [*]
-
-
 ##########################
 Matrix classes
 ##########################
@@ -236,7 +206,6 @@
 none
 "PosSemDefSymmMatrix" [*] is subclass of class "matrix" of package "base".
 |>"PosDefSymmMatrix"  [*]
-
 ##########################
 Class unions
 ##########################
@@ -244,13 +213,10 @@
 "OptionalMatrix" = union("matrix","NULL")
 }
 }
-
-
 \section{Methods}{
-
 The group \code{Math} of unary (see \link[methods:S4groupGeneric]{Math}) as well as
-convolution are made available for distributions, see \link{operators-methods};
-in particular for convolution powers, we have method \link{convpow}.
+convolution are made available for distributions, see \link{operators-methods}
+;in particular for convolution powers, we have method \link{convpow}.
 Besides, there are \code{plot} and \code{print}-methods for distributions.
 For the space classes, we have \code{liesIn}, for the
 \code{DicreteDistribution} class, we have \code{liesInSupport}, as well
@@ -257,7 +223,6 @@
 as a generating function.
 The "history" of distributions
 obtained by chaining operations may be shortened using \code{simplifyr}.
-
 }
 \section{Functions}{
 \preformatted{
@@ -280,21 +245,16 @@
 standardMethods         Utility to automatically generate accessor and
                         replacement functions
 }}
-
 \note{Arithmetics on distribution objects are understood as operations on
 corresponding  (independent) r.v.'s and \strong{not} on distribution functions
 or densities.\cr
-
 See also \code{distrARITH()}.\cr
-
 Some functions of package \pkg{stats} have intentionally been masked,
 but completely retain their functionality --- see \code{distrMASK()}.\cr
-
 Accuracy of these arithmetics is controlled by global options which may
 be inspected / set by \code{distroptions()} and \code{getdistrOption()},
 confer \link{distroptions} .
 }
-
 \section{Extension Packages in distrXXX family}{
 Please note that there are extension packages of this packages
 available on CRAN,
@@ -317,7 +277,6 @@
 distributions.}
 }
 }
-
 \section{Package versions}{
 Note: The first two numbers of package versions do not necessarily reflect
  package-individual development, but rather are chosen for the
@@ -324,69 +283,54 @@
  distrXXX family as a whole in order to ease updating "depends"
  information.
 }
-
 \section{Acknowledgement}{
 We thank Martin Maechler, Josef Leydold, John Chambers,
 Duncan Murdoch, Gregory Warnes, Paul Gilbert, Kurt Hornik,
 Uwe Ligges, Torsten Hothorn, and Seth Falcon for their help
 in preparing this package.}
-
 \author{
 Peter Ruckdeschel \email{peter.ruckdeschel at uni-oldenburg.de},\cr
 Thomas Stabla \email{statho3 at web.de},\cr
 Florian Camphausen \email{fcampi at gmx.de},\cr
 Matthias Kohl \email{Matthias.Kohl at stamats.de}\cr
-
 \emph{Maintainer:} Peter Ruckdeschel \email{peter.ruckdeschel at uni-oldenburg.de}
 }
-
 \references{
 P. Ruckdeschel, M. Kohl, T. Stabla, F. Camphausen (2006):
 S4 Classes for Distributions, \emph{R News}, \emph{6}(2), 2-6.
 \url{https://CRAN.R-project.org/doc/Rnews/Rnews_2006-2.pdf}
-
 P. Ruckdeschel and M. Kohl (2014):
    General purpose convolution algorithm for distributions
   in S4-Classes by means of FFT. \emph{J. Statist. Softw.}
   \bold{59}(4): 1-25.
-
 a vignette for packages \pkg{distr}, \pkg{distrSim}, \pkg{distrTEst}, and
 \pkg{distrEx} is included into the mere documentation package \pkg{distrDoc}
 and may be called by
 \code{require("distrDoc");vignette("distr")}
-
 %a more detailed manual for \pkg{distr}, \pkg{distrSim}, \pkg{distrTEst}, and \pkg{distrEx} may be downloaded from
 %\url{http://www.uni-bayreuth.de/departments/math/org/mathe7/DISTR/distr.pdf}
-
 a homepage to this package is available under\cr
-\url{http://distr.r-forge.r-project.org/}
-
+\url{https://distr.r-forge.r-project.org/}
 }
-
 \section{Start-up-Banner}{
 You may suppress the start-up banner/message completely by setting
 \code{options("StartupBanner"="off")} somewhere before loading this
 package by \code{library} or \code{require} in your R-code / R-session.
-
 If option \code{"StartupBanner"} is not defined (default) or setting
 \code{options("StartupBanner"=NULL)} or
 \code{options("StartupBanner"="complete")} the complete start-up banner is
 displayed.
-
 For any other value of option \code{"StartupBanner"}
 (i.e., not in \code{c(NULL,"off","complete")})
 only the version information is displayed.
-
 The same can be achieved by wrapping the \code{library} or \code{require}
  call into either \code{suppressStartupMessages()} or
  \code{onlytypeStartupMessages(.,atypes="version")}.
-
  As for general \code{packageStartupMessage}'s, you may also suppress all
  the start-up banner by wrapping the \code{library} or \code{require}
  call into \code{suppressPackageStartupMessages()} from
  \pkg{startupmsg}-version 0.5 on.
  }
-
 \section{Demos}{
 Demos are available --- see \code{demo(package="distr")}}
 \keyword{package}
@@ -406,4 +350,3 @@
 p(Z)(0.2)
 r(Z)(1000)
 plot(Z+sin(Norm()))}
-

Modified: pkg/distr/man/Truncate-methods.Rd
===================================================================
--- pkg/distr/man/Truncate-methods.Rd	2022-11-12 11:11:56 UTC (rev 1370)
+++ pkg/distr/man/Truncate-methods.Rd	2022-11-12 13:43:27 UTC (rev 1371)
@@ -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://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
+\url{https://stat.ethz.ch/pipermail/r-help/2008-September/174321.html}. 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: pkg/distr/man/internals.Rd
===================================================================
--- pkg/distr/man/internals.Rd	2022-11-12 11:11:56 UTC (rev 1370)
+++ pkg/distr/man/internals.Rd	2022-11-12 13:43:27 UTC (rev 1371)
@@ -143,9 +143,10 @@
 \arguments{
   \item{x}{a (numeric) vector, or (in case of \code{.ULC.cast}) an object of class \code{"AcDcLcDistribution"}}
   \item{y}{a (numeric) vector}
-  \item{f}{a function in one (numeric) argument}
+  \item{f}{in function \code{.primefun}: a function in one (numeric) argument; 
+           in functions \code{.fm}, \code{.fM}, \code{.fM2} a vector of function evaluations}
   \item{lattice}{a lattice (of class \code{Lattice})}
-  \item{support}{a support vector}
+  \item{support}{a support vector / support vector of a univariate discrete distribution}
   \item{eq.space}{logical: shall we check for the support to be equally spaced?} 
   \item{arg}{a formal argument as character}
   \item{fct}{a function}
@@ -202,7 +203,6 @@
           in \code{\link{gsub}}--- but possibly of length >1).}
  \item{gaps,gaps1,gaps2}{matrices \code{m} with two columns, 
              such that \code{t(m)}, interpreted as vector, is ordered}         
- \item{support}{support vector of a univariate discrete distribution}         
  \item{prob}{probability vector for a univariate discrete distribution}         
  \item{mixDistr}{an object of class \code{UnivarDistrList}}
  \item{mixCoeff}{an object of class \code{numeric}; a probability vector}
@@ -223,7 +223,6 @@
  \item{qL,qU}{argmin / argmax of p()-method}  
  \item{ngrid}{number of gridpoints}
  \item{fx}{a vector of function evaluations multiplied by the gridwidth}
- \item{f}{a vector of function evaluations}
  \item{nm}{an optional right asymptotic value}
  \item{Arith}{logical; slot \code{.withArith} of a distribution object,
               or logically-``any'' of these slots in a collection of such objects} 
@@ -381,7 +380,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://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}.
+\url{https://stat.ethz.ch/pipermail/r-help/2008-September/174321.html}.
 
 \code{.modifyqgaps} modifies slot \code{q} for objects of class 
      \code{AbscontDistribution} in the presence of gaps, i.e.; if slot

Modified: pkg/distr/man/qqbounds.Rd
===================================================================
--- pkg/distr/man/qqbounds.Rd	2022-11-12 11:11:56 UTC (rev 1370)
+++ pkg/distr/man/qqbounds.Rd	2022-11-12 13:43:27 UTC (rev 1371)
@@ -101,8 +101,8 @@
   for the implementation of the Kolmogorov distributions;
   \code{\link[distr]{qqplot}} from package \pkg{distr} for
   comparisons of distributions, and
- \code{\link[distrMod]{qqplot}} from package \pkg{distrMod} for comparisons
- of data with models, as well as  \code{\link[RobAStBase]{qqplot}} for
+ \code{qqplot} from package \pkg{distrMod} for comparisons
+ of data with models, as well as  \code{RobAStBase::qqplot} from package \pkg{RobAStBase} for
  checking of corresponding robust esimators.
 }
 \examples{

Added: pkg/distr/tests/Examples/distr-Ex.Rout.save
===================================================================
--- pkg/distr/tests/Examples/distr-Ex.Rout.save	                        (rev 0)
+++ pkg/distr/tests/Examples/distr-Ex.Rout.save	2022-11-12 13:43:27 UTC (rev 1371)
@@ -0,0 +1,3880 @@
+
+R Under development (unstable) (2022-09-25 r82916 ucrt) -- "Unsuffered Consequences"
+Copyright (C) 2022 The R Foundation for Statistical Computing
+Platform: x86_64-w64-mingw32/x64 (64-bit)
+
+R is free software and comes with ABSOLUTELY NO WARRANTY.
+You are welcome to redistribute it under certain conditions.
+Type 'license()' or 'licence()' for distribution details.
+
+  Natural language support but running in an English locale
+
+R is a collaborative project with many contributors.
+Type 'contributors()' for more information and
+'citation()' on how to cite R or R packages in publications.
+
+Type 'demo()' for some demos, 'help()' for on-line help, or
+'help.start()' for an HTML browser interface to help.
+Type 'q()' to quit R.
+
+> pkgname <- "distr"
+> source(file.path(R.home("share"), "R", "examples-header.R"))
+> options(warn = 1)
+> options(pager = "console")
+> library('distr')
+Loading required package: startupmsg
+:startupmsg>  Utilities for Start-Up Messages (version 0.9.6)
+:startupmsg> 
+:startupmsg>  For more information see ?"startupmsg",
+:startupmsg>  NEWS("startupmsg")
+
+Loading required package: sfsmisc
+:distr>  Object Oriented Implementation of Distributions (version
+:distr>  2.9.0)
+:distr> 
+:distr>  Attention: Arithmetics on distribution objects are
+:distr>  understood as operations on corresponding random variables
+:distr>  (r.v.s); see distrARITH().
+:distr> 
+:distr>  Some functions from package 'stats' are intentionally masked
+:distr>  ---see distrMASK().
+:distr> 
+:distr>  Note that global options are controlled by distroptions()
+:distr>  ---c.f. ?"distroptions".
+:distr> 
+:distr>  For more information see ?"distr", NEWS("distr"), as well as
+:distr>    http://distr.r-forge.r-project.org/
+:distr>  Package "distrDoc" provides a vignette to this package as
+:distr>  well as to several extension packages; try
+:distr>  vignette("distr").
+
+
+Attaching package: 'distr'
+
+The following objects are masked from 'package:stats':
+
+    df, qqplot, sd
+
+> 
+> base::assign(".oldSearch", base::search(), pos = 'CheckExEnv')
+> base::assign(".old_wd", base::getwd(), pos = 'CheckExEnv')
+> cleanEx()
+> nameEx("0distr-package")
+> ### * 0distr-package
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: distr-package
+> ### Title: distr - Object Oriented Implementation of Distributions
+> ### Aliases: distr-package distr
+> ### Keywords: package distribution
+> 
+> ### ** Examples
+> 
+> X <- Unif(2,3)
+> Y <- Pois(lambda = 3)
+> Z <- X+Y  # generates Law of corresponding independent variables
+> p(Z)(0.2)
+[1] 0
+> r(Z)(1000)
+   [1]  6.579102  4.779275  3.372658  4.632594  3.217653  2.833188  5.836883
[TRUNCATED]

To get the complete diff run:
    svnlook diff /svnroot/distr -r 1371


More information about the Distr-commits mailing list