-
Notifications
You must be signed in to change notification settings - Fork 272
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
assign_in()
NULL
should assign rather than remove
#636
Comments
Document difference with |
After feedback from #634, maybe we should let puck create new elements — at least by name, it feels like assigning by index should be stricter (semantic difference between vector and associative containers). This means we'd allow removing elements with What do you think @hadley? |
I think it seems like a nice principle that |
In the shallow case it seems reasonable to do |
I think this needs more thought about what our desired |
Reprex: library(purrr)
x <- list(a = 1, b = list(c = 1))
pluck(x, "a") <- NULL
str(x)
#> List of 1
#> $ b:List of 1
#> ..$ c: num 1
pluck(x, "b", "c") <- NULL
str(x)
#> List of 1
#> $ b: Named list() Created on 2022-08-25 by the reprex package (v2.0.1) Definitely feels like purrr is standardising on using |
NULL
should assign rather than removeassign_in()
NULL
should assign rather than remove
The modfied object returned by
pluck<-
should always have the same length structure.The text was updated successfully, but these errors were encountered: