[Distr-commits] r1131 - branches/distr-2.7/pkg/distr branches/distr-2.7/pkg/distr/R branches/distr-2.7/pkg/distr/demo branches/distr-2.7/pkg/distr/man branches/distr-2.7/pkg/distr/src branches/distr-2.7/pkg/distr/vignettes branches/distr-2.7/pkg/distrDoc/vignettes branches/distr-2.7/pkg/distrEllipse/man branches/distr-2.7/pkg/distrEx branches/distr-2.7/pkg/distrEx/R branches/distr-2.7/pkg/distrEx/man branches/distr-2.7/pkg/distrEx/src branches/distr-2.7/pkg/distrMod/man branches/distr-2.7/pkg/distrMod/vignettes branches/distr-2.7/pkg/distrRmetrics/man branches/distr-2.7/pkg/distrSim/man branches/distr-2.7/pkg/distrTeach/man branches/distr-2.7/pkg/utils pkg/distr pkg/distr/R pkg/distr/demo pkg/distr/man pkg/distr/src pkg/distr/vignettes

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Apr 20 22:45:25 CEST 2017


Author: ruckdeschel
Date: 2017-04-20 22:45:25 +0200 (Thu, 20 Apr 2017)
New Revision: 1131

Added:
   branches/distr-2.7/pkg/distr/src/distr.h
   branches/distr-2.7/pkg/distr/src/init.c
   pkg/distr/src/distr.h
   pkg/distr/src/init.c
Modified:
   branches/distr-2.7/pkg/distr/NAMESPACE
   branches/distr-2.7/pkg/distr/R/Convpow.R
   branches/distr-2.7/pkg/distr/R/flat.R
   branches/distr-2.7/pkg/distr/R/internals-qqplot.R
   branches/distr-2.7/pkg/distr/demo/nFoldConvolution.R
   branches/distr-2.7/pkg/distr/man/0distr-package.Rd
   branches/distr-2.7/pkg/distr/man/sqrt-methods.Rd
   branches/distr-2.7/pkg/distr/src/ks.c
   branches/distr-2.7/pkg/distr/vignettes/newDistributions.Rnw
   branches/distr-2.7/pkg/distrDoc/vignettes/distr.Rnw
   branches/distr-2.7/pkg/distrEllipse/man/0distrEllipse-package.Rd
   branches/distr-2.7/pkg/distrEx/NAMESPACE
   branches/distr-2.7/pkg/distrEx/R/distrExIntegrate.R
   branches/distr-2.7/pkg/distrEx/man/0distrEx-package.Rd
   branches/distr-2.7/pkg/distrEx/src/GLaw.c
   branches/distr-2.7/pkg/distrMod/man/0distrMod-package.Rd
   branches/distr-2.7/pkg/distrMod/man/returnlevelplot.Rd
   branches/distr-2.7/pkg/distrMod/vignettes/distrMod.Rnw
   branches/distr-2.7/pkg/distrRmetrics/man/0distrRmetrics-package.Rd
   branches/distr-2.7/pkg/distrSim/man/0distrSim-package.Rd
   branches/distr-2.7/pkg/distrTeach/man/0distrTeach-package.Rd
   branches/distr-2.7/pkg/utils/finde.R
   pkg/distr/DESCRIPTION
   pkg/distr/R/Convpow.R
   pkg/distr/R/flat.R
   pkg/distr/R/internals-qqplot.R
   pkg/distr/demo/nFoldConvolution.R
   pkg/distr/man/0distr-package.Rd
   pkg/distr/man/sqrt-methods.Rd
   pkg/distr/src/ks.c
   pkg/distr/vignettes/newDistributions.Rnw
Log:
some fixes after a mail by K. Hornik:
distr (in branch and in trunk): registered native code; fixed usage issue with sqrt, fixed http(s)-warning; fixed [[]] issue in flat.R 
distrEx (in branch only): registered native code; 
all (in branch only) fixed http(s) code 

Modified: branches/distr-2.7/pkg/distr/NAMESPACE
===================================================================
--- branches/distr-2.7/pkg/distr/NAMESPACE	2016-10-24 17:40:00 UTC (rev 1130)
+++ branches/distr-2.7/pkg/distr/NAMESPACE	2017-04-20 20:45:25 UTC (rev 1131)
@@ -1,4 +1,4 @@
-useDynLib("distr")
+useDynLib("distr", .registration = TRUE, .fixes = "C_")
 import("methods")
 import("stats")
 importFrom("grDevices", "dev.list", "dev.new", "xy.coords")

Modified: branches/distr-2.7/pkg/distr/R/Convpow.R
===================================================================
--- branches/distr-2.7/pkg/distr/R/Convpow.R	2016-10-24 17:40:00 UTC (rev 1130)
+++ branches/distr-2.7/pkg/distr/R/Convpow.R	2017-04-20 20:45:25 UTC (rev 1131)
@@ -4,14 +4,9 @@
 ##########################################################
 
 ##implentation of Algorithm 3.4. of
-# Kohl, M., Ruckdeschel, P., Stabla, T. (2005):
-#   General purpose convolution algorithm for distributions
-#   in S4-Classes by means of FFT.
-# Technical report, Feb. 2005. Also available in
-# http://www.uni-bayreuth.de/departments/math/org/mathe7/
-#       /RUCKDESCHEL/pubs/comp.pdf
+#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){

Modified: branches/distr-2.7/pkg/distr/R/flat.R
===================================================================
--- branches/distr-2.7/pkg/distr/R/flat.R	2016-10-24 17:40:00 UTC (rev 1130)
+++ branches/distr-2.7/pkg/distr/R/flat.R	2017-04-20 20:45:25 UTC (rev 1131)
@@ -95,8 +95,8 @@
     for(i in seq(length(mixDistr)))
         {if ( is(mixDistr[[i]],"UnivarMixingDistribution") &&
              !is(mixDistr[[i]],"UnivarLebDecDistribution"))
-             mixDistr2[i] <- flat.mix(mixDistr[[i]])
-         else mixDistr2[i] <- as(mixDistr[[i]],"UnivarLebDecDistribution")
+             mixDistr2[[i]] <- flat.mix(mixDistr[[i]])
+         else mixDistr2[[i]] <- as(mixDistr[[i]],"UnivarLebDecDistribution")
          }
     erg <- do.call(flat.LCD, c(mixDistr2, alist(mixCoeff = mixCoeff)))
     simplifyD(erg)

Modified: branches/distr-2.7/pkg/distr/R/internals-qqplot.R
===================================================================
--- branches/distr-2.7/pkg/distr/R/internals-qqplot.R	2016-10-24 17:40:00 UTC (rev 1130)
+++ branches/distr-2.7/pkg/distr/R/internals-qqplot.R	2017-04-20 20:45:25 UTC (rev 1131)
@@ -86,13 +86,16 @@
                  .C("pkolmogorov2x", p = as.double(p0),
                      as.integer(n), PACKAGE = "stats")$p
         }else function(p0,n){
-                 .Call("pKolmogorov2x", p0, n) #, PACKAGE = "stats")
+                 .Call(C_pKolmogorov2x, #"pKolmogorov2x",
+                       p0, n) #, PACKAGE = "stats")
         }
 .pks2 <- if(getRversion()<"2.16.0") function(x, tol){
-                 .C("pkstwo", as.integer(1),
+                 .C("pkstwo",
+                    as.integer(1),
                     p = as.double(x), as.double(tol), PACKAGE = "stats")$p
         }else function(x, tol){
-                 .Call("pKS2", p = x, tol) #, PACKAGE = "stats")
+                 .Call(C_pKS2, #"pKS2",
+                       p = x, tol) #, PACKAGE = "stats")
         }
 
 

Modified: branches/distr-2.7/pkg/distr/demo/nFoldConvolution.R
===================================================================
--- branches/distr-2.7/pkg/distr/demo/nFoldConvolution.R	2016-10-24 17:40:00 UTC (rev 1130)
+++ branches/distr-2.7/pkg/distr/demo/nFoldConvolution.R	2017-04-20 20:45:25 UTC (rev 1131)
@@ -17,13 +17,9 @@
 ## -- absolute continuous distribution -- 
 ##########################################################
 
-##implentation of Algorithm 3.4. of 
-# Kohl, M., Ruckdeschel, P., Stabla, T. (2005): 
-#   General purpose convolution algorithm for distributions 
-#   in S4-Classes by means of FFT.
-# Technical report, Feb. 2005. Also available in
-# http://www.uni-bayreuth.de/departments/math/org/mathe7/
-#       /RUCKDESCHEL/pubs/comp.pdf
+##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",

Modified: branches/distr-2.7/pkg/distr/man/0distr-package.Rd
===================================================================
--- branches/distr-2.7/pkg/distr/man/0distr-package.Rd	2016-10-24 17:40:00 UTC (rev 1130)
+++ branches/distr-2.7/pkg/distr/man/0distr-package.Rd	2017-04-20 20:45:25 UTC (rev 1131)
@@ -3,7 +3,7 @@
 \alias{distr}
 \docType{package}
 \title{
-distr -- Object Orientated Implementation of Distributions
+distr -- Object Oriented Implementation of Distributions
 }
 \description{
 \pkg{distr} provides a conceptual treatment of distributions by means of S4
@@ -335,7 +335,7 @@
 \references{
 P. Ruckdeschel, M. Kohl, T. Stabla, F. Camphausen (2006):
 S4 Classes for Distributions, \emph{R News}, \emph{6}(2), 2-6.
-\url{http://CRAN.R-project.org/doc/Rnews/Rnews_2006-2.pdf}
+\url{https://CRAN.R-project.org/doc/Rnews/Rnews_2006-2.pdf}
 
 P. Ruckdeschel and M. Kohl (2014):
    General purpose convolution algorithm for distributions

Modified: branches/distr-2.7/pkg/distr/man/sqrt-methods.Rd
===================================================================
--- branches/distr-2.7/pkg/distr/man/sqrt-methods.Rd	2016-10-24 17:40:00 UTC (rev 1130)
+++ branches/distr-2.7/pkg/distr/man/sqrt-methods.Rd	2017-04-20 20:45:25 UTC (rev 1131)
@@ -6,7 +6,7 @@
 \title{ Methods for Function sqrt in Package `distr' }
 \description{sqrt-methods using generalized inverses for p.s.d. matrices}
 
-\usage{sqrt(x)
+\usage{
 \S4method{sqrt}{PosSemDefSymmMatrix}(x)
 }
 \arguments{
@@ -18,7 +18,7 @@
 }}
 \author{Peter Ruckdeschel \email{peter.ruckdeschel at uni-oldenburg.de}}
 \seealso{
-\code{\link{solve}} }
+\code{\link{solve}}}
 \keyword{algebra}
 \keyword{array}
 \concept{pseudo inverse}

Added: branches/distr-2.7/pkg/distr/src/distr.h
===================================================================
--- branches/distr-2.7/pkg/distr/src/distr.h	                        (rev 0)
+++ branches/distr-2.7/pkg/distr/src/distr.h	2017-04-20 20:45:25 UTC (rev 1131)
@@ -0,0 +1,30 @@
+/*
+ * taken from R Core: /src/library/stats/src/init.c rev72233
+ * with slight modifications by P. Ruckdeschel 2017-04-20
+ */  
+
+/*
+ *  R : A Computer Language for Statistical Data Analysis
+ *  Copyright (C) 2012   The R Core Team.
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, a copy is available at
+ *  https://www.R-project.org/Licenses/
+ */
+
+#include <R.h>
+#include <Rinternals.h>
+
+SEXP pSmirnov2x(SEXP statistic, SEXP snx, SEXP sny);
+SEXP pKolmogorov2x(SEXP statistic, SEXP sn);
+SEXP pKS2(SEXP sn, SEXP stol);

Added: branches/distr-2.7/pkg/distr/src/init.c
===================================================================
--- branches/distr-2.7/pkg/distr/src/init.c	                        (rev 0)
+++ branches/distr-2.7/pkg/distr/src/init.c	2017-04-20 20:45:25 UTC (rev 1131)
@@ -0,0 +1,46 @@
+/*
+ * taken from R Core: /src/library/stats/src/init.c rev72233
+ * with slight modifications by P. Ruckdeschel 2017-04-20
+ */  
+
+ /*
+ *  R : A Computer Language for Statistical Data Analysis
+ *  Copyright (C) 2001-2017   The R Core Team.
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, a copy is available at
+ *  https://www.R-project.org/Licenses/
+ */
+
+#include <stdlib.h>
+#include <R_ext/Rdynload.h>
+#include <R_ext/Visibility.h>
+#include "distr.h"
+
+#define CALLDEF(name, n)  {#name, (DL_FUNC) &name, n}
+
+
+static const R_CallMethodDef R_CallDef[] = {
+    CALLDEF(pSmirnov2x, 3),
+    CALLDEF(pKolmogorov2x, 2),
+    CALLDEF(pKS2, 2),
+    {NULL, NULL, 0}
+};
+
+void attribute_visible R_init_distr(DllInfo *dll)
+{
+    R_registerRoutines(dll, NULL, R_CallDef, NULL, NULL);
+    R_useDynamicSymbols(dll, FALSE);
+    R_forceSymbols(dll, TRUE);
+
+}

Modified: branches/distr-2.7/pkg/distr/src/ks.c
===================================================================
--- branches/distr-2.7/pkg/distr/src/ks.c	2016-10-24 17:40:00 UTC (rev 1130)
+++ branches/distr-2.7/pkg/distr/src/ks.c	2017-04-20 20:45:25 UTC (rev 1131)
@@ -29,6 +29,7 @@
 #include <R.h>
 #include <Rinternals.h>
 #include <Rmath.h>		/* constants */
+#include <R_ext/Visibility.h>
 
 static double K(int n, double d);
 static void m_multiply(double *A, double *B, double *C, int m);
@@ -245,7 +246,7 @@
 }
 
 /* Two-sided two-sample */
-SEXP pSmirnov2x(SEXP statistic, SEXP snx, SEXP sny)
+SEXP attribute_hidden pSmirnov2x(SEXP statistic, SEXP snx, SEXP sny)
 {
     int nx = asInteger(snx), ny = asInteger(sny);
     double st = asReal(statistic);
@@ -253,7 +254,7 @@
 }
 
 /* Two-sample two-sided asymptotic distribution */
-SEXP pKS2(SEXP statistic, SEXP stol)
+SEXP attribute_hidden pKS2(SEXP statistic, SEXP stol)
 {
     int n = LENGTH(statistic);
     double tol = asReal(stol);
@@ -264,7 +265,7 @@
 
 
 /* The two-sided one-sample 'exact' distribution */
-SEXP pKolmogorov2x(SEXP statistic, SEXP sn)
+SEXP attribute_hidden pKolmogorov2x(SEXP statistic, SEXP sn)
 {
     int n = asInteger(sn);
     double st = asReal(statistic), p;

Modified: branches/distr-2.7/pkg/distr/vignettes/newDistributions.Rnw
===================================================================
--- branches/distr-2.7/pkg/distr/vignettes/newDistributions.Rnw	2016-10-24 17:40:00 UTC (rev 1130)
+++ branches/distr-2.7/pkg/distr/vignettes/newDistributions.Rnw	2017-04-20 20:45:25 UTC (rev 1131)
@@ -203,7 +203,7 @@
 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{http://cran.r-project.org}{\tt CRAN} package), 
+\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}.
@@ -399,7 +399,7 @@
 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 http://CRAN.R-project.org/doc/Rnews/Rnews\_2006-2.pdf
+\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}

Modified: branches/distr-2.7/pkg/distrDoc/vignettes/distr.Rnw
===================================================================
--- branches/distr-2.7/pkg/distrDoc/vignettes/distr.Rnw	2016-10-24 17:40:00 UTC (rev 1130)
+++ branches/distr-2.7/pkg/distrDoc/vignettes/distr.Rnw	2017-04-20 20:45:25 UTC (rev 1131)
@@ -178,7 +178,7 @@
 \pkg{RobExtremes}. This concerns the Gumbel, Weibull, Pareto distributions.
 %\noindent The latter two of them require package \pkg{setRNG} by 
 %\href{mailto:pgilbert at bank-banque-canada.ca}{Paul Gilbert}
-%to be installed from \href{http://cran.r-project.org/mirrors.html}{\tt CRAN}. 
+%to be installed from \href{https://cran.r-project.org/mirrors.html}{\tt CRAN}.
 % \\
 
 %\noindent Additionally, mainly contributed by \cite{MK:05}, in \pkg{distrEx} we 
@@ -2765,7 +2765,7 @@
 In package \pkg{distrSim}, and conseqently also in package \pkg{distrTEst} we 
 use \href{mailto:pgilbert at bank-banque-canada.ca}{Paul Gilbert's}  
 package \pkg{setRNG}
-to be installed from \href{http://cran.r-project.org/mirrors.html}{\tt CRAN}
+to be installed from \href{https://cran.r-project.org/mirrors.html}{\tt CRAN}
 for the control of the seed of the random number generator in our simulation 
 classes.
 More precisely, for our version $\le$ {\tt 1.6}  we need his
@@ -2774,7 +2774,7 @@
 
 From package version {\tt 1.7}/{\tt 0.4-3} on, we also need package
  \pkg{startupmsg} by the first of the present authors, which also is available 
- on \href{http://cran.r-project.org/mirrors.html}{\tt CRAN}.
+ on \href{https://cran.r-project.org/mirrors.html}{\tt CRAN}.
 
 \subsection{License}
 This software is distributed under the terms of the GNU GENERAL
@@ -3626,7 +3626,7 @@
 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 http://CRAN.R-project.org/doc/Rnews/Rnews\_2006-2.pdf
+\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}

Modified: branches/distr-2.7/pkg/distrEllipse/man/0distrEllipse-package.Rd
===================================================================
--- branches/distr-2.7/pkg/distrEllipse/man/0distrEllipse-package.Rd	2016-10-24 17:40:00 UTC (rev 1130)
+++ branches/distr-2.7/pkg/distrEllipse/man/0distrEllipse-package.Rd	2017-04-20 20:45:25 UTC (rev 1131)
@@ -101,7 +101,7 @@
 \references{
 P. Ruckdeschel, M. Kohl, T. Stabla, F. Camphausen (2006):
 S4 Classes for Distributions, \emph{R News}, \emph{6}(2), 2-6. 
-\url{http://CRAN.R-project.org/doc/Rnews/Rnews_2006-2.pdf}
+\url{https://CRAN.R-project.org/doc/Rnews/Rnews_2006-2.pdf}
 
 A vignette for packages \pkg{distr}, \pkg{distrSim}, \pkg{distrTEst}, \pkg{distrEx},
 \pkg{distrTeach}, \pkg{distrMod}, and \pkg{distrEllipse}

Modified: branches/distr-2.7/pkg/distrEx/NAMESPACE
===================================================================
--- branches/distr-2.7/pkg/distrEx/NAMESPACE	2016-10-24 17:40:00 UTC (rev 1130)
+++ branches/distr-2.7/pkg/distrEx/NAMESPACE	2017-04-20 20:45:25 UTC (rev 1131)
@@ -1,4 +1,4 @@
-useDynLib("distrEx")
+useDynLib("distrEx", .registration = TRUE, .fixes = "C_")
 importFrom("stats", "dnorm", "integrate", "optimize", "pbinom",
              "pchisq", "pexp", "pnorm", "ppois", "qcauchy", "qnorm",
              "uniroot")

Modified: branches/distr-2.7/pkg/distrEx/R/distrExIntegrate.R
===================================================================
--- branches/distr-2.7/pkg/distrEx/R/distrExIntegrate.R	2016-10-24 17:40:00 UTC (rev 1130)
+++ branches/distr-2.7/pkg/distrEx/R/distrExIntegrate.R	2017-04-20 20:45:25 UTC (rev 1131)
@@ -40,9 +40,10 @@
     W <- numeric(n)
 
 #    mm<-dyn.load("G:/rtest/GLaw.dll")
-    erg<-.C("gauleg",n = as.integer(n),eps = as.double(.Machine$double.eps),
-             A = as.double(A),W = as.double(W), PACKAGE = "distrEx") 
+    erg<-.C(C_gauleg,n = as.integer(n),eps = as.double(.Machine$double.eps),
+             A = as.double(A),W = as.double(W)) #, PACKAGE = "distrEx")
               ### PACKAGE ARGUMENT added P.R. 270507
+              #### removed again 200417 /  used registered symbol instead
 #    dyn.unload("G:/rtest/GLaw.dll")
 #
 # P.R. 20140810: .Call interface instead of .C interface

Modified: branches/distr-2.7/pkg/distrEx/man/0distrEx-package.Rd
===================================================================
--- branches/distr-2.7/pkg/distrEx/man/0distrEx-package.Rd	2016-10-24 17:40:00 UTC (rev 1130)
+++ branches/distr-2.7/pkg/distrEx/man/0distrEx-package.Rd	2017-04-20 20:45:25 UTC (rev 1131)
@@ -222,7 +222,7 @@
 \references{
 P. Ruckdeschel, M. Kohl, T. Stabla, F. Camphausen (2006):
 S4 Classes for Distributions, \emph{R News}, \emph{6}(2), 2-6. 
-\url{http://CRAN.R-project.org/doc/Rnews/Rnews_2006-2.pdf}
+\url{https://CRAN.R-project.org/doc/Rnews/Rnews_2006-2.pdf}
 
 %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}\cr

Modified: branches/distr-2.7/pkg/distrEx/src/GLaw.c
===================================================================
--- branches/distr-2.7/pkg/distrEx/src/GLaw.c	2016-10-24 17:40:00 UTC (rev 1130)
+++ branches/distr-2.7/pkg/distrEx/src/GLaw.c	2017-04-20 20:45:25 UTC (rev 1131)
@@ -3,8 +3,12 @@
 #include <R.h>
 #include <Rinternals.h>
 #include <Rmath.h>		/* constants */
+#include <R_ext/Rdynload.h>
+#include <R_ext/Visibility.h>
 
-void gauleg(int *n, double *eps, double *A, double *W)
+#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++){
         z=cos(PI*(i-0.25)/((*n)+0.5));
@@ -26,6 +30,21 @@
     }
 }
 
+/* P.R. 20170427: register routine */
+
+static const R_CMethodDef R_CDef[]  = {
+    C_DEF(gauleg, 4),
+    {NULL, NULL, 0}
+};
+
+void attribute_visible R_init_distrEx(DllInfo *dll)
+{
+    R_registerRoutines(dll, R_CDef, NULL, NULL, NULL);
+    R_useDynamicSymbols(dll, FALSE);
+    R_forceSymbols(dll, TRUE);
+
+}
+
 /* P.R. 20140810: Yet to be tested: preparation for .Call - interface
 
 SEXP Gauleg(SEXP nFromR, SEXP epsFromR)

Modified: branches/distr-2.7/pkg/distrMod/man/0distrMod-package.Rd
===================================================================
--- branches/distr-2.7/pkg/distrMod/man/0distrMod-package.Rd	2016-10-24 17:40:00 UTC (rev 1130)
+++ branches/distr-2.7/pkg/distrMod/man/0distrMod-package.Rd	2017-04-20 20:45:25 UTC (rev 1131)
@@ -297,7 +297,7 @@
 
 P. Ruckdeschel, M. Kohl, T. Stabla, F. Camphausen (2006):
 S4 Classes for Distributions, \emph{R News}, \emph{6}(2), 2-6.
-\url{http://CRAN.R-project.org/doc/Rnews/Rnews_2006-2.pdf}
+\url{https://CRAN.R-project.org/doc/Rnews/Rnews_2006-2.pdf}
 
 A vignette for packages \pkg{distr}, \pkg{distrSim}, \pkg{distrTEst}, and
 \pkg{distrEx} is included into the mere documentation package \pkg{distrDoc}

Modified: branches/distr-2.7/pkg/distrMod/man/returnlevelplot.Rd
===================================================================
--- branches/distr-2.7/pkg/distrMod/man/returnlevelplot.Rd	2016-10-24 17:40:00 UTC (rev 1130)
+++ branches/distr-2.7/pkg/distrMod/man/returnlevelplot.Rd	2017-04-20 20:45:25 UTC (rev 1131)
@@ -201,7 +201,7 @@
 }
 \references{
   ismev: An   Introduction to Statistical Modeling of Extreme Values. R package
-  version 1.39. http://CRAN.R-project.org/package=ismev; original S functions
+  version 1.39. https://CRAN.R-project.org/package=ismev; original S functions
   written by Janet E. Heffernan with R port and R documentation provided by
   Alec G. Stephenson. (2012).
 

Modified: branches/distr-2.7/pkg/distrMod/vignettes/distrMod.Rnw
===================================================================
--- branches/distr-2.7/pkg/distrMod/vignettes/distrMod.Rnw	2016-10-24 17:40:00 UTC (rev 1130)
+++ branches/distr-2.7/pkg/distrMod/vignettes/distrMod.Rnw	2017-04-20 20:45:25 UTC (rev 1131)
@@ -160,7 +160,7 @@
 
 \textbf{Availability } The current version of package~\pkg{distrMod} is 2.2
 and can be found on the Comprehensive \proglang{R} Archive Network at 
-\url{http://CRAN.R-project.org/package=distrMod}. The development version of the distr-family is located at R-Forge; 
+\url{https://CRAN.R-project.org/package=distrMod}. The development version of the distr-family is located at R-Forge;
 see~\citet{RForge}.
 % -----------------------------------------------------------------------------
 \subsection{Running examples}\label{examples}
@@ -350,7 +350,7 @@
 
 \textbf{Packages \pkg{distr} and \pkg{distrEx} } Much of our infrastructure
 relies on our \proglang{R} packages \pkg{distr} and \pkg{distrEx} available on
-\href{http://cran.r-project.org/}{\tt CRAN}.
+\href{https://cran.r-project.org/}{\tt CRAN}.
 Package \pkg{distr}, see~\citet{distr,distrTeach}, aims to provide a conceptual
 treatment of distributions by means of \proglang{S}4 classes. A mother class 
 \code{Distribution} is introduced with slots for a parameter and for functions 

Modified: branches/distr-2.7/pkg/distrRmetrics/man/0distrRmetrics-package.Rd
===================================================================
--- branches/distr-2.7/pkg/distrRmetrics/man/0distrRmetrics-package.Rd	2016-10-24 17:40:00 UTC (rev 1130)
+++ branches/distr-2.7/pkg/distrRmetrics/man/0distrRmetrics-package.Rd	2017-04-20 20:45:25 UTC (rev 1131)
@@ -88,7 +88,7 @@
 \references{
 P. Ruckdeschel, M. Kohl, T. Stabla, F. Camphausen (2006):
 S4 Classes for Distributions, \emph{R News}, \emph{6}(2), 2-6. 
-\url{http://CRAN.R-project.org/doc/Rnews/Rnews_2006-2.pdf}
+\url{https://CRAN.R-project.org/doc/Rnews/Rnews_2006-2.pdf}
 
 A vignette for packages \pkg{distr}, \pkg{distrSim}, \pkg{distrTEst}, \pkg{distrEx},
 \pkg{distrTeach}, \pkg{distrMod}, and \pkg{distrRmetrics}

Modified: branches/distr-2.7/pkg/distrSim/man/0distrSim-package.Rd
===================================================================
--- branches/distr-2.7/pkg/distrSim/man/0distrSim-package.Rd	2016-10-24 17:40:00 UTC (rev 1130)
+++ branches/distr-2.7/pkg/distrSim/man/0distrSim-package.Rd	2017-04-20 20:45:25 UTC (rev 1131)
@@ -117,7 +117,7 @@
 \references{
 P. Ruckdeschel, M. Kohl, T. Stabla, F. Camphausen (2006):
 S4 Classes for Distributions, \emph{R News}, \emph{6}(2), 2-6. 
-\url{http://CRAN.R-project.org/doc/Rnews/Rnews_2006-2.pdf}
+\url{https://CRAN.R-project.org/doc/Rnews/Rnews_2006-2.pdf}
 
 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 

Modified: branches/distr-2.7/pkg/distrTeach/man/0distrTeach-package.Rd
===================================================================
--- branches/distr-2.7/pkg/distrTeach/man/0distrTeach-package.Rd	2016-10-24 17:40:00 UTC (rev 1130)
+++ branches/distr-2.7/pkg/distrTeach/man/0distrTeach-package.Rd	2017-04-20 20:45:25 UTC (rev 1131)
@@ -103,7 +103,7 @@
 \references{
 P. Ruckdeschel, M. Kohl, T. Stabla, F. Camphausen (2006):
 S4 Classes for Distributions, \emph{R News}, \emph{6}(2), 2-6. 
-\url{http://CRAN.R-project.org/doc/Rnews/Rnews_2006-2.pdf}
+\url{https://CRAN.R-project.org/doc/Rnews/Rnews_2006-2.pdf}
 
 %a more detailed manual for \pkg{distr}, \pkg{distrSim}, \pkg{distrTEst}, and \pkg{distrTeach} may be downloaded from  
 %\url{http://www.uni-bayreuth.de/departments/math/org/mathe7/DISTR/distr.pdf}\cr

Modified: branches/distr-2.7/pkg/utils/finde.R
===================================================================
--- branches/distr-2.7/pkg/utils/finde.R	2016-10-24 17:40:00 UTC (rev 1130)
+++ branches/distr-2.7/pkg/utils/finde.R	2017-04-20 20:45:25 UTC (rev 1131)
@@ -20,7 +20,9 @@
   }
 infind(dir)   
 }
+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="roptest\\(", dir ="C:/rtest/robast/branches/robast-0.9/pkg/ROptEst/", rec=TRUE)

Modified: pkg/distr/DESCRIPTION
===================================================================
--- pkg/distr/DESCRIPTION	2016-10-24 17:40:00 UTC (rev 1130)
+++ pkg/distr/DESCRIPTION	2017-04-20 20:45:25 UTC (rev 1131)
@@ -1,6 +1,6 @@
 Package: distr
-Version: 2.6
-Date: 2016-04-23
+Version: 2.6.1
+Date: 2017-04-21
 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

Modified: pkg/distr/R/Convpow.R
===================================================================
--- pkg/distr/R/Convpow.R	2016-10-24 17:40:00 UTC (rev 1130)
+++ pkg/distr/R/Convpow.R	2017-04-20 20:45:25 UTC (rev 1131)
@@ -4,14 +4,9 @@
 ##########################################################
 
 ##implentation of Algorithm 3.4. of
-# Kohl, M., Ruckdeschel, P., Stabla, T. (2005):
-#   General purpose convolution algorithm for distributions
-#   in S4-Classes by means of FFT.
-# Technical report, Feb. 2005. Also available in
-# http://www.uni-bayreuth.de/departments/math/org/mathe7/
-#       /RUCKDESCHEL/pubs/comp.pdf
+#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){

Modified: pkg/distr/R/flat.R
===================================================================
--- pkg/distr/R/flat.R	2016-10-24 17:40:00 UTC (rev 1130)
+++ pkg/distr/R/flat.R	2017-04-20 20:45:25 UTC (rev 1131)
@@ -95,8 +95,8 @@
     for(i in seq(length(mixDistr)))
         {if ( is(mixDistr[[i]],"UnivarMixingDistribution") &&
              !is(mixDistr[[i]],"UnivarLebDecDistribution"))
-             mixDistr2[i] <- flat.mix(mixDistr[[i]])
-         else mixDistr2[i] <- as(mixDistr[[i]],"UnivarLebDecDistribution")
+             mixDistr2[[i]] <- flat.mix(mixDistr[[i]])
+         else mixDistr2[[i]] <- as(mixDistr[[i]],"UnivarLebDecDistribution")
          }
     erg <- do.call(flat.LCD, c(mixDistr2, alist(mixCoeff = mixCoeff)))
     simplifyD(erg)

Modified: pkg/distr/R/internals-qqplot.R
===================================================================
--- pkg/distr/R/internals-qqplot.R	2016-10-24 17:40:00 UTC (rev 1130)
+++ pkg/distr/R/internals-qqplot.R	2017-04-20 20:45:25 UTC (rev 1131)
@@ -86,13 +86,16 @@
                  .C("pkolmogorov2x", p = as.double(p0),
                      as.integer(n), PACKAGE = "stats")$p
         }else function(p0,n){
-                 .Call("pKolmogorov2x", p0, n) #, PACKAGE = "stats")
+                 .Call(C_pKolmogorov2x, #"pKolmogorov2x",
+                       p0, n) #, PACKAGE = "stats")
         }
 .pks2 <- if(getRversion()<"2.16.0") function(x, tol){
-                 .C("pkstwo", as.integer(1),
+                 .C("pkstwo",
+                    as.integer(1),
                     p = as.double(x), as.double(tol), PACKAGE = "stats")$p
         }else function(x, tol){
-                 .Call("pKS2", p = x, tol) #, PACKAGE = "stats")
+                 .Call(C_pKS2, #"pKS2",
+                       p = x, tol) #, PACKAGE = "stats")
         }
 
 

Modified: pkg/distr/demo/nFoldConvolution.R
===================================================================
--- pkg/distr/demo/nFoldConvolution.R	2016-10-24 17:40:00 UTC (rev 1130)
+++ pkg/distr/demo/nFoldConvolution.R	2017-04-20 20:45:25 UTC (rev 1131)
@@ -17,13 +17,9 @@
 ## -- absolute continuous distribution -- 
 ##########################################################
 
-##implentation of Algorithm 3.4. of 
-# Kohl, M., Ruckdeschel, P., Stabla, T. (2005): 
-#   General purpose convolution algorithm for distributions 
-#   in S4-Classes by means of FFT.
-# Technical report, Feb. 2005. Also available in
-# http://www.uni-bayreuth.de/departments/math/org/mathe7/
-#       /RUCKDESCHEL/pubs/comp.pdf
+##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",

Modified: pkg/distr/man/0distr-package.Rd
===================================================================
--- pkg/distr/man/0distr-package.Rd	2016-10-24 17:40:00 UTC (rev 1130)
+++ pkg/distr/man/0distr-package.Rd	2017-04-20 20:45:25 UTC (rev 1131)
@@ -3,7 +3,7 @@
 \alias{distr}
 \docType{package}
 \title{
-distr -- Object Orientated Implementation of Distributions
+distr -- Object Oriented Implementation of Distributions
 }
 \description{
 \pkg{distr} provides a conceptual treatment of distributions by means of S4
@@ -43,15 +43,15 @@
 \details{
 \tabular{ll}{
 Package: \tab distr \cr
-Version: \tab 2.6 \cr
-Date: \tab 2016-04-23 \cr
+Version: \tab 2.7 \cr
+Date: \tab 2015-11-07 \cr
 Depends: \tab R(>= 2.14.0), methods, graphics, startupmsg, sfsmisc, SweaveListingUtils \cr
 Suggests: \tab distrEx, svUnit (>= 0.7-11) \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
-SVNRevision: \tab 1088 \cr
+SVNRevision: \tab 1080 \cr
 }}
 
 
@@ -335,7 +335,7 @@
 \references{
 P. Ruckdeschel, M. Kohl, T. Stabla, F. Camphausen (2006):
 S4 Classes for Distributions, \emph{R News}, \emph{6}(2), 2-6.
-\url{http://CRAN.R-project.org/doc/Rnews/Rnews_2006-2.pdf}
+\url{https://CRAN.R-project.org/doc/Rnews/Rnews_2006-2.pdf}
 
 P. Ruckdeschel and M. Kohl (2014):
    General purpose convolution algorithm for distributions

Modified: pkg/distr/man/sqrt-methods.Rd
===================================================================
--- pkg/distr/man/sqrt-methods.Rd	2016-10-24 17:40:00 UTC (rev 1130)
+++ pkg/distr/man/sqrt-methods.Rd	2017-04-20 20:45:25 UTC (rev 1131)
@@ -6,7 +6,7 @@
 \title{ Methods for Function sqrt in Package `distr' }
 \description{sqrt-methods using generalized inverses for p.s.d. matrices}
 
-\usage{sqrt(x)
+\usage{
 \S4method{sqrt}{PosSemDefSymmMatrix}(x)
 }
 \arguments{
@@ -18,7 +18,7 @@
 }}
 \author{Peter Ruckdeschel \email{peter.ruckdeschel at uni-oldenburg.de}}
 \seealso{
-\code{\link{solve}} }
+\code{\link{solve}}}
 \keyword{algebra}
 \keyword{array}
 \concept{pseudo inverse}

Added: pkg/distr/src/distr.h
===================================================================
--- pkg/distr/src/distr.h	                        (rev 0)
+++ pkg/distr/src/distr.h	2017-04-20 20:45:25 UTC (rev 1131)
@@ -0,0 +1,30 @@
+/*
+ * taken from R Core: /src/library/stats/src/init.c rev72233
+ * with slight modifications by P. Ruckdeschel 2017-04-20
+ */  
+
+/*
+ *  R : A Computer Language for Statistical Data Analysis
+ *  Copyright (C) 2012   The R Core Team.
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, a copy is available at
+ *  https://www.R-project.org/Licenses/
+ */
+
+#include <R.h>
+#include <Rinternals.h>
+
+SEXP pSmirnov2x(SEXP statistic, SEXP snx, SEXP sny);
+SEXP pKolmogorov2x(SEXP statistic, SEXP sn);
+SEXP pKS2(SEXP sn, SEXP stol);

Added: pkg/distr/src/init.c
===================================================================
--- pkg/distr/src/init.c	                        (rev 0)
+++ pkg/distr/src/init.c	2017-04-20 20:45:25 UTC (rev 1131)
@@ -0,0 +1,46 @@
+/*
+ * taken from R Core: /src/library/stats/src/init.c rev72233
+ * with slight modifications by P. Ruckdeschel 2017-04-20
+ */  
+
+ /*
+ *  R : A Computer Language for Statistical Data Analysis
+ *  Copyright (C) 2001-2017   The R Core Team.
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, a copy is available at
+ *  https://www.R-project.org/Licenses/
+ */
+
+#include <stdlib.h>
+#include <R_ext/Rdynload.h>
+#include <R_ext/Visibility.h>
+#include "distr.h"
+
+#define CALLDEF(name, n)  {#name, (DL_FUNC) &name, n}
+
+
+static const R_CallMethodDef R_CallDef[] = {
+    CALLDEF(pSmirnov2x, 3),
+    CALLDEF(pKolmogorov2x, 2),
+    CALLDEF(pKS2, 2),
+    {NULL, NULL, 0}
+};
+
+void attribute_visible R_init_distr(DllInfo *dll)
+{
+    R_registerRoutines(dll, NULL, R_CallDef, NULL, NULL);
+    R_useDynamicSymbols(dll, FALSE);
+    R_forceSymbols(dll, TRUE);
+
+}

Modified: pkg/distr/src/ks.c
===================================================================
[TRUNCATED]

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


More information about the Distr-commits mailing list