We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 51d2965 commit 1e812eaCopy full SHA for 1e812ea
inst/include/Rcpp/internal/r_coerce.h
@@ -271,6 +271,8 @@ template <>
271
inline SEXP r_coerce<REALSXP,STRSXP>(double from){
272
// handle NaN explicitly
273
if (R_IsNaN(from)) return Rf_mkChar("NaN");
274
+ else if (from == R_PosInf) return Rf_mkChar("Inf");
275
+ else if (from == R_NegInf) return Rf_mkChar("-Inf");
276
else return Rcpp::traits::is_na<REALSXP>(from) ? NA_STRING :Rf_mkChar( coerce_to_string<REALSXP>( from ) ) ;
277
}
278
template <>
0 commit comments