title: Using lapply and read.csv on multiple files (in R)
body: <p>I guess this is a bit of a beginner's question but I haven't quite found an answer or figured out what I'm doing wrong.</p>
  
  <p>I'm trying to read 20 CSV files that are stored in a separate directory using:</p>
  
  <pre><code>setwd("./Data")
  filenames &lt;- list.files()  
  All &lt;- lapply(filenames,function(i){
    i &lt;- paste(".\\",i,sep="")
    read.csv(i, header=TRUE, skip=4)
  })
  </code></pre>
  
  <p>And I get the following error:</p>
  
  <pre><code>Error in file(file, "rt") : cannot open the connection
  In addition: Warning message:
  In file(file, "rt") :
    cannot open file '.\filename.csv': No such file or directory
  </code></pre>
  
  <p>Where filename stand for the name of the first file in my folder. </p>
  
  <p>Thanks in advance!</p>