View source: R/as_duckplyr_df.R
as_duckplyr_df | R Documentation |
These functions convert a data-frame-like input to an object of class "duckpylr_df"
.
For such objects,
dplyr verbs such as mutate()
, select()
or filter()
will attempt to use DuckDB.
If this is not possible, the original dplyr implementation is used.
as_duckplyr_df()
requires the input to be a plain data frame or a tibble,
and will fail for any other classes, including subclasses of "data.frame"
or "tbl_df"
.
This behavior is likely to change, do not rely on it.
as_duckplyr_tibble()
converts the input to a tibble and then to a duckplyr data frame.
as_duckplyr_df(.data)
as_duckplyr_tibble(.data)
.data |
data frame or tibble to transform |
Set the DUCKPLYR_FALLBACK_INFO
and DUCKPLYR_FORCE
environment variables
for more control over the behavior, see config for more details.
For as_duckplyr_df()
, an object of class "duckplyr_df"
,
inheriting from the classes of the .data
argument.
For as_duckplyr_tibble()
, an object of class
c("duckplyr_df", class(tibble()))
.
tibble(a = 1:3) %>%
mutate(b = a + 1)
tibble(a = 1:3) %>%
as_duckplyr_df() %>%
mutate(b = a + 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.