4

I have created a script, and when I run it line-by-line on Ubuntu, everything works from end-to-end, however, when I run it using Rscript it fails due to a memory allocation error.

I have tried to remove excess variables using rm followed by gc, and I have tried to run the code using R CMD BATCH, but nothing seems to work.

Does anyone know why memory allocation is different between running R and Rscript?

Sorry, I cannot really do a reproducible example for this problem due to the sensible data, but the packages I use are RJDBC with the setting options(java.parameters = "-Xmx8g") on a computer with 16 Gb of RAM, and I also use the parallel-package, which is where the error occurs.

Esben Eickhardt
  • 3,183
  • 2
  • 35
  • 56

0 Answers0