@@ -52,7 +52,7 @@ inline int r_coerce<LGLSXP,INTSXP>(int from){
5252}
5353template <>
5454inline int r_coerce<REALSXP,INTSXP>(double from){
55- if (R_IsNA (from)) {
55+ if (Rcpp_IsNA (from)) {
5656 return NA_INTEGER;
5757 } else if (from > INT_MAX || from <= INT_MIN ) {
5858 return NA_INTEGER;
@@ -90,7 +90,7 @@ inline double r_coerce<RAWSXP,REALSXP>(Rbyte from){
9090// -> LGLSXP
9191template <>
9292inline int r_coerce<REALSXP,LGLSXP>(double from){
93- return R_IsNA (from) ? NA_LOGICAL : (from!=0.0 );
93+ return Rcpp_IsNA (from) ? NA_LOGICAL : (from!=0.0 );
9494}
9595
9696template <>
@@ -100,7 +100,7 @@ inline int r_coerce<INTSXP,LGLSXP>(int from){
100100
101101template <>
102102inline int r_coerce<CPLXSXP,LGLSXP>(Rcomplex from){
103- if ( R_IsNA (from.r ) ) return NA_LOGICAL ;
103+ if ( Rcpp_IsNA (from.r ) ) return NA_LOGICAL ;
104104 if ( from.r == 0.0 || from.i == 0.0 ) return FALSE ;
105105 return TRUE ;
106106}
@@ -119,7 +119,7 @@ inline Rbyte r_coerce<INTSXP,RAWSXP>(int from){
119119
120120template <>
121121inline Rbyte r_coerce<REALSXP,RAWSXP>(double from){
122- if ( R_IsNA (from) ) return static_cast <Rbyte>(0 ) ;
122+ if ( Rcpp_IsNA (from) ) return static_cast <Rbyte>(0 ) ;
123123 return r_coerce<INTSXP,RAWSXP>(static_cast <int >(from)) ;
124124}
125125
@@ -137,7 +137,7 @@ inline Rbyte r_coerce<LGLSXP,RAWSXP>(int from){
137137template <>
138138inline Rcomplex r_coerce<REALSXP,CPLXSXP>(double from){
139139 Rcomplex c ;
140- if ( R_IsNA (from) ){
140+ if ( Rcpp_IsNA (from) ){
141141 c.r = NA_REAL;
142142 c.i = NA_REAL;
143143 } else {
@@ -273,7 +273,7 @@ template <>
273273inline SEXP r_coerce<REALSXP,STRSXP>(double from){
274274
275275 // handle some special values explicitly
276- if (R_IsNaN (from)) return Rf_mkChar (" NaN" );
276+ if (Rcpp_IsNaN (from)) return Rf_mkChar (" NaN" );
277277 else if (from == R_PosInf) return Rf_mkChar (" Inf" );
278278 else if (from == R_NegInf) return Rf_mkChar (" -Inf" );
279279 else return Rcpp::traits::is_na<REALSXP>(from) ? NA_STRING :Rf_mkChar ( coerce_to_string<REALSXP>( from ) ) ;
0 commit comments