Learn R Programming

gdata (version 2.2.0)

ll: Display Information about Objects or Elements

Description

Display name, class, size, and dimensions of each object in a given environment. Alternatively, if the main argument is a list-like object, its elements are listed and described.

Usage

ll(pos=1, unit=c("KB","MB","bytes"), digits=0, dimensions=FALSE,
   function.dim="", sort.elements=FALSE, ...)

Arguments

pos
environment position number, environment name, data frame, list, model, or any object that is.list().
unit
required unit for displaying object size: "bytes", "KB", "MB", or first letter.
digits
number of decimals to display when rounding object size.
dimensions
whether object dimensions should be returned.
function.dim
value to report as the dimension of function objects.
sort.elements
whether elements should be sorted by name.
...
passed to ls().

Value

  • A data frame with named rows and the following columns:
  • Classobject class.
  • KBobject size (see notes).
  • Dimobject dimensions (optional).

Details

A verbose alternative to ls() and names().

See Also

ls displays names of objects in a given environment.

names, str, and summary display different information about list-like elements.

env is related to ll.

Examples

Run this code
ll()
ll(all=TRUE)
ll("package:base")
ll("package:base")[ll("package:base")$Class!="function",]

data(infert)
ll(infert)
model <- glm(case~spontaneous+induced, family=binomial, data=infert)
ll(model, dim=TRUE)
ll(model, sort=TRUE)
ll(model$family)

Run the code above in your browser using DataLab