devtools (version 1.12.0)

use_data: Use data in a package.

Description

This function makes it easy to save package data in the correct format.

Usage

use_data(..., pkg = ".", internal = FALSE, overwrite = FALSE, compress = "bzip2")

Arguments

...
Unquoted names of existing objects to save.
pkg
Package where to store data. Defaults to package in working directory.
internal
If FALSE, saves each object in individual .rda files in the data/ directory. These are available whenever the package is loaded. If TRUE, stores all objects in a single R/sysdata.rda file. These objects are only available within the package.
overwrite
By default, use_data will not overwrite existing files. If you really want to do so, set this to TRUE.
compress
Choose the type of compression used by save. Should be one of "gzip", "bzip2" or "xz".

See Also

Other infrastructure: infrastructure, use_build_ignore, use_data_raw, use_news_md, use_package, use_readme_rmd

Examples

Run this code
## 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)

Run the code above in your browser using DataCamp Workspace