get_ram: Get the amount of RAM

View source: R/get_ram.R

get_ramR Documentation

Get the amount of RAM

Description

Attempt to extract the amount of RAM on the current machine. This is OS specific:

  • Linux: proc/meminfo

  • Apple: system_profiler -detailLevel mini

  • Windows: First tries grep MemTotal /proc/meminfo then falls back to wmic MemoryChip get Capacity

  • Solaris: prtconf

A value of NA is return if it isn't possible to determine the amount of RAM.

Usage

get_ram()

References

The print.bytes function was taken from the pryr package.

Examples

## Return (and pretty print) the amount of RAM
get_ram()
## Display using iec units
print(get_ram(), unit_system = "iec")

benchmarkme documentation built on June 12, 2022, 5:06 p.m.