lsos: List top n objects by size

View source: R/lsos.R

lsosR Documentation

List top n objects by size

Description

The function lsos lists the top n objects in memory.

Usage

lsos(
  pos = 1,
  pattern,
  order.by = "Size",
  decreasing = TRUE,
  head = TRUE,
  n = 10
)

Arguments

pos

where to look for the object (see get, 'Details'); if omitted search as if the name of the object appeared unquoted in an expression.

pattern

an optional regular expression (see ls). Only names matching pattern are returned. see glob2rx can be used to convert wildcard patterns to regular expressions.

order.by

Order list by one of the following: "Type", "Size", "Rows", "Columns"

decreasing

Logical. Decreasing in size (i.e. largest objects at top of list.) (Default=TRUE)

head

Logical (Default=TRUE). Should only the head be returned in the results of a data.frame. Argument n defines how many objects to include.

n

Numeric value (Default=10). Defines how many objects to include in results

Value

a data.frame object

References

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

Examples

x1 <- matrix(rnorm(10000), 100, 100)
x2 <- as.data.frame(matrix(rnorm(1000), 100, 10))
x3 <- rnorm(1000)
lsos()
rm(list=c("x1", "x2", "x3"))


marchtaylor/sinkr documentation built on July 4, 2022, 5:48 p.m.