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
@
accessor for attributes from non-S4 objects
#207
Comments
Ideally, we should propose to R-devel, and provide a backport in rlang. I agree that |
In the meantime I have added a replacement variant of |
It feels a bit weird that |
oh I hadn't realised that that |
Maybe I should also add Jim's S4 handling, then it's easy to override `@` <- rlang::`%@%`
`@<-` <- rlang::`%@%<-` |
It would be nice to provide the
@
accessor for non-S4 objects, like you can with S4 slots (which are implemented as attributes anyway). A simple R implementationSome thoughts on this
@
if we wanted.exact = TRUE
is probably best, but it is a departure to how$
works in base R.NULL
for missing attributes, or an error?I think it would be nice to have this in rlang so we could start using it today, but alternatively we could propose the change to R-devel instead.
cc/ @hadley
The text was updated successfully, but these errors were encountered: