Skip to content
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

Update inner names when updating #738

Closed
krlmlr opened this issue Mar 20, 2020 · 3 comments
Closed

Update inner names when updating #738

krlmlr opened this issue Mar 20, 2020 · 3 comments
Labels
vctrs ↗️ Requires vctrs package
Milestone

Comments

@krlmlr
Copy link
Member

krlmlr commented Mar 20, 2020

The second example should update inner names, the first should leave as is.

Upstream: r-lib/vctrs#935.

x <- tibble::tibble(a = c(b = 1, c = 2))

x[[1, "a"]] <- c(d = 3)
x$a
#> b c 
#> 3 2

x[1, "a"] <- c(d = 3)
x$a
#> b c 
#> 3 2

Created on 2020-03-20 by the reprex package (v0.3.0)

@krlmlr krlmlr added the vctrs ↗️ Requires vctrs package label Mar 20, 2020
@krlmlr
Copy link
Member Author

krlmlr commented Mar 20, 2020

This needs vec_set_names() .

@krlmlr krlmlr added this to the 3.1.0 milestone Mar 21, 2020
@krlmlr krlmlr modified the milestone: 3.1.0 Jul 4, 2020
krlmlr added a commit to r-lib/vctrs that referenced this issue Jul 6, 2020
krlmlr added a commit to r-lib/vctrs that referenced this issue Jul 6, 2020
@krlmlr krlmlr modified the milestones: 3.1.0, 3.1.1 Feb 23, 2021
@krlmlr krlmlr modified the milestones: 3.1.1, 3.1.2 Apr 16, 2021
@krlmlr krlmlr modified the milestones: 3.1.2, 3.1.3 Jun 24, 2021
@krlmlr krlmlr modified the milestones: 3.1.3, 3.1.4 Jul 17, 2021
@krlmlr
Copy link
Member Author

krlmlr commented Jul 29, 2021

Won't fix:

x <- c(a = 1, b = 2)
x[1] <- c(c = 3)
x
#> a b 
#> 3 2

Created on 2021-07-29 by the reprex package (v2.0.0.9000)

@krlmlr krlmlr closed this as completed Jul 29, 2021
@github-actions
Copy link
Contributor

This old thread has been automatically locked. If you think you have found something related to this, please open a new issue and link to this old issue if necessary.

@github-actions github-actions bot locked and limited conversation to collaborators Jul 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
vctrs ↗️ Requires vctrs package
Projects
None yet
Development

No branches or pull requests

1 participant