Skip to content

Commit 97561cf

Browse files
committed
merged from branch
2 parents 1e54295 + d99f451 commit 97561cf

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

ChangeLog

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
* inst/unitTests/RcppTestA: Rename to inst/unitTests/testRcppPackage
44
* inst/unitTests/testRcppPackage: Updated throughout
55

6+
* inst/include/Rcpp/Rmath.h: As suggested by Kevin, test for R_VERSION
7+
via #define to conditon on R >= 3.1.2 -- this does not require a hard
8+
constraint in DESCRIPTION yet on newer R will get R::[dpqr]nbinom_mu()
9+
610
2014-11-01 Dirk Eddelbuettel <edd@debian.org>
711

812
* 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)