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

The data frame method for nest() doesn't pass .names_sep through #1174

Closed
DavisVaughan opened this issue Oct 27, 2021 · 0 comments · Fixed by #1182
Closed

The data frame method for nest() doesn't pass .names_sep through #1174

DavisVaughan opened this issue Oct 27, 2021 · 0 comments · Fixed by #1182
Labels
bug an unexpected problem or unintended behavior nesting 🐦 nesting, chopping, and packing

Comments

@DavisVaughan
Copy link
Member

library(tidyr)

tbl <- tibble(x = c(1, 1, 1), ya = 1:3, yb = 4:6)
res <- nest(tbl, y = starts_with("y"), .names_sep = "")
res$y[[1]]
#> # A tibble: 3 × 2
#>       a     b
#>   <int> <int>
#> 1     1     4
#> 2     2     5
#> 3     3     6

df <- as.data.frame(tbl)
res <- nest(df, y = starts_with("y"), .names_sep = "")
res$y[[1]]
#> # A tibble: 3 × 2
#>      ya    yb
#>   <int> <int>
#> 1     1     4
#> 2     2     5
#> 3     3     6

Created on 2021-10-27 by the reprex package (v2.0.1)

@DavisVaughan DavisVaughan added bug an unexpected problem or unintended behavior nesting 🐦 nesting, chopping, and packing labels Oct 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug an unexpected problem or unintended behavior nesting 🐦 nesting, chopping, and packing
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant