Q:

How to get system (Windows) memory in R?

Does anyone know how to get the memory (RAM) used by the system from R?
I'm using windows. memory.size() and mem_used() functions give you the memory used by R and R objects respectively, but they doesn't consider the memory already occupied by the system and other software. 

A:

This is one way using shell on Windows:
shell('systeminfo | findstr Memory')
#Total Physical Memory:     16,271 MB
#Available Physical Memory: 8,011 MB
#Virtual Memory: Max Size:  32,655 MB
#Virtual Memory: Available: 24,040 MB
#Virtual Memory: In Use:    8,615 MB

You could use a different string instead of Memory if you want more granular results.

