-
Notifications
You must be signed in to change notification settings - Fork 418
Closed
Labels
featurea feature request or enhancementa feature request or enhancementnesting 🐦nesting, chopping, and packingnesting, chopping, and packing
Milestone
Description
I can't imagine that this behaviour is ever useful:
library(tidyr)
df <- tribble(
~x, ~y,
1, c(11, 12, 13),
2, 21
)
df |> unnest_wider(y)
#> New names:
#> New names:
#> • `` -> `...1`
#> • `` -> `...2`
#> • `` -> `...3`
#> # A tibble: 2 × 4
#> x ...1 ...2 ...3
#> <dbl> <dbl> <dbl> <dbl>
#> 1 1 11 12 13
#> 2 2 21 NA NA
Created on 2022-06-06 by the reprex package (v2.0.1)
What if it was instead:
df |> unnest_wider(y)
#> Warning:
#> * Using unnest_wider() with column containing unnamed data
#> i Use `names_sep = "_"` to suppress this warning and control the separator.
#> # A tibble: 2 × 4
#> x y_1 y_2 y_3
#> <dbl> <dbl> <dbl> <dbl>
#> 1 1 11 12 13
#> 2 2 21 NA NA
?
Metadata
Metadata
Assignees
Labels
featurea feature request or enhancementa feature request or enhancementnesting 🐦nesting, chopping, and packingnesting, chopping, and packing