crplyr (version 0.3.8)

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)

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

Run this code
# NOT RUN {
ds %>%
   select(cyl, gear) %>%
   filter(cyl > 4) %>%
   collect()
# }

Run the code above in your browser using DataCamp Workspace