title: Using readLines in a loop in R
body: <p>I have around 850 txt files each of around 15 rows each. I want to separate each row of the txt files to be on their own by a loop but I cant seem to do it; for example, I would like to have 850x15=12,750 rows. How can I build a loop to do so? I have tried the readLines code, but it has not worked so far. </p>
  
  <pre><code>path&lt;-"/Users/joseantonio/folder/"
  list&lt;-list.files(path, pattern="*.txt")
  
  for (i in list) {
      text&lt;-readLines[i]
      i=i+1
  }
  </code></pre>
  
  <p>I am a beginner at R. Any help will be very much appreciated.</p>