memory.summary: Summary of RAM footprint for all R objects in the current...

View source: R/NCmisc.R

memory.summaryR Documentation

Summary of RAM footprint for all R objects in the current session. Not my function, but taken from an R-Help response by Elizabeth Purdom, at Berkeley. Simply applies the function 'object.size' to the objects in ls(). Also very similar to an example in the 'Help' for the utils::object.size() function.

Description

Summary of RAM footprint for all R objects in the current session. Not my function, but taken from an R-Help response by Elizabeth Purdom, at Berkeley. Simply applies the function 'object.size' to the objects in ls(). Also very similar to an example in the 'Help' for the utils::object.size() function.

Usage

memory.summary(unit = c("kb", "mb", "gb", "b"))

Arguments

unit

default is to display "kb", but you can also choose "b"=bytes, "mb"= megabyte, or "gb" = gigabytes. Only the first letter is used, and is not case sensitive, so enter units how you like.

Value

a list of object names with memory usage in bytes

Examples

memory.summary() # shows memory used by all objects in the current session in kb
memory.summary("mb") # change units to megabytes

NCmisc documentation built on Oct. 17, 2022, 5:09 p.m.