Skip to content

x == NA instead of is.na(x) #143

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jabranham opened this issue Apr 5, 2016 · 2 comments
Closed

x == NA instead of is.na(x) #143

jabranham opened this issue Apr 5, 2016 · 2 comments
Labels
feature a feature request or enhancement

Comments

@jabranham
Copy link
Contributor

It would be useful to have a linter that checks for x == NA where I meant to write is.na(x). Is that possible?

@jimhester
Copy link
Member

It is definitely possible and probably correct in most cases. Can you think of any cases where you actually would want to use x == NA instead of is.na(x)?

@jabranham
Copy link
Contributor Author

I can't - x==NA will just return NAs for all values of x. That doesn't seem helpful to me.

@jimhester jimhester added feature a feature request or enhancement and removed enhancement labels May 17, 2018
jabranham added a commit to jabranham/lintr that referenced this issue Jun 7, 2018
jabranham added a commit to jabranham/lintr that referenced this issue Jun 8, 2018
jabranham added a commit to jabranham/lintr that referenced this issue Jun 8, 2018
jimhester pushed a commit that referenced this issue Jun 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature a feature request or enhancement
Projects
None yet
Development

No branches or pull requests

2 participants