-
Notifications
You must be signed in to change notification settings - Fork 184
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
New linter for utils::hasName()
#2650
Comments
Note that |
As well as active bindings in R6. The name checking seems to be the only relevant case. |
I'm slightly ambivalent on whether Since match(nm, names(x), 0L) > 0L |
Since R 3.4.0
utils::hasName()
was added as a convient way of testing the existence of a name i.e. the pattern"name" %in% names(x)
or for checking the!is.null(x$abc)
pattern without partial matching (taken from the docs):There is also the basically equivalent rlang::has_name() as a common pattern.
The text was updated successfully, but these errors were encountered: