Materialises a lazy rcdf_tbl_db DuckDB-backed table into a regular
R data frame, optionally applying the variable labels and value labels stored
in the table's metadata dictionary.
Arguments
- data
A lazy
rcdf_tbl_dbobject (returned byread_rcdfwithlazy = TRUE), or any object supported bydplyr::collect().- ...
Additional arguments passed to
dplyr::collect().
Value
A tibble with all rows materialised. If the table carries a
metadata dictionary, variable labels and value labels are applied via
add_metadata before returning.
Examples
dir <- system.file("extdata", package = "rcdf")
rcdf_path <- file.path(dir, "mtcars.rcdf")
prv_key <- file.path(dir, "sample-private-key-pw.pem")
if (FALSE) { # \dontrun{
result <- read_rcdf(path = rcdf_path, decryption_key = prv_key,
password = "1234", lazy = TRUE)
df <- collect(result$mtcars)
class(df) # "tbl_df"
} # }