filter: Filter a Crunch dataset

filterR Documentation

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 class 'CrunchDataset'
filter(.data, ..., .preserve = FALSE)

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.

Value

.data with the filter expressions applied.

Examples

## Not run: 
ds %>%
   select(cyl, gear) %>%
   filter(cyl > 4) %>%
   collect()

## End(Not run)

crplyr documentation built on March 31, 2023, 9:30 p.m.