title: Reading files from directory, Object not found
body: <p>I have a total of 100 ".csv" files in my directory. They are named as "1.csv","2.csv" etc. I assigned all those files to a vector x as follows</p>
  
  <pre><code>x&lt;-list.files(path=getwd(),pattern = ".csv",full.names = TRUE)
  </code></pre>
  
  <p>Next i wanted to read those files as data frames for which I used read.csv() function. I wanted to simultaneously read a number of csv files. Therefore I wanted to assign it to a variable f.</p>
  
  <pre><code> id&lt;-5:7
  for(i in seq_along(id)){
          f[i]&lt;-read.csv(x[id[i]])   }
  </code></pre>
  
  <p>but i get an error saying that</p>
  
  <pre><code>Error in f[i] &lt;- read.csv(x[id[i]]) : object 'f' not found
  </code></pre>