-
Notifications
You must be signed in to change notification settings - Fork 135
Closed
Labels
bugan unexpected problem or unintended behavioran unexpected problem or unintended behavior
Milestone
Description
It does work for data frames though, so I figure we should be consistent.
Found here:
https://community.rstudio.com/t/unquoting-issue-in-purrr-map-df-function/106676/2
library(tibble)
library(rlang)
df <- data.frame(x = 1)
tbl <- tibble(x = 1)
x_sym <- sym("x")
x_chr <- "x"
df[[x_chr]] <- 2
tbl[[x_chr]] <- 2
# Can subset-assign with a symbol for data frames
df[[x_sym]] <- 2
# Can't subset-assign with a symbol for tibbles
tbl[[x_sym]] <- 2
#> Error: Can't use character names to index an unnamed vector.Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugan unexpected problem or unintended behavioran unexpected problem or unintended behavior