gdata (version 3.0.0)

ll: Describe Objects or Elements

Description

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

Usage

ll(pos=1, unit="KB", digits=0, dim=FALSE, sort=FALSE, class=NULL,
   invert=FALSE, ...)

Value

A data frame with named rows and the following columns:

Class

object class.

KB

object size (see note).

Dim

object dimensions (optional).

Arguments

pos

environment position number, environment name, data frame, list, model, S4 object, or any object that is.list.

unit

unit for displaying object size: "B", "KB", "MB", "GB", or first letter (case-insensitive).

digits

number of decimals to display when rounding object size.

dim

whether object dimensions should be returned.

sort

whether elements should be sorted by name.

class

character vector for limiting the output to specified classes.

invert

whether to invert the class filter, so specified classes are excluded.

...

passed to ls.

Author

Arni Magnusson, with contributions by Jim Rogers and Michael Chirico.

See Also

ll is a verbose alternative to ls (objects in an environment), names (elements in a list-like object), and slotNames (S4 object).

str and summary also describe elements in a list-like objects.

env is a related function that describes all loaded environments.

Examples

Run this code
ll()
ll(all=TRUE)
ll("package:base")
ll("package:base", class="function", invert=TRUE)

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