Inconsistency in output format that came up when processing nested lists that might be empty:
library(tidyr)
df <- tibble(
x = list(list(z = list(1)), list(z = list(2))),
y = 1:2
)
# column z as expected
df %>% unnest_wider(x)
#> # A tibble: 2 x 2
#> z y
#> <list> <int>
#> 1 <list [1]> 1
#> 2 <list [1]> 2
df <- tibble(
x = list(list(z = list()), list(z = list())),
y = 1:2
)
# column z not present
df %>% unnest_wider(x)
#> # A tibble: 2 x 1
#> y
#> <int>
#> 1 1
#> 2 2
Created on 2021-06-10 by the reprex package (v1.0.0)
Inconsistency in output format that came up when processing nested lists that might be empty:
Created on 2021-06-10 by the reprex package (v1.0.0)