View source: R/tar_format_nanoparquet.R
tar_format_nanoparquet | R Documentation |
Nanoparquet storage format for data frames.
Uses nanoparquet::read_parquet()
and nanoparquet::write_parquet()
to read and write data frames returned by targets in a pipeline.
Note: attributes such as dplyr
row groupings and posterior
draws info are dropped during the writing process.
tar_format_nanoparquet(compression = "snappy", class = "tbl")
compression |
Character string, compression type for saving the
data. See the |
class |
Character vector with the data frame subclasses to assign.
See the |
A targets::tar_format()
storage format specification string
that can be directly supplied to the format
argument of
targets::tar_target()
or targets::tar_option_set()
.
if (identical(Sys.getenv("TAR_LONG_EXAMPLES"), "true")) {
targets::tar_dir({ # tar_dir() runs code from a temporary directory.
targets::tar_script({
library(targets)
libary(tarchetypes)
list(
tar_target(
name = data,
command = data.frame(x = 1),
format = tar_format_nanoparquet()
)
)
})
tar_make()
tar_read(data)
})
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.