About this question
I am forming a data frame where one column is named as a major, and the second column is the list of courses in the major.
df <- data.frame(majors = majors)
df[, "courses"] <- courses, where majors are a vector and courses, is a list of lists. When I try to write using
write.csv(df, "Majors_and_Courses.csv", row. names = FALSE)
I get an error:
"Error in write.table(df, "Majors_and_Courses.csv", row.names = FALSE, : unimplemented type 'list' in 'EncodeElement'"