Skip to content

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

@DavisVaughan

Description

@DavisVaughan
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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behaviornesting 🐦nesting, chopping, and packing

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions