Transpose lists elements and match to value in R
问题 Here is the code written by @Ken S to extract data from OCR'd pdf, which gives a dataframe like name Status Page Words test.pdf Present test_1, test_3 gym, school test1.pdf Present test1_4, test1_7 gym, swimming pool test2.pdf Not Present - - . But I want the data to be flattened so that the output would look like fileName Status Page Words TEXT test.pdf Present test_1 gym I go gym and school regularly test.pdf Present test_1 school I go gym and school regularly test.pdf Present test_3 school