Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

mem_used

How much memory is currently used by R?


Description

R breaks down memory usage into Vcells (memory used by vectors) and Ncells (memory used by everything else). However, neither this distinction nor the "gc trigger" and "max used" columns are typically important. What we're usually most interested in is the the first column: the total memory used. This function wraps around gc() to return the total amount of memory (in megabytes) currently used by R.

Usage

mem_used()

Value

Megabytes of ram used by R objects.

Examples

mem_used()

pryr

Tools for Computing on the Language

v0.1.4
GPL-2
Authors
Hadley Wickham [aut, cre], R Core team [ctb] (Some code extracted from base R)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.