Ho to rename tibble's .name_repair columns with dplyr

How do I rename columns with the new ..-type names that may result from tibble’s .name_repair?

x <- tibble::as_tibble(list(1), .name_repair = "unique")
#> New names:
#> * `` -> `..1`
dplyr::rename(x, a = `..1`)
#> Error in .f(.x[[i]], ...): ..1 used in an incorrect context, no ... to look in

Am I missing something, or is this a bug?

1 Like

Bug

The problem with ..1 and ... (and also with ``) is that these names not only not syntactic, they're invalid even as a quoted name.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.