compute.duckplyr_df | R Documentation |
This is a method for the dplyr::compute()
generic.
For a duckplyr frame,
compute()
executes a query but stores it in a (temporary) table,
or in a Parquet or CSV file.
The result is a duckplyr frame that can be used with subsequent dplyr verbs.
## S3 method for class 'duckplyr_df'
compute(
x,
...,
prudence = NULL,
name = NULL,
schema_name = NULL,
temporary = TRUE
)
x |
A duckplyr frame. |
... |
Arguments passed on to methods |
prudence |
Memory protection, controls if DuckDB may convert intermediate results in DuckDB-managed memory to data frames in R memory.
The default is to inherit from the input.
This argument is provided here only for convenience.
The same effect can be achieved by forwarding the output to |
name |
The name of the table to store the result in. |
schema_name |
The schema to store the result in, defaults to the current schema. |
temporary |
Set to |
A duckplyr frame.
dplyr::collect()
library(duckplyr)
df <- duckdb_tibble(x = c(1, 2))
df <- mutate(df, y = 2)
explain(df)
df <- compute(df)
explain(df)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.