title: Read multiple files but keep track of which file is which dataframe in R
body: <p>Let's say I have these files:</p>
  <pre><code>N1.xlsx
  N2.xlsx
  N3.xlsx
  N4.xlsx
  </code></pre>
  <p>I want them in a list, but each dataframe must be named according to the file it was read from, like</p>
  <pre><code>mylist = 
  N1
  N2
  N3
  N4
  </code></pre>
  <p>I'm using:</p>
  <pre><code>fnames =  mixedsort(sort(list.files(&quot;filepath&quot;, pattern = '*.xlsx', full.names = F)))
  
  mylist &lt;- lapply(fnames, function(x) {
   read_xlsx(paste0(x),  col_names = TRUE)
  })
  </code></pre>
  <p>But this code creates a list without identification</p>
  <pre><code>mylist = 
  [[1]]
  [[2]]
  [[3]]
  [[4]]
  </code></pre>
  <p>Its important to keep the names of each file in each dataframe, so I can export them correctly later!</p>