elem: Display Information about Elements in a Given Object

Description Usage Arguments Details Value Note Author(s) See Also Examples

View source: R/elem.R

Description

This function is depreciated. Please use ll instead.

Display name, class, size, and dimensions of each element in a given object.

Usage

1
2
elem(object=1, unit=c("KB","MB","bytes"), digits=0,
                 dimensions=FALSE)

Arguments

object

object containing named elements, perhaps a model or data frame.

unit

required unit for displaying element size: "KB", "MB", "bytes", or first letter.

digits

number of decimals to display when rounding element size.

dimensions

whether element dimensions should be returned.

Details

A verbose alternative to names().

Value

A data frame with named rows and the following columns:

Class

element class.

KB

element size (see notes).

Dim

element dimensions (optional).

Note

The name of the element size column is the same as the unit used.

Elements of class classRepresentation, ClassUnionRepresentation, and grob do not have a defined size, so 0 bytes are assumed for those.

Author(s)

Arni Magnusson arnima@u.washington.edu

See Also

names, str, and summary display different information about object elements.

ll and env are related to elem.

Examples

1
2
3
4
5
6
7
8
## Not run: 
data(infert)
elem(infert)
model <- glm(case~spontaneous+induced, family=binomial, data=infert)
elem(model, dim=TRUE)
elem(model$family)

## End(Not run)

gdata documentation built on May 2, 2019, 5:49 p.m.