Open moodymudskipper opened 4 years ago
hmm to me it looks a bit too complicated.
If NAs are not desirable we can actually switch that particular behaviour to match %in%
instead of ==
. But then the inconsistency with [==
will still remain.
Another alternative is to provide slightly different operator syntax for dealing with NAs differently. Maybe capital letters %IN{}%
, like a "strict" %in{}%
But not sure if it's intuitive.
I think I'd rather not multiply by two our whole set of operators, I miss these functions in a CRAN package, but this might not be the place for them.
Yup, agreed. What is your opinion about the other option - breaking consistency with ==
just for NA
values?
I'm not sure about it, it's easy to remove NAs or transform them, if they're gone by default you won't get them back.
unrelated FYI : https://github.com/rstudio/rstudio/issues/5767
I don't completely dislike the capital letter idea though! We can think about it as we use the package.
Yup I agree about not getting NA values back if we get rid of it. Very good point.
About rstudio issue - great catch. I do not use R-studio, so do not have this particular problem. But it would be cumbersome for potential users of the package.
@KKPMW Our package functions produce NAs, which might not always be desirable for all situations:
do you think it would stay in the scope of the package to add helpers to remove NAs or replace them by FALSE (or by symetry though less useful, by TRUE)