collect {crplyr}R Documentation

Collect a Crunch dataset from the server

Description

This function brings a Crunch dataset into memory so that you can work with the data using R functions. Since this can create a long running query it is recommended that you try to filter the dataset down as much as possible before running collect().

Usage

## S3 method for class 'CrunchDataset'
collect(x, ...)

## S3 method for class 'GroupedCrunchDataset'
collect(x, ...)

Arguments

x

A Crunch Dataset

...

Other arguments passed to crunch::as.data.frame()

Details

When collecting a grouped CrunchDataset, the grouping will be preserved.

Value

A tbl_df or grouped_df

Examples

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

## End(Not run)

[Package crplyr version 0.4.0 Index]