tbl_lazy: Create a local lazy tibble

View source: R/tbl-lazy.R

tbl_lazyR Documentation

Create a local lazy tibble

Description

These functions are useful for testing SQL generation without having to have an active database connection. See simulate_dbi() for a list available database simulations.

Usage

tbl_lazy(df, con = NULL, ..., name = "df")

lazy_frame(..., con = NULL, .name = "df")

Examples

library(dplyr)
df <- data.frame(x = 1, y = 2)

df_sqlite <- tbl_lazy(df, con = simulate_sqlite())
df_sqlite %>% summarise(x = sd(x, na.rm = TRUE)) %>% show_query()

dbplyr documentation built on May 29, 2024, 6:19 a.m.