[Distr-commits] r1403 - in pkg/distr: . inst man tests/Examples

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sun May 7 14:46:38 CEST 2023


Author: ruckdeschel
Date: 2023-05-07 14:46:37 +0200 (Sun, 07 May 2023)
New Revision: 1403

Modified:
   pkg/distr/DESCRIPTION
   pkg/distr/inst/NEWS
   pkg/distr/man/RtoDPQ.LC.Rd
   pkg/distr/man/RtoDPQ.Rd
   pkg/distr/man/RtoDPQ.d.Rd
   pkg/distr/tests/Examples/distr-Ex.Rout.save
Log:
[distr] triggered by a mail by BDR, prepared release 2.9.2:
+ included pkg RobAStBase into "Enhances" in the DESCRIPTION file
+ moved some code in the help to RtoDPQ.d relying on the RNG into IGNORE_RDIFF 


Modified: pkg/distr/DESCRIPTION
===================================================================
--- pkg/distr/DESCRIPTION	2022-11-14 22:40:09 UTC (rev 1402)
+++ pkg/distr/DESCRIPTION	2023-05-07 12:46:37 UTC (rev 1403)
@@ -1,6 +1,6 @@
 Package: distr
-Version: 2.9.1
-Date: 2022-11-14
+Version: 2.9.2
+Date: 2023-05-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
@@ -13,6 +13,7 @@
 Depends: R(>= 3.4), methods, graphics, startupmsg, sfsmisc
 Suggests: distrEx, svUnit (>= 0.7-11), knitr, distrMod, ROptEst
 Imports: stats, grDevices, utils, MASS
+Enhances: RobAStBase
 VignetteBuilder: knitr
 ByteCompile: yes
 Encoding: latin1

Modified: pkg/distr/inst/NEWS
===================================================================
--- pkg/distr/inst/NEWS	2022-11-14 22:40:09 UTC (rev 1402)
+++ pkg/distr/inst/NEWS	2023-05-07 12:46:37 UTC (rev 1403)
@@ -8,6 +8,14 @@
  information)
  
 ##############
+v 2.9.2
+##############
+under the hood:
++ included pkg RobAStBase into "Enhances" in the DESCRIPTION file
++ moved some code in the help to RtoDPQ.d relying on the RNG into IGNORE_RDIFF 
+
+
+##############
 v 2.9
 ##############
 

Modified: pkg/distr/man/RtoDPQ.LC.Rd
===================================================================
--- pkg/distr/man/RtoDPQ.LC.Rd	2022-11-14 22:40:09 UTC (rev 1402)
+++ pkg/distr/man/RtoDPQ.LC.Rd	2023-05-07 12:46:37 UTC (rev 1403)
@@ -43,12 +43,15 @@
 \code{\link{approxfun}}, 
 \code{\link{ecdf}}}
 \examples{
+set.seed(20230508)
 rn2 <- function(n)ifelse(rbinom(n,1,0.3),rnorm(n)^2,rbinom(n,4,.3))
 x <- RtoDPQ.LC(r = rn2, e = 4, n = 512)
 plot(x)
 # returns density, cumulative distribution and quantile function of
 # squared standard normal distribution
+## IGNORE_RDIFF_BEGIN
 d.discrete(x)(4)
+## IGNORE_RDIFF_END
 x2 <- RtoDPQ.LC(r = rn2, e = 5, n = 1024) # for a better result
 plot(x2)
 }

Modified: pkg/distr/man/RtoDPQ.Rd
===================================================================
--- pkg/distr/man/RtoDPQ.Rd	2022-11-14 22:40:09 UTC (rev 1402)
+++ pkg/distr/man/RtoDPQ.Rd	2023-05-07 12:46:37 UTC (rev 1403)
@@ -44,12 +44,13 @@
 \code{\link{approxfun}}, 
 \code{\link{ecdf}}}
 \examples{
+set.seed(20230508)
 rn2 <- function(n){rnorm(n)^2}
 x <- RtoDPQ(r = rn2, e = 4, n = 512)
 # returns density, cumulative distribution and quantile function of
 # squared standard normal distribution
+## IGNORE_RDIFF_BEGIN
 x$dfun(4)
-## IGNORE_RDIFF_BEGIN
 RtoDPQ(r = rn2, e = 5, n = 1024) # for a better result
 ## IGNORE_RDIFF_END
 rp2 <- function(n){rpois(n, lambda = 1)^2}

Modified: pkg/distr/man/RtoDPQ.d.Rd
===================================================================
--- pkg/distr/man/RtoDPQ.d.Rd	2022-11-14 22:40:09 UTC (rev 1402)
+++ pkg/distr/man/RtoDPQ.d.Rd	2023-05-07 12:46:37 UTC (rev 1403)
@@ -37,12 +37,13 @@
 \code{\link{approxfun}}, 
 \code{\link{ecdf}}}
 \examples{
+set.seed(20230508)
 rn2 <- function(n){rnorm(n)^2}
 x <- RtoDPQ(r = rn2, e = 4, n = 512)
 # returns density, cumulative distribution and quantile function of
 # squared standard  normal distribution
+## IGNORE_RDIFF_BEGIN
 x$dfun(4)
-## IGNORE_RDIFF_BEGIN
 RtoDPQ(r = rn2, e = 5, n = 1024) # for a better result
 ## IGNORE_RDIFF_END
 rp2 <- function(n){rpois(n, lambda = 1)^2}

Modified: pkg/distr/tests/Examples/distr-Ex.Rout.save
===================================================================
--- pkg/distr/tests/Examples/distr-Ex.Rout.save	2022-11-14 22:40:09 UTC (rev 1402)
+++ pkg/distr/tests/Examples/distr-Ex.Rout.save	2023-05-07 12:46:37 UTC (rev 1403)
@@ -1,7 +1,7 @@
 
-R Under development (unstable) (2022-09-25 r82916 ucrt) -- "Unsuffered Consequences"
+R version 4.1.2 Patched (2022-01-17 r81511) -- "Bird Hippie"
 Copyright (C) 2022 The R Foundation for Statistical Computing
-Platform: x86_64-w64-mingw32/x64 (64-bit)
+Platform: i386-w64-mingw32/i386 (32-bit)
 
 R is free software and comes with ABSOLUTELY NO WARRANTY.
 You are welcome to redistribute it under certain conditions.
@@ -29,8 +29,9 @@
 :startupmsg>  NEWS("startupmsg")
 
 Loading required package: sfsmisc
+Warning: package 'sfsmisc' was built under R version 4.1.3
 :distr>  Object Oriented Implementation of Distributions (version
-:distr>  2.9.1)
+:distr>  2.9.2)
 :distr> 
 :distr>  Attention: Arithmetics on distribution objects are
 :distr>  understood as operations on corresponding random variables
@@ -1966,6 +1967,7 @@
 > 
 > ### ** Examples
 > 
+> set.seed(20230508)
 > rn2 <- function(n)ifelse(rbinom(n,1,0.3),rnorm(n)^2,rbinom(n,4,.3))
 > x <- RtoDPQ.LC(r = rn2, e = 4, n = 512)
 Warning in .makeDNew(dxy$x, dxy$y, standM = "int") :
@@ -1973,9 +1975,13 @@
 > plot(x)
 > # returns density, cumulative distribution and quantile function of
 > # squared standard normal distribution
+> ## IGNORE_RDIFF_BEGIN
 > d.discrete(x)(4)
-[1] 0.009477312
+[1] 0.006991012
+> ## IGNORE_RDIFF_END
 > x2 <- RtoDPQ.LC(r = rn2, e = 5, n = 1024) # for a better result
+Warning in .makeDNew(dxy$x, dxy$y, standM = "int") :
+  'integrate()' threw an error ---result may be inaccurate.
 > plot(x2)
 > 
 > 
@@ -1994,18 +2000,15 @@
 > 
 > ### ** Examples
 > 
+> set.seed(20230508)
 > rn2 <- function(n){rnorm(n)^2}
 > x <- RtoDPQ(r = rn2, e = 4, n = 512)
-Warning in .makeDNew(dxy$x, dxy$y, standM = "int") :
-  'integrate()' threw an error ---result may be inaccurate.
 > # returns density, cumulative distribution and quantile function of
 > # squared standard normal distribution
+> ## IGNORE_RDIFF_BEGIN
 > x$dfun(4)
-[1] 0.02970112
-> ## IGNORE_RDIFF_BEGIN
+[1] 0.0254851
 > RtoDPQ(r = rn2, e = 5, n = 1024) # for a better result
-Warning in .makeDNew(dxy$x, dxy$y, standM = "int") :
-  'integrate()' threw an error ---result may be inaccurate.
 $dfun
 function(x, log = FALSE)
                     {if (log)
@@ -2012,8 +2015,8 @@
                           d0 <-    log(df1(x))-log(stand)
                      else d0 <- df1(x) / stand
                      return (d0)}
-<bytecode: 0x000001a2449549b8>
-<environment: 0x000001a249a93c70>
+<bytecode: 0x09c3ea20>
+<environment: 0x0fcce4e0>
 
 $pfun
 function (q, lower.tail = TRUE, log.p = FALSE) 
@@ -2028,7 +2031,7 @@
     else p0/nm
     return(p0)
 }
-<environment: 0x000001a24a6e2820>
+<environment: 0x0fab9ff0>
 
 $qfun
 function (p, lower.tail = TRUE, log.p = FALSE) 
@@ -2046,7 +2049,7 @@
     else q.l0(1 - p01)
     return(as.numeric(q0))
 }
-<environment: 0x000001a24aa063a8>
+<environment: 0x0a846388>
 
 > ## IGNORE_RDIFF_END
 > rp2 <- function(n){rpois(n, lambda = 1)^2}
@@ -2070,18 +2073,15 @@
 > 
 > ### ** Examples
 > 
+> set.seed(20230508)
 > rn2 <- function(n){rnorm(n)^2}
 > x <- RtoDPQ(r = rn2, e = 4, n = 512)
-Warning in .makeDNew(dxy$x, dxy$y, standM = "int") :
-  'integrate()' threw an error ---result may be inaccurate.
 > # returns density, cumulative distribution and quantile function of
 > # squared standard  normal distribution
+> ## IGNORE_RDIFF_BEGIN
 > x$dfun(4)
-[1] 0.02970112
-> ## IGNORE_RDIFF_BEGIN
+[1] 0.0254851
 > RtoDPQ(r = rn2, e = 5, n = 1024) # for a better result
-Warning in .makeDNew(dxy$x, dxy$y, standM = "int") :
-  'integrate()' threw an error ---result may be inaccurate.
 $dfun
 function(x, log = FALSE)
                     {if (log)
@@ -2088,8 +2088,8 @@
                           d0 <-    log(df1(x))-log(stand)
                      else d0 <- df1(x) / stand
                      return (d0)}
-<bytecode: 0x000001a2449549b8>
-<environment: 0x000001a247a3fcc0>
+<bytecode: 0x09c3ea20>
+<environment: 0x0a649c00>
 
 $pfun
 function (q, lower.tail = TRUE, log.p = FALSE) 
@@ -2104,7 +2104,7 @@
     else p0/nm
     return(p0)
 }
-<environment: 0x000001a247804248>
+<environment: 0x0a4c3fc0>
 
 $qfun
 function (p, lower.tail = TRUE, log.p = FALSE) 
@@ -2122,7 +2122,7 @@
     else q.l0(1 - p01)
     return(as.numeric(q0))
 }
-<environment: 0x000001a24a7caef0>
+<environment: 0x0a49ce50>
 
 > ## IGNORE_RDIFF_END
 > rp2 <- function(n){rpois(n, lambda = 1)^2}
@@ -3638,7 +3638,7 @@
 [14,] 1.99347252   5.34675 2.372039  4.68228
 [15,] 2.15946536   5.69602 2.542814  4.95809
 [16,] 2.38432838   6.23846 2.720990  5.25094
-[17,] 2.68737426   7.15345 2.907901  5.56431
+[17,] 2.68737426   7.15345 2.907900  5.56431
 [18,] 2.86053193   7.83015 3.105154  5.90261
 [19,] 2.93370263   8.16978 3.314728  6.27159
 [20,] 3.04149797   8.75669 3.314728  6.27159
@@ -3804,13 +3804,13 @@
 > ## IGNORE_RDIFF_BEGIN
 > system.time(r(F)(10^6))
    user  system elapsed 
-   0.28    0.02    0.30 
+   0.33    0.02    0.35 
 > ## IGNORE_RDIFF_END
 > simplifyr(F, size = 10^6)
 > ## IGNORE_RDIFF_BEGIN
 > system.time(r(F)(10^6))
    user  system elapsed 
-   0.11    0.00    0.11 
+   0.12    0.00    0.13 
 > ## IGNORE_RDIFF_END
 > 
 > 
@@ -3847,7 +3847,7 @@
 > cleanEx()
 > options(digits = 7L)
 > base::cat("Time elapsed: ", proc.time() - base::get("ptime", pos = 'CheckExEnv'),"\n")
-Time elapsed:  23.19 1.83 25.23 NA NA 
+Time elapsed:  19.79 1.9 22.74 NA NA 
 > grDevices::dev.off()
 pdf 
  19 



More information about the Distr-commits mailing list