Recently I have written an R script for the lab which is nothing but
a=system(cmd, wait =T, intern = T)
in a loop. It calls some tools from the terminal. I ran it from terminal as
sudo Rscript mycode.R
.
The problem is that it runs in a 4GB RAM, 1cpu laptop as the same speed as in 16GB RAM 12 CPU PC . When it runs on the PC it just uses 1.6GB of RAM and only one CPU with 100%. PC is Ubuntu 16.04. How can I make it faster? Is it just a limit imposed by R? Thanks in advance.