Learn R Programming

crunch (version 1.3.2)

dataset-extract: Subset datasets and extract variables

Description

Subset datasets and extract variables

Usage

## S3 method for class 'CrunchDataset,ANY':
[(x, i, j, ..., drop = TRUE)

## S3 method for class 'CrunchDataset,character': [(x, i, j, ..., drop = TRUE)

## S3 method for class 'CrunchDataset,missing': [(x, i, j, ..., drop = FALSE)

## S3 method for class 'CrunchDataset,ANY': [[(x, i, ..., drop = FALSE)

## S3 method for class 'CrunchDataset,character': [[(x, i, ..., drop = FALSE)

## S3 method for class 'CrunchDataset': $(x, name)

Arguments

x
a CrunchDataset
i
if character, identifies variables to extract based on their aliases (by default, i.e. when x's useAlias is TRUE); if numeric or logical, extracts variables accordingly. Note that this is the as.list extraction, columns of the dataset rather
j
column extraction, as described above
...
additional arguments
drop
logical: autmatically simplify a 1-column Dataset to a Variable? Default is FALSE, and the TRUE option is in fact not implemented.
name
like i but for $

Value

  • [ yields a Dataset; [[ and $ return a Variable