title: using paste with read.csv inside a function
body: <p>I want to create a function that uses <code>read.csv()</code> with <code>paste()</code>.  The following code works in general</p>
  
  <pre><code>df &lt;- read.csv(paste("/file name", 2010, ".CSV", sep = ""), header = TRUE)
  </code></pre>
  
  <p>but when I place it inside a function like so</p>
  
  <pre><code>myfunction &lt;- function(date){df &lt;- read.csv(
                               paste("/file name", date, ".CSV", sep = ""),
                               header = TRUE)
                              }
  </code></pre>
  
  <p>The command <code>myfunction(2010)</code> fails to produce output and does not result in any errors or warnings.  What am I doing wrong?</p>