collect.duckplyr_df {duckplyr}R Documentation

Force conversion to a data frame

Description

This is a method for the dplyr::collect() generic. collect() converts the input to a tibble, materializing any lazy operations.

Usage

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

Arguments

x

A data frame, data frame extension (e.g. a tibble), or a lazy data frame (e.g. from dbplyr or dtplyr). See Methods, below, for more details.

...

Arguments passed on to methods

See Also

dplyr::collect()

Examples

library(duckplyr)
df <- duckdb_tibble(x = c(1, 2), .lazy = TRUE)
df
try(print(df$x))
df <- collect(df)
df

[Package duckplyr version 1.1.0 Index]