[Distr-commits] r1444 - in pkg: distr distr/inst distr/man distr/src distr/tests/Examples distrEx distrEx/inst distrEx/man distrEx/src distrEx/tests/Examples

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Aug 19 18:20:58 CEST 2024


Author: ruckdeschel
Date: 2024-08-19 18:20:57 +0200 (Mon, 19 Aug 2024)
New Revision: 1444

Modified:
   pkg/distr/DESCRIPTION
   pkg/distr/inst/NEWS
   pkg/distr/man/0distr-package.Rd
   pkg/distr/src/ks.c
   pkg/distr/tests/Examples/distr-Ex.Rout.save
   pkg/distrEx/DESCRIPTION
   pkg/distrEx/inst/NEWS
   pkg/distrEx/man/0distrEx-package.Rd
   pkg/distrEx/src/GLaw.c
   pkg/distrEx/tests/Examples/distrEx-Ex.Rout.save
Log:
[distr, distrEx] (trunk) w.r.t. K Hornik's Mail 20240819,  in our C code in our packages distr and distrEx replaced calls to Calloc and Free (in distr) and to PI (distrEx) by R_Calloc and R_Free, resp. by M_PI . 

Modified: pkg/distr/DESCRIPTION
===================================================================
--- pkg/distr/DESCRIPTION	2024-02-18 14:52:31 UTC (rev 1443)
+++ pkg/distr/DESCRIPTION	2024-08-19 16:20:57 UTC (rev 1444)
@@ -1,6 +1,6 @@
 Package: distr
-Version: 2.9.3
-Date: 2024-01-27
+Version: 2.9.4
+Date: 2024-08-19
 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
@@ -21,4 +21,4 @@
 URL: http://distr.r-forge.r-project.org/
 LastChangedDate: {$LastChangedDate$}
 LastChangedRevision: {$LastChangedRevision$}
-VCS/SVNRevision: 1422
+VCS/SVNRevision: 1443

Modified: pkg/distr/inst/NEWS
===================================================================
--- pkg/distr/inst/NEWS	2024-02-18 14:52:31 UTC (rev 1443)
+++ pkg/distr/inst/NEWS	2024-08-19 16:20:57 UTC (rev 1444)
@@ -8,6 +8,14 @@
  information)
  
 ##############
+v 2.9.4
+##############
+
+under the hood:
++ to comply with _R_USE_STRICT_R_HEADERS_=true, we changed calls to Calloc and Free to
+  R_Calloc and R_Free in ks.c
+
+##############
 v 2.9.3
 ##############
 bug fixes

Modified: pkg/distr/man/0distr-package.Rd
===================================================================
--- pkg/distr/man/0distr-package.Rd	2024-02-18 14:52:31 UTC (rev 1443)
+++ pkg/distr/man/0distr-package.Rd	2024-08-19 16:20:57 UTC (rev 1444)
@@ -44,8 +44,8 @@
 \details{
 \tabular{ll}{
 Package: \tab distr \cr
-Version: \tab 2.9.3 \cr
-Date: \tab 2024-01-27 \cr
+Version: \tab 2.9.4 \cr
+Date: \tab 2024-08-19 \cr
 Depends: \tab R(>= 3.4), methods, graphics, startupmsg, sfsmisc \cr
 Suggests: \tab distrEx, svUnit (>= 0.7-11), knitr, distrMod, ROptEst \cr
 Imports: \tab stats, grDevices, utils, MASS \cr
@@ -52,7 +52,7 @@
 LazyLoad: \tab yes \cr
 License: \tab LGPL-3 \cr
 URL: \tab https://distr.r-forge.r-project.org/\cr
-VCS/SVNRevision: \tab 1422 \cr
+VCS/SVNRevision: \tab 1443 \cr
 }}
 \section{Classes}{
 Distribution classes have a slot \code{param} the class of which

Modified: pkg/distr/src/ks.c
===================================================================
--- pkg/distr/src/ks.c	2024-02-18 14:52:31 UTC (rev 1443)
+++ pkg/distr/src/ks.c	2024-08-19 16:20:57 UTC (rev 1444)
@@ -158,8 +158,9 @@
    k = (int) (n * d) + 1;
    m = 2 * k - 1;
    h = k - n * d;
-   H = (double*) Calloc(m * m, double);
-   Q = (double*) Calloc(m * m, double);
+/* P.R. 20240819 changed Calloc to R_Calloc  */
+   H = (double*) R_Calloc(m * m, double);
+   Q = (double*) R_Calloc(m * m, double);
    for(i = 0; i < m; i++)
        for(j = 0; j < m; j++)
 	   if(i - j + 1 < 0)
@@ -187,8 +188,9 @@
        }
    }
    s *= pow(10., eQ);
-   Free(H);
-   Free(Q);
+/* P.R. 20240819 changed Free to R_Free  */
+   R_Free(H);
+   R_Free(Q);
    return(s);
 }
 
@@ -225,7 +227,8 @@
 	return;
     }
     m_power(A, eA, V, eV, m, n / 2);
-    B = (double*) Calloc(m * m, double);
+/* P.R. 20240819 changed Calloc to R_Calloc  */
+    B = (double*) R_Calloc(m * m, double);
     m_multiply(V, V, B, m);
     eB = 2 * (*eV);
     if((n % 2) == 0) {
@@ -242,7 +245,8 @@
 	    V[i] = V[i] * 1e-140;
 	*eV += 140;
     }
-    Free(B);
+/* P.R. 20240819 changed Free to R_Free  */
+    R_Free(B);
 }
 
 /* Two-sided two-sample */

Modified: pkg/distr/tests/Examples/distr-Ex.Rout.save
===================================================================
--- pkg/distr/tests/Examples/distr-Ex.Rout.save	2024-02-18 14:52:31 UTC (rev 1443)
+++ pkg/distr/tests/Examples/distr-Ex.Rout.save	2024-08-19 16:20:57 UTC (rev 1444)
@@ -1,5 +1,5 @@
 
-R Under development (unstable) (2024-01-25 r85826 ucrt) -- "Unsuffered Consequences"
+R Under development (unstable) (2024-08-17 r87027 ucrt) -- "Unsuffered Consequences"
 Copyright (C) 2024 The R Foundation for Statistical Computing
 Platform: x86_64-w64-mingw32/x64
 
@@ -23,7 +23,7 @@
 > options(pager = "console")
 > library('distr')
 Loading required package: startupmsg
-:startupmsg>  Utilities for Start-Up Messages (version 0.9.6)
+:startupmsg>  Utilities for Start-Up Messages (version 0.9.6.1)
 :startupmsg> 
 :startupmsg>  For more information see ?"startupmsg",
 :startupmsg>  NEWS("startupmsg")
@@ -30,7 +30,7 @@
 
 Loading required package: sfsmisc
 :distr>  Object Oriented Implementation of Distributions (version
-:distr>  2.9.3)
+:distr>  2.9.4)
 :distr> 
 :distr>  Attention: Arithmetics on distribution objects are
 :distr>  understood as operations on corresponding random variables
@@ -2016,8 +2016,8 @@
                           d0 <-    log(df1(x))-log(stand)
                      else d0 <- df1(x) / stand
                      return (d0)}
-<bytecode: 0x00000151e3e59ca8>
-<environment: 0x00000151ed43d9a8>
+<bytecode: 0x000001bdc208d238>
+<environment: 0x000001bdc7984f28>
 
 $pfun
 function (q, lower.tail = TRUE, log.p = FALSE) 
@@ -2032,7 +2032,7 @@
     else p0/nm
     return(p0)
 }
-<environment: 0x00000151ea9a1628>
+<environment: 0x000001bdc2d8cbc8>
 
 $qfun
 function (p, lower.tail = TRUE, log.p = FALSE) 
@@ -2050,7 +2050,7 @@
     else q.l0(1 - p01)
     return(as.numeric(q0))
 }
-<environment: 0x00000151e625e970>
+<environment: 0x000001bdc2d3a7f0>
 
 > ## IGNORE_RDIFF_END
 > rp2 <- function(n){rpois(n, lambda = 1)^2}
@@ -2091,8 +2091,8 @@
                           d0 <-    log(df1(x))-log(stand)
                      else d0 <- df1(x) / stand
                      return (d0)}
-<bytecode: 0x00000151e3e59ca8>
-<environment: 0x00000151eef26f10>
+<bytecode: 0x000001bdc208d238>
+<environment: 0x000001bdc2b5ea18>
 
 $pfun
 function (q, lower.tail = TRUE, log.p = FALSE) 
@@ -2107,7 +2107,7 @@
     else p0/nm
     return(p0)
 }
-<environment: 0x00000151e7cbb740>
+<environment: 0x000001bdc283b2a8>
 
 $qfun
 function (p, lower.tail = TRUE, log.p = FALSE) 
@@ -2125,7 +2125,7 @@
     else q.l0(1 - p01)
     return(as.numeric(q0))
 }
-<environment: 0x00000151e7c87b68>
+<environment: 0x000001bdc5d04b20>
 
 > ## IGNORE_RDIFF_END
 > rp2 <- function(n){rpois(n, lambda = 1)^2}
@@ -3810,13 +3810,13 @@
 > ## IGNORE_RDIFF_BEGIN
 > system.time(r(F)(10^6))
    user  system elapsed 
-   0.31    0.01    0.33 
+   0.30    0.01    0.31 
 > ## 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.10    0.02    0.10 
 > ## IGNORE_RDIFF_END
 > 
 > 
@@ -3853,7 +3853,7 @@
 > cleanEx()
 > options(digits = 7L)
 > base::cat("Time elapsed: ", proc.time() - base::get("ptime", pos = 'CheckExEnv'),"\n")
-Time elapsed:  25.53 1.97 28.05 NA NA 
+Time elapsed:  23.82 1.72 26 NA NA 
 > grDevices::dev.off()
 pdf 
  19 

Modified: pkg/distrEx/DESCRIPTION
===================================================================
--- pkg/distrEx/DESCRIPTION	2024-02-18 14:52:31 UTC (rev 1443)
+++ pkg/distrEx/DESCRIPTION	2024-08-19 16:20:57 UTC (rev 1444)
@@ -1,6 +1,6 @@
 Package: distrEx
-Version: 2.9.2
-Date: 2024-01-29
+Version: 2.9.3
+Date: 2024-08-19
 Title: Extensions of Package 'distr'
 Description: Extends package 'distr' by functionals, distances, and conditional distributions.
 Depends: R(>= 3.4), methods, distr(>= 2.8.0)
@@ -15,4 +15,4 @@
 URL: http://distr.r-forge.r-project.org/
 LastChangedDate: {$LastChangedDate$}
 LastChangedRevision: {$LastChangedRevision$}
-VCS/SVNRevision: 1426
+VCS/SVNRevision: 1443

Modified: pkg/distrEx/inst/NEWS
===================================================================
--- pkg/distrEx/inst/NEWS	2024-02-18 14:52:31 UTC (rev 1443)
+++ pkg/distrEx/inst/NEWS	2024-08-19 16:20:57 UTC (rev 1444)
@@ -8,6 +8,14 @@
  information)
 
 ##############
+v 2.9.3
+##############
+
+under the hood:
++ to comply with _R_USE_STRICT_R_HEADERS_=true, we changed calls to PI to M_PI in GLaw.c
+
+
+##############
 v 2.9
 ##############
 

Modified: pkg/distrEx/man/0distrEx-package.Rd
===================================================================
--- pkg/distrEx/man/0distrEx-package.Rd	2024-02-18 14:52:31 UTC (rev 1443)
+++ pkg/distrEx/man/0distrEx-package.Rd	2024-08-19 16:20:57 UTC (rev 1444)
@@ -26,8 +26,8 @@
 \details{
 \tabular{ll}{
 Package: \tab distrEx \cr
-Version: \tab 2.9.2 \cr
-Date: \tab 2024-01-29 \cr
+Version: \tab 2.9.3 \cr
+Date: \tab 2024-08-19 \cr
 Depends: \tab R(>= 3.4), methods, distr(>= 2.8.0) \cr
 Imports: \tab startupmsg, utils, stats \cr
 Suggests:  \tab tcltk \cr
@@ -34,7 +34,7 @@
 LazyLoad: \tab yes \cr
 License: \tab LGPL-3 \cr
 URL: \tab https://distr.r-forge.r-project.org/\cr
-VCS/SVNRevision: \tab 1426 \cr
+VCS/SVNRevision: \tab 1443 \cr
 }
 }
 \section{Classes}{

Modified: pkg/distrEx/src/GLaw.c
===================================================================
--- pkg/distrEx/src/GLaw.c	2024-02-18 14:52:31 UTC (rev 1443)
+++ pkg/distrEx/src/GLaw.c	2024-08-19 16:20:57 UTC (rev 1444)
@@ -9,7 +9,8 @@
 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++){
-        z=cos(PI*(i-0.25)/((*n)+0.5));
+/* P.R. 20240819 changed PI to M_PI  */
+        z=cos(M_PI*(i-0.25)/((*n)+0.5));
         do{ p1=1.0;
             p2=0.0;
             for(j=1;j<=(*n);j++){

Modified: pkg/distrEx/tests/Examples/distrEx-Ex.Rout.save
===================================================================
--- pkg/distrEx/tests/Examples/distrEx-Ex.Rout.save	2024-02-18 14:52:31 UTC (rev 1443)
+++ pkg/distrEx/tests/Examples/distrEx-Ex.Rout.save	2024-08-19 16:20:57 UTC (rev 1444)
@@ -1,7 +1,7 @@
 
-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 Under development (unstable) (2024-08-17 r87027 ucrt) -- "Unsuffered Consequences"
+Copyright (C) 2024 The R Foundation for Statistical Computing
+Platform: x86_64-w64-mingw32/x64
 
 R is free software and comes with ABSOLUTELY NO WARRANTY.
 You are welcome to redistribute it under certain conditions.
@@ -24,7 +24,7 @@
 > library('distrEx')
 Loading required package: distr
 Loading required package: startupmsg
-:startupmsg>  Utilities for Start-Up Messages (version 0.9.6)
+:startupmsg>  Utilities for Start-Up Messages (version 0.9.6.1)
 :startupmsg> 
 :startupmsg>  For more information see ?"startupmsg",
 :startupmsg>  NEWS("startupmsg")
@@ -31,7 +31,7 @@
 
 Loading required package: sfsmisc
 :distr>  Object Oriented Implementation of Distributions (version
-:distr>  2.9.0)
+:distr>  2.9.4)
 :distr> 
 :distr>  Attention: Arithmetics on distribution objects are
 :distr>  understood as operations on corresponding random variables
@@ -56,7 +56,7 @@
 
     df, qqplot, sd
 
-:distrEx>  Extensions of Package 'distr' (version 2.9.0)
+:distrEx>  Extensions of Package 'distr' (version 2.9.3)
 :distrEx> 
 :distrEx>  Note: Packages "e1071", "moments", "fBasics" should be
 :distrEx>  attached /before/ package "distrEx". See
@@ -835,7 +835,7 @@
     }
     0 + cond %*% 1 + 1 * r(n, ...)
 }
-<environment: 0x0000025732a68a18>
+<environment: 0x00000262e422b858>
 > d(D1)
 function (x, cond, log = FALSE, ...) 
 {
@@ -857,7 +857,7 @@
     else d0 <- d0/1
     return(d0)
 }
-<environment: 0x0000025732a68a18>
+<environment: 0x00000262e422b858>
 > p(D1)
 function (q, cond, lower.tail = TRUE, log.p = FALSE, ...) 
 {
@@ -884,7 +884,7 @@
             p0 <- log(p0)
     return(p0)
 }
-<environment: 0x0000025732a68a18>
+<environment: 0x00000262e422b858>
 > q(D1)
 function (p, cond, lower.tail = TRUE, log.p = FALSE, ...) 
 {
@@ -908,7 +908,7 @@
         argList <- c(argList, dots)
     1 * do.call(q, argList) + 0 + as.vector(cond %*% 1)
 }
-<environment: 0x0000025732a68a18>
+<environment: 0x00000262e422b858>
 > ## in RStudio or Jupyter IRKernel, use q.l(.)(.) instead of q(.)(.)
 > param(D1)
 name:	parameter of a linear regression model
@@ -1064,7 +1064,7 @@
 > 
 > OAsymTotalVarDist(rbinom(50, size = 20, prob = 0.5), Binom(size = 20, prob = 0.5))
 minimal asym. total variation distance 
-                             0.3742073 
+                             0.3742072 
 > 
 > 
 > 
@@ -1635,7 +1635,7 @@
 > cleanEx()
 > options(digits = 7L)
 > base::cat("Time elapsed: ", proc.time() - base::get("ptime", pos = 'CheckExEnv'),"\n")
-Time elapsed:  7.06 0.33 7.42 NA NA 
+Time elapsed:  8.72 0.42 9.28 NA NA 
 > grDevices::dev.off()
 null device 
           1 



More information about the Distr-commits mailing list