Comments (6)
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.
from inops.
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.
from inops.
Yup, agreed. What is your opinion about the other option - breaking consistency with ==
just for NA
values?
from inops.
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 : rstudio/rstudio#5767
from inops.
I don't completely dislike the capital letter idea though! We can think about it as we use the package.
from inops.
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.
from inops.
Related Issues (20)
- README HOT 8
- consistency between in_check ops and equality/comparison ops ? HOT 8
- simplify replace ops HOT 2
- package name HOT 7
- `%in%<-`, `%out%`, `%out%<-` HOT 1
- `%in{}%` on (lists of) language objects HOT 1
- regex ops don't have the same consistency to == as other ops HOT 1
- inconsistent way of dealing with factors in `%in{}%` HOT 3
- Improve error "NAs are not allowed in subscripted assignments" in replacement functions HOT 5
- Case for replacement acting as `ifelse()` ? HOT 4
- `%#in%` family HOT 18
- add example `NA %in{}% NA` HOT 5
- CRAN issues HOT 25
- conflicted doesn't like inops HOT 14
- The following object is masked from ‘package:base’: <<-
- More fame and glory HOT 1
- multiple replacements HOT 5
- Operator for selecting quantile range?
- First CRAN release HOT 85
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from inops.