dataSet {smallstuff} | R Documentation |
Obtain a Dataset from a Formula
Description
Given a formula, a dataset and a subset, retrieve the dataset that fulfills the formula and subset.
Usage
dataSet(formula, data, subset = NULL)
Arguments
formula |
A formula |
data |
A dataset |
subset |
Either a logical vector or a vector of indices of the rows to be returned. If NULL (default), all rows are returned. |
Value
The dataset in data
as a data table with variables as
specified in formula
and rows as specified by subset
.
Examples
dataSet(mpg~.-disp,mtcars,10:20)
[Package smallstuff version 1.0.3 Index]