Splitting lines out of several txt documents into a dataframe

11 Views Asked by At

I have a folder with many txt files (lyrics of songs) and i would like to do a dataframe adding each line of the songs. i tried rbind but i cannot make it

path<-"C:/.../"
list<-list.files(path, pattern="*.txt")

for (i in list) {
lyrics<-readLines() %>%
out=rbind(out, data.frame(lyrics))
}
out
0

There are 0 best solutions below