memUse: Memory usage of saved objects

Description Usage Arguments Value Original URL Author(s) Examples

Description

Show memory usage of saved objects.

Usage

1
2
3
4
5
6
memUse(pos = 1, pattern)

## S3 method for class 'memUse'
print(x, sort = c("size", "alphabetical"),
  decreasing = ifelse(sort == "size", TRUE, FALSE), n = 10, bytes = FALSE,
  ...)

Arguments

pos

Which environment to use to list the saved objects (as a position in the search list). See ls.

pattern

An optional regular expression. See ls.

x

An object of class memUse.

sort

Whether to sort the object list by size or alphabetical order.

decreasing

Logical. Should the sort order be increasing or decreasing?

n

A single integer, giving the number of objects to display.

bytes

Logical. Whether to display the raw size in bytes.

Value

A data frame of classe memUse providing object names, class and memory usage; or 0 if no object is present in the specified environment.

Original URL

http://stackoverflow.com/a/9839949. See also the complete Stack Overflow thread: https://stackoverflow.com/questions/1358003/tricks-to-manage-the-available-memory-in-an-r-session

Author(s)

Michael Hallquist, modified by Mathieu Basille basille@ufl.edu

Examples

1
2
3
4
5
6
7
8
## Create some data
rand <- rnorm(100)
data(iris)
foo <- function(x) print(x)
##'
## Check memory usage (and raw numbers in bytes)
memUse()
memUse()$bytes

basille/basr documentation built on May 11, 2019, 8:32 p.m.