collect.duckplyr_df: Force conversion to a data frame

View source: R/collect.R

collect.duckplyr_dfR 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

duckdblabs/duckplyr documentation built on Feb. 20, 2025, 1:33 p.m.