objectsizes: Calculate sizes of all objects in workspace

View source: R/objectsizes.R

objectsizesR Documentation

Calculate sizes of all objects in workspace

Description

Calculate the sizes of all of the objects in one's workspace.

Usage

objectsizes(obj = NULL, sortbysize = TRUE)

Arguments

obj

Vector of object names. If missing, we pull out all object names.

sortbysize

If TRUE, sort the objects from smallest to largest.

Details

Calls utils::object.size() repeated to get the size of a list of objects.

Value

A data frame with the only column being the size of each object in megabytes (MB). The row names are the names of the objects.

See Also

utils::object.size(), base::objects()

Examples

print(output <- objectsizes())
## Not run: sum(output)


kbroman/broman documentation built on Feb. 11, 2024, 7:18 a.m.