as_tbl {duckplyr} | R Documentation |
Convert a duckplyr frame to a dbplyr table
Description
This function converts a lazy duckplyr frame or a data frame
to a dbplyr table in duckplyr's internal connection.
This allows using dbplyr functions on the data,
including hand-written SQL queries.
Use as_duckdb_tibble()
to convert back to a lazy duckplyr frame.
Usage
as_tbl(.data)
Arguments
.data |
A lazy duckplyr frame or a data frame. |
Value
A dbplyr table.
Examples
df <- duckdb_tibble(a = 1L)
df
tbl <- as_tbl(df)
tbl
tbl %>%
mutate(b = sql("a + 1")) %>%
as_duckdb_tibble()
[Package duckplyr version 1.1.0 Index]