title: Unable to install.packages(): system call failed: Cannot allocate memory; installation of package had non-zero exit status
body: <p>I'm using R version 3.1.2 (2014-10-31) -- "Pumpkin Helmet" on Platform: x86_64-pc-linux-gnu (64-bit).</p>
  
  <p>I have an issue installing new packages in R, using RStudio. When I call the <code>install.packages()</code> function, I get: </p>
  
  <pre><code>Warning in install.packages :
  system call failed: Cannot allocate memory
  Warning in install.packages :
  installation of package ‘pastecs’ had non-zero exit status
  
  The downloaded source packages are in
  ‘/tmp/Rtmpi0toFl/downloaded_packages’
  </code></pre>
  
  <p>I have installed R via shell commands and it worked ok. I've also decreased the swappiness value to 10, but I'm not sure if it has anything to do with the problem.  </p>
  
  <p>Thanks in advance!</p>