title: R - How to set the path of install.packages() for shiny server ? - Ubuntu
body: <p>For my system: <strong>Ubuntu 12.04</strong> and <strong>R 3.03</strong>, whenever I install a custom package in <strong>R</strong> via</p>
  
  <pre><code>&gt;install.packages()
  </code></pre>
  
  <p>the package is installed by default to </p>
  
  <pre><code>/home/USER/R/x86_64-pc-linus-gnu-library/3.0/ 
  </code></pre>
  
  <p>as opposed to system-wide in</p>
  
  <pre><code>/usr/local/lib/R/site-library/
  </code></pre>
  
  <p>which is needed for <strong>shiny-server</strong> to work with that package. </p>
  
  <p>My temporary solution is to copy the packages to the correct folder after the fact. </p>
  
  <p><strong>Question: How can I set the default install path from the start to avoid this problem?</strong></p>