mda.subset: A wrapper for subset() method with proper set of attributes

View source: R/misc.R

mda.subsetR Documentation

A wrapper for subset() method with proper set of attributes

Description

A wrapper for subset() method with proper set of attributes

Usage

mda.subset(x, subset = NULL, select = NULL)

Arguments

x

dataset (data frame or matrix)

subset

which rows to keep (indices, names or logical values)

select

which columns to select (indices, names or logical values)

Details

The method works similar to the standard subset() method, with minor differences. First of all it keeps (and corrects, if necessary) all important attributes. If only columns are selected, it keeps all excluded rows as excluded. If only rows are selected, it keeps all excluded columns. If both rows and columns are selected it removes all excluded elements first and then makes the subset.

The parameters subset and select may each be a vector with numbers or names without excluded elements, or a logical expression.

Value

a data with the subset


mdatools documentation built on March 6, 2026, 5:08 p.m.