title: How to loop to read one file after another in R?
body: <p>My files are systemically named and all in the same folder. So I want to take advantage and write a function to read them one by one instead of doing this manually for each one.</p>
  
  <p>The names are stored in this text file:</p>
  
  <pre><code>DF &lt;- read.table(text="       site                column row
  1          abs   1259 463
  2         adm   1253 460
  3        afrm   1258 463", header=T)
  </code></pre>
  
  <p>I want to write a function to go row by row  and do this:</p>
  
  <pre><code>You can see for instance if we apply for the first row:
  </code></pre>
  
  <p><code>cor$site</code>  is  <code>abs</code>  so:</p>
  
  <pre><code>   file1=read.table("C:\\Data\\abs.txt",sep = "\t")
  </code></pre>
  
  <p><code>cor$column</code>  is <code>1259</code></p>
  
  <p><code>cor$row</code>     is <code>463</code></p>
  
  <p>So </p>
  
  <pre><code> wf= read.table("C:\\Users\\measurement_ 1259_463.txt", sep =' ' , header =TRUE)
  </code></pre>
  
  <p>Now I do any calculations with <code>file1</code> and <code>wf</code>.........</p>
  
  <p>And then go to the second row and so on.</p>