0

Is there a way for an R program to obtain the size of the machine's memory, when running on Linux?

In Windows the function to use is memory.size(), but when I run this on Linux it generates an error.

I can run system('free'), and this will produce a nice display, but the return value is 0, indicating, I suppose, success... but nothing about the size of memory.

Note: The goal is for an R script to obtain, and use, the total size of a machine's memory. Printing memory info to the terminal, using system(), is not useful.

zx8754
  • 52,746
  • 12
  • 114
  • 209
Argent
  • 885
  • 2
  • 9
  • 18
  • @zx8754 Wrong. That so-called duplicate does not answer my question. Please re-read my question, carefully, and delete your duplicate flag. – Argent Jul 14 '19 at 23:43
  • OK, fair enough, I added linux solution where we can assign the result into a variable. Please refer to my answer [here from linked post](https://stackoverflow.com/a/57035805/680068). – zx8754 Jul 15 '19 at 08:20

0 Answers0