title: Assigning Directory as a Variable in R
body: <p>I need to create a function called <code>PollutantMean</code> with the following arguments: <code>directory</code>, <code>pollutant</code>, and <code>id=1:332</code>)</p>
  
  <p>I have most of the code written but I can't figure out how to assign my directory as a variable.  My current working directory is <code>C:/Users/User/Documents</code>.  I tried writing the variable as:</p>
  
  <p><code>directory &lt;- "C:/Users/User/specdata"</code> and that didn't work.  </p>
  
  <p>Next I tried the following:</p>
  
  <p><code>directory &lt;- list.files("specdata", full.names=TRUE)</code> and that didn't work either.</p>
  
  <p>Any ideas on how to change this?</p>