[Rcpp-devel] inconsistent is_na() vs. is.na()

Dirk Eddelbuettel edd at debian.org
Wed Oct 2 14:31:04 CEST 2013


Thomas,

On 2 October 2013 at 19:31, Thomas Tse wrote:
| is_na() does not handles R's NaN correctly, for the below test.cpp:
[...]
| is it possible to apply this change in next release of Rcpp ?

Certainly.  Though Romain has a point:

On 2 October 2013 at 13:36, Romain Francois wrote:
| The question is that do we want to be consistent with R or do we want 
| something that makes sense.
| 
| I believe that is_na should test if its argument is NA, and is_nan 
| should check if is NaN

We have to make sure that we're doing is "consistent" for various definitions
of consistent. IEEE754 only knows NaN and Inf; NA is an R extension.

But from the top of my head I'd have to say I would want Rcpp to behave like
R over behaving like C++.  But I could be swayed.  Other views?

Dirk

-- 
Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com


More information about the Rcpp-devel mailing list