Skip to content

Commit d99f451

Browse files
committed
with R >= 3.1.2 the R::[dpqr]nbinom_mu functions are now available
1 parent 8ddc3fa commit d99f451

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

ChangeLog

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
2014-11-02 Dirk Eddelbuettel <edd@debian.org>
2+
3+
* inst/include/Rcpp/Rmath.h: As suggested by Kevin, test for R_VERSION
4+
via #define to conditon on R >= 3.1.2 -- this does not require a hard
5+
constraint in DESCRIPTION yet on newer R will get R::[dpqr]nbinom_mu()
6+
17
2014-11-01 Dirk Eddelbuettel <edd@debian.org>
28

39
* src/api.cpp: Do not include execinfo.h on AIX, per r-devel discussion

inst/NEWS.Rd

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
\itemize{
99
\item The \code{ListOf<T>} class gains the \code{.attr} and
1010
\code{.names} methods common to other Rcpp vectors.
11+
\item The \code{[dpqr]nbinom_mu()} scalar functions are now available via
12+
the \code{R::} namespace when R 3.1.2 or newer is used.
1113
}
1214
\item Changes in Rcpp Attributes:
1315
\itemize{

inst/include/Rcpp/Rmath.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ namespace R {
131131
inline double qnbinom(double p, double sz, double pb, int lt, int lg) { return ::Rf_qnbinom(p, sz, pb, lt, lg); }
132132
inline double rnbinom(double sz, double pb) { return ::Rf_rnbinom(sz, pb); }
133133

134-
#if 0
134+
#if R_VERSION >= R_Version(3, 1, 2)
135135
inline double dnbinom_mu(double x, double sz, double mu, int lg) { return ::Rf_dnbinom_mu(x, sz, mu, lg); }
136136
inline double pnbinom_mu(double x, double sz, double mu, int lt, int lg) { return ::Rf_pnbinom_mu(x, sz, mu, lt, lg); }
137137
inline double qnbinom_mu(double x, double sz, double mu, int lt, int lg) { return ::Rf_qnbinom_mu(x, sz, mu, lt, lg); }

0 commit comments

Comments
 (0)