Create package data
use_data()
makes it easy to save package data in the correct format. I
recommend you save scripts that generate package data in data-raw
: use
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. |
internal |
If If |
overwrite |
By default, |
compress |
Choose the type of compression used by |
version |
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 |
Name of the dataset to be prepared for inclusion in the package. |
open |
Open the newly created file for editing? Happens in RStudio, if
applicable, or via |
The data chapter of R Packages.
## Not run: x <- 1:10 y <- 1:100 use_data(x, y) # For external use use_data(x, y, internal = TRUE) # For internal use ## End(Not run) ## Not run: use_data_raw("daisy") ## End(Not run)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.