# NOT RUN {
df <- tibble(x = 1:2, y = list(tibble(x = 3:5), tibble(x = 4:7)))
# Doesn't work because it would produce a data frame with two
# columns called x
# }
# NOT RUN {
unnest(df, y)
# }
# NOT RUN {
# The new tidyverse standard:
unnest(df, y, names_repair = "universal")
# The old tidyr approach
unnest(df, y, names_repair = tidyr_legacy)
# }
Run the code above in your browser using DataLab