Learn R Programming

duckplyr (version 1.0.1)

collect.duckplyr_df: 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 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

Examples

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

Run the code above in your browser using DataLab