use_data

0th

Percentile

Use data in a package.

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

Aliases
  • use_data
Examples
# NOT RUN {
x <- 1:10
y <- 1:100

use_data(x, y) # For external use
use_data(x, y, internal = TRUE) # For internal use
# }
Documentation reproduced from package devtools, version 1.13.6, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.