@
accessor for attributes from non-S4 objects
#207
Closed
Labels
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::`%@%<-` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: