title: Object not found R
body: <p>I've created a loop to iterate through a set of files and assign the data in the files to a variable</p>
  
  <pre><code>for(i in 1:8){
    infile &lt;-paste("coauthor", i,".csv",sep="")
    coa[i]&lt;-read.csv(infile,header = TRUE, sep="\t")
  }
  </code></pre>
  
  <p>Yet I keep getting alternating errors </p>
  
  <pre><code>Error in read.table(file = file, header = header, sep = sep, quote = quote,  : 
    object 'infile' not found
  </code></pre>
  
  <p>and more frequently</p>
  
  <pre><code>Error in paste("coauthor", i, ".csv", sep = "") : object 'i' not found
  </code></pre>
  
  <p>What am I missing here?</p>