Set or return where binding for layer or table
Source:R/layer_bindings.R
, R/table_bindings.R
where.Rd
Set or return where binding for layer or table
Usage
# S3 method for tplyr_layer
get_where(obj)
# S3 method for tplyr_layer
set_where(obj, where)
get_where(obj)
# S3 method for tplyr_table
get_where(obj)
set_where(obj, where)
# S3 method for tplyr_table
set_where(obj, where)
set_pop_where(obj, where)
get_pop_where(obj)
Arguments
- obj
A
tplyr_layer
ortplyr_table
object.- where
An expression (i.e. syntax) to be used to subset the data. Supply as programming logic (i.e. x < 5 & y == 10)
Examples
# Load in pipe
library(magrittr)
iris$Species2 <- iris$Species
lay <- tplyr_table(iris, Species) %>%
group_count(Species) %>%
set_where(Petal.Length > 3) %>%
# Set logic for pop_data as well
set_pop_where(Petal.Length > 3)