title: Reading all scripts and data files from multiple folders
body: <p>I have two folders, <code>folder1</code> and <code>folder2</code> with around 200 files each that are either <code>*rda</code> or <code>*R</code>. I want to read all of the files and datasets from the two directories. How can I do that?</p>
  
  <p>Paths for: </p>
  
  <pre><code>folder1:  C:\folder1
  folder2:  C:\folder2 
  </code></pre>
  
  <p>My trial </p>
  
  <pre><code>setwd("C:/folder1")
  myls &lt;- ls() # do work as this will only list that are already loaded in the system 
  setwd("C:/folder2")
  myls2 &lt;- ls()
  myls  # do work as this will only list that are already loaded in the system 
  </code></pre>
  
  <p>I know this is simple question, but I do not have any answer.</p>