title: rstudio different library path to command-line R (`$R_LIBS_USER`)
body: <p>I'm trying to work out why my <code>.libPath</code> is different between command-line R and RStudio <strong>Desktop</strong> (NOTE: this is <strong>not</strong> a duplicate of <a href="https://stackoverflow.com/questions/7129213/r-libpaths-difference-between-rstudio-and-command-line-r">this question</a> as that fix involved stuff specific to RStudio <strong>Server</strong> which I don't have).</p>
  
  <p>When I use R on the command-line (linux):</p>
  
  <pre><code>&gt; .libPaths()
  [1] "/home/mathematicalcoffee/R/library"  "/usr/local/lib/R/site-library"
  [3] "/usr/lib/R/site-library"             "/usr/lib/R/library"           
  </code></pre>
  
  <p>When I use RStudio <strong>Desktop</strong> (linux, same machine):</p>
  
  <pre><code>[1] "/usr/local/lib/R/site-library" "/usr/lib/R/site-library"       "/usr/lib/R/library"            "/usr/lib/rstudio/R/library"  
  </code></pre>
  
  <p>Now I have set <code>$R_LIBS_USER</code> to <code>~/R/library</code> in my bash profile, so R-command-line picks it up as my preferred libPath.</p>
  
  <p>The problem is in RStudio Desktop when I do:</p>
  
  <pre><code>Sys.getenv('R_LIBS_USER')
  # "~/R/x86_64-pc-linux-gnu-library/2.15"
  </code></pre>
  
  <p>So why has RStudio Desktop changed my <code>R_LIBS_USER</code>? How can I change it back?
  (I don't use an .Rprofile file). (In the question I linked above the solution for RStudio Server was to modify <code>/etc/rstudio/rsession.conf</code>, but I don't have that as I've got RStudio Desktop. Also, I believe RStudio should be respecting my <code>R_LIBS_USER</code> environment variable.)</p>