I am currently separating a dataframe with lists in each column and row. There are 3 columns: jobId (that is unique), skills, skillTypeId
I am hoping to create two new columns that separate those vectors in "skills" and "skillTypeId" and match them respectively. i.e. for example1:
df <- structure(list(job.Id = "A", skill = list(c("microsoft excel",
"product development")), skillTypeld = list(c(2, 2))), class = c("tbl_df",
"tbl", "data.frame"), row.names = c(NA, -1L))
Currently, I managed to separate them by tackling creating a dataframe of "skills" and another of "skillTypeId". For "skills" dataframe, it will contain just jobId and skills. For "skillTypeId" dataframe, it will contain just jobId and skillTypeId. Then I use separate_rows. Eventually, I then use cbind to merge the two data frames together.
However, one problem arise: there were different number of entries (differ by 100+ rows out of the million rows). And I have too much data to troubleshoot which rows went wrong.
I understand that my approach is rather manual, hence I am hoping to get some help in making this less manual, and also most importantly, no missing rows.