Learn R Programming

qwraps2 (version 0.6.1)

ll: List Object Aliases

Description

Aliases for ls providing additional details.

Usage

ll(
  pos = 1,
  pattern,
  order_by = "size",
  decreasing = order_by %in% c("size", "rows", "columns")
)

Value

a data.frame with columns

  • object: name of the object

  • class: class, or mode if class is not present, of the object

  • size: approximate size, in bytes, of the object in memory

  • rows: number of rows for data.frames or matrices, or the number of elements for a list like structure

  • columns: number of columns for data.frames or matrices

Arguments

pos

specifies the environment as a position in the search list

pattern

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

order_by

a character, order the results by “object”, “size” (default), “class”, “rows”, or “columns”.

decreasing

logical, defaults to TRUE, decreasing order? passed to order.

References

The basis for this work came from a Stack Overflow posting: https://stackoverflow.com/q/1358003/1104685

See Also

Examples

Run this code
# View your current workspace
if (FALSE) {
ls()
ll()
}

# View another environment
e <- new.env()
ll(e)

e$fit <- lm(mpg ~ wt, mtcars)
e$fit2 <- lm(mpg ~ wt + am + vs, data = mtcars)
e$x <- rnorm(1e5)
e$y <- runif(1e4)
e$z <- with(e, x * y)
e$w <- sum(e$z)

ls(e)
ll(e)

Run the code above in your browser using DataLab