Learn R Programming

table1 (version 1.4.3)

subsetp: Subset function that preserves column attributes.

Description

Subset function that preserves column attributes.

Usage

subsetp(x, ..., droplevels = TRUE)

Value

An object similar to x containing just the selected elements. In the case of a data.frame, attributes of columns (such as label and units) are preserved.

Arguments

x

An object to be subsetted (usually a data.frame).

...

Further arguments passed to subset.

droplevels

If TRUE (the default), then unused factor levels are dropped (see droplevels).

See Also