Subset function that preserves column attributes.
subsetp(x, ..., droplevels = TRUE)
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.
An object to be subsetted (usually a data.frame
).
Further arguments passed to subset
.
If TRUE
(the default), then unused factor levels are dropped (see droplevels
).