filter: Filtering data

Description Usage Arguments Details Value Author(s) Examples

Description

The subset operator on an object of class "data" filters the data given a condition on the attributes of each row.

Usage

1
data[condition]

Arguments

data

an object of class "data"

condition

an expression whose value can be coerced to a boolean.

Details

The conditional expression is evaluated for each row independently.

Value

An object of class "data" that is the subset of data consisting of the rows of data where the condition evaluated to TRUE.

Author(s)

Jon Claus at Tera Insights LLC

Examples

1
2
3
4
5
part <- Read(part100g)
selpart <- part[p_type %match% ".*BRASS" && p_size == 15]

region <- Read(region100g)
selregion <- region[r_name == "EUROPE"]

tera-insights/gtBase documentation built on May 31, 2019, 8:35 a.m.