title: Moving down a folder in working directory
body: <p>I am trying to move down a folder in the working directly in R. For example, I have a working directory of foo/bar and I want to move to foo/bar/subfolder:</p>
  
  <pre><code>setwd("/Users/foo/bar")
  getwd()
  [1] "/Users/foo/bar"
  setwd("~/subfolder")
  </code></pre>
  
  <p>I then receive:</p>
  
  <blockquote>
    <p>Error in setwd("~/subfolder"): cannot change working directory</p>
  </blockquote>
  
  <p>What am I doing wrong?</p>