After scraping a pdf, I have a data frame with a chr text var:
df = data.frame(text = c("abc","def","abc","def"))
My question is how to turn it into:
df = data.frame(text1 = c("abc","abc"),text2=c("def","def"))
I am able to index the rows and manually rebuild a new df, but was curious if it could be done within the dplyr pipe.
All solutions I have been able to find involve splitting each row, but not to split whole rows of a variable into new columns.