I have a list called list that looks as follows:
Col1 Col2 Col3 Col4 Col5 ...
1 Name1 <data.frame [1 × 3]> <chr [0]> <list [0]>
2 Name2 <data.frame [29 × 3]> <chr [1]> <data.frame [1 × 9]>
3 Name3 <data.frame [5 × 3]> <chr [1]> <NULL>
...
I want to clean up this list, turn it into a dataframe and make new columns out of the nested dataframes, lists and characters but I am not sure what is contained in them and what they look like. So my output should essentially create new columns behind Col3 for the respective data that is contained in Col3 and so on.
I am not sure how to accomplish this or how to build a reference of this list to attach here for people to try out. Grateful for any tips!
EDIT: Here is the dput for the first 2 rows (sanitized due to personal information)
structure(list(about = c(NA_character_, NA_character_), avatar = c("LINK",
"LINK2"
), avatar_cached = c(NA_character_, NA_character_), certifications = list(
structure(list(meta = "Issued Apr 2009", subtitle = "The Prince2 Academy",
title = "Prince2"), class = "data.frame", row.names = 1L),
structure(list(), names = character(0), row.names = integer(0), class = "data.frame")),
city = c("Ireland", "Greater Sydney Area"), country_code = c("IE",
"AU"), courses = list(structure(list(subtitle = "-", title = "TITLE"), class = "data.frame", row.names = 1L),
structure(list(), names = character(0), row.names = integer(0), class = "data.frame")),
current_company = structure(list(name = c("", "COMPANY1"
), company_id = c(NA, "company1"), industry = c(NA, "Capital Markets"
), link = c(NA, "COMPANYURL"
)), row.names = 1:2, class = "data.frame"), `current_company:name` = c("",
"COMPANY1"), education = list(structure(list(), names = character(0), row.names = integer(0), class = "data.frame"),
structure(list(), names = character(0), row.names = integer(0), class = "data.frame")),
educations_details = list(character(0), character(0)), experience = list(
structure(list(), names = character(0), row.names = integer(0), class = "data.frame"),
structure(list(company = "COMPANY1", company_id = "company1",
industry = "Capital Markets", location = "", positions = list(
structure(list(description = "", duration = "Jun 2007 - Present 14 years 4 months",
duration_short = "14 years 4 months", end_date = "Present",
start_date = "Jun 2007", subtitle = "Company1",
title = "TITLE1"), class = "data.frame", row.names = 1L)),
url = "URL"), class = "data.frame", row.names = 1L)),
following = c(500L, 1L), groups = list(structure(list(), names = character(0), row.names = integer(0), class = "data.frame"),
structure(list(), names = character(0), row.names = integer(0), class = "data.frame")),
id = c("ID1", "ID2"
), languages = list(structure(list(subtitle = "-", title = "French"), class = "data.frame", row.names = 1L),
structure(list(), names = character(0), row.names = integer(0), class = "data.frame")),
name = c("Name1", "Name2"), people_also_viewed = list(
structure(list(), names = character(0), row.names = integer(0), class = "data.frame"),
structure(list(), names = character(0), row.names = integer(0), class = "data.frame")),
position = c(NA, "Position1"
), posts = list(structure(list(attribution = c("", "", ""
), title = c("", "", "")), class = "data.frame", row.names = c(NA,
3L)), structure(list(attribution = "Liked by x",
img = "URL",
link = "URL",
title = "TITLE"), class = "data.frame", row.names = 1L)),
recommendations = list("“Rec”",
list()), recommendations_count = c(1L, NA), region = c("EU",
"OC"), timestamp = c("2021-07-09", "2021-09-09"), url = c("URL1",
"URL2"
), volunteer_experience = list(list(), list()), changelog = list(
NULL, list()), `current_company:company_id` = c(NA, "company1"
), `current_company:industry` = c(NA, "Capital Markets")), row.names = 1:2, class = "data.frame")