where: Subsetting by rows

Description Usage Arguments Examples

View source: R/where.R

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 June 3, 2018, 6:40 p.m.