I'm having trouble unnesting a tibble column I was hoping to get some help with. I've done my best to make a reprex but it is still quite packed because of the tibble column, please excuse me.
How can I change the nested pap_name column to specifically to allow for unnesting?
Edit: Simplified example after based on @technocrat's advice
library(tidyverse)
df <-
structure(list(user_id = c("6bemf", "vb76d"), registration_results = list(
structure(list(
pap_name = list(NULL),
pap_file_url = list(NULL)
), row.names = c(
NA,
-1L
), class = c("tbl_df", "tbl", "data.frame")), structure(list(
pap_name = "", pap_file_url = ""
), row.names = c(NA, -1L), class = c(
"tbl_df",
"tbl", "data.frame"
))
)), row.names = c(NA, -2L), class = c(
"tbl_df",
"tbl", "data.frame"
))
df %>%
unnest(registration_results)
#> Error: Can't combine `..1$pap_name` <list> and `..2$pap_name` <character>.
Created on 2020-08-18 by the reprex package (v0.3.0)