File: get_ram.Rd

package info (click to toggle)
r-cran-benchmarkme 1.0.8-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 404 kB
  • sloc: sh: 13; makefile: 2
file content (29 lines) | stat: -rw-r--r-- 818 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_ram.R
\name{get_ram}
\alias{get_ram}
\title{Get the amount of RAM}
\usage{
get_ram()
}
\description{
Attempt to extract the amount of RAM on the current machine. This is OS
specific:
\itemize{
\item Linux: \code{proc/meminfo}
\item Apple: \code{system_profiler -detailLevel mini}
\item Windows: First tries \code{grep MemTotal /proc/meminfo} then falls back to
\code{wmic MemoryChip get Capacity}
\item Solaris: \code{prtconf}
}
A value of \code{NA} is return if it isn't possible to determine the amount of RAM.
}
\examples{
## Return (and pretty print) the amount of RAM
get_ram()
## Display using iec units
print(get_ram(), unit_system = "iec")
}
\references{
The \code{print.bytes} function was taken from the \pkg{pryr} package.
}