I would like to unnest a nested tibble, however, I get an error.
Example data:
library(tidyverse)
df <- tribble(
~x, ~y,
1, tibble(a=1, b=2),
2, tibble(a=4:5, b=c("thank","you"),c=1:2))
df
#> # A tibble: 2 x 2
#> x y
#> <dbl> <list>
#> 1 1 <tibble [1 x 2]>
#> 2 2 <tibble [2 x 3]>
df %>% unnest(y)
#> Error: Can't combine `..1$b` <double> and `..2$b` <character>.
Created on 2021-11-03 by the reprex package (v2.0.1)
I think I have to change the data type of all tibbles listed in y to character, but I got stuck with that.