As a follow-up of my previous question - NaN is removed when using na.rm=TRUE, I am looking for a workaround with minimal changes to my (large) code base.
I tried this, which works, but
my.is.na <- function(x)
{
ifelse(is.na(x) & !is.nan(x), TRUE, FALSE)
}
But I want to override the built-in is.na
function. Renaming my function to is.na
obviously results in infinite recursion. What are my options?
PS: In all of the code it is assumed that is.na(NaN)
returns FALSE
, so I would prefer to override.