ls.objects: List objects and their memory usage

Description Usage Arguments Value Author(s) References Examples

Description

This functions lists the object names, type, size, and number of rows and columns in the specificed enviroment. lsos() is a shorthand interface to list the most memory heavy objects.

Usage

1
2
3
4
.ls.objects(pos = 1L, pattern, order.by, decreasing = FALSE,
  head = FALSE, n = 5)

lsos(..., n = 10)

Arguments

pos

Specifies the environment as a position in the search list.

pattern

an optional regular expression. Only names matching pattern are returned.

order.by

A character giving the column-name to sort by. Can be one of "Type", "Size", "Rows", or "Columns". If not supplied, the data.frame is not ordered.

decreasing

logical. Should the rows be in decreasing order?

head

logical. Should only the rows be returned?

n

An integer giving the number of rows to be printed. Only used in head is TRUE.

...

Parameters assed to ls.objects.

Value

A data.frame with columns "Type", "Size", "Rows", "PrettySize", and "Columns".

Author(s)

Based on Dirk Eddelbuettel, Petr Pikal, David Hinds, Tony Breyal, JD Long

References

From http://stackoverflow.com/questions/1358003/tricks-to-manage-the-available-memory-in-an-r-session

Examples

1
2
3
4
5
6
A <- 1
B <- cbind(1:2, 2:3)
C <- replicate(10, rnorm(1e6))
Bmisc:::.ls.objects()
Bmisc:::.ls.objects(order.by = "Size")
lsos()

AEBilgrau/Bmisc documentation built on May 5, 2019, 11:28 a.m.