subsetp: Subset function that preserves column attributes.

View source: R/table1.R

subsetpR Documentation

Subset function that preserves column attributes.

Description

Subset function that preserves column attributes.

Usage

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

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).

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.

See Also

subset droplevels


table1 documentation built on Jan. 6, 2023, 5:07 p.m.