Create package dataSource:
use_data() makes it easy to save package data in the correct format. I
recommend you save scripts that generate package data in
use_data_raw() to set it up. You also need to document exported datasets.
use_data( ..., internal = FALSE, overwrite = FALSE, compress = "bzip2", version = 2 ) use_data_raw(name = "DATASET", open = rlang::is_interactive())
Unquoted names of existing objects to save.
FALSE, saves each object in its own
.rdafile in the
data/directory. These data files bypass the usual export mechanism and are available whenever the package is loaded (or via
LazyDatais not true).
TRUE, stores all objects in a single
R/sysdata.rdafile. Objects in this file follow the usual export rules. Note that this means they will be exported if you are using the common
exportPattern()rule which exports all objects except for those that start with
use_data()will not overwrite existing files. If you really want to do so, set this to
Choose the type of compression used by
save(). Should be one of "gzip", "bzip2", or "xz".
The serialization format version to use. The default, 2, was the default format from R 1.4.0 to 3.5.3. Version 3 became the default from R 3.6.0 and can only be read by R versions 3.5.0 and higher.
Name of the dataset to be prepared for inclusion in the package.
Open the newly created file for editing? Happens in RStudio, if applicable, or via