dataSet: Obtain a Dataset from a Formula

View source: R/dataSet.R

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

smallstuff documentation built on June 2, 2022, 5:06 p.m.