title: How to set the default working directory of my R project to my project directory?
body: <p>I have started to use R Projects, but when I start a new project (either in a new or existing directory), the default working directory is not set to that folder (I thought that should be the case, right? I read it <a href="https://support.rstudio.com/hc/en-us/articles/200526207-Using-Projects" rel="nofollow noreferrer">here</a>).</p>
  
  <p>What happens instead is that it goes to my home folder, like:</p>
  
  <pre><code>&gt;getwd()
  [1] "/home/user"
  </code></pre>
  
  <p>I can change my working directory manually to the project folder with <code>setwd()</code>, but when I restart RStudio, it is going back to the home folder again, not the project folder.</p>
  
  <p>Any ideas how to fix this?</p>
  
  <p>Pretty basic question probably, but I have not found the answer yet, and I am new to the projects part of RStudio, so I am not sure if this is an issue in my settings or something...</p>
  
  <pre><code>&gt; sessionInfo()
  R version 3.3.2 (2016-10-31)
  Platform: x86_64-pc-linux-gnu (64-bit)
  Running under: Ubuntu 16.04.3 LTS
  </code></pre>