crplyr (version 0.4.0)

filter: Filter a Crunch dataset

Description

This function applies a CrunchLogicalExpression filter to a CrunchDataset. It's a "tidy" way of doing ds[ds$var == val,].

Usage

# S3 method for CrunchDataset
filter(.data, ..., .preserve = FALSE)

Value

.data with the filter expressions applied.

Arguments

.data

A CrunchDataset

...

filter expressions

.preserve

Relevant when the .data input is grouped. If .presrve = FALSE (the default), the grouping structure is recalculated based on the resulting data, otherwise the grouping is kept as is.

Examples

Run this code
if (FALSE) {
ds %>%
   select(cyl, gear) %>%
   filter(cyl > 4) %>%
   collect()
}

Run the code above in your browser using DataLab