where: Subsetting by rows

Description Usage Arguments Examples

Description

Returns a subset table of the original table, based on some logical statement.

Usage

1
where(tbl, col, fun = "equal to", val)

Arguments

tbl

the input table

col

the name of the column that contains values to subset on

fun

a string containing the logical statement

val

the value to subset by

Examples

1
2
3
Table() %>%
   with_columns(list("ColumnA", c(1, 2, 3), "ColumnB", c(3, 2, 1))) %>%
   where("ColumnA", "above", 1)

sidneyle/datascienceR documentation built on May 20, 2019, 5:04 p.m.