lsos: List objects and their sizes.

Description Usage Arguments Value Author(s) See Also Examples

Description

An improved base::ls function to list (and optionally sort) the largest objects in the workspace.

Usage

1
lsos(..., n = 10)

Arguments

...

Arguments passed to the (internal) helper function, .ls.objects().

n

A single integer. If positive, the number of rows of the returned object. If negative, all but the n last/first number of rows of the object are returned.

Value

A base::data.frame containing the objects' names, types, sizes, 'pretty' sizes, number of rows, and number of columns. If the object is list-like (e.g., an S4 object), then the 'number of rows' is given by the base::length of the object and the 'number of columns' is set to NA.

Author(s)

Based on Dirk Eddelbuetal's post to Stack Overflow (http://stackoverflow.com/q/1358003) in which he in turn credits Petr Pikal and David Hinds from the r-help mailing list circa 2004.

See Also

The function wraps the output of base::ls and pryr::object_size into a pretty format.

Examples

1
2
3
4
## Not run: 
lsos()

## End(Not run)

PeteHaitch/repete documentation built on May 8, 2019, 1:32 a.m.