stw_use_data: Create and document package-data

Description Usage Arguments Value

View source: R/stw_use_data.R

Description

This function wraps the functionality of usethis::use_data() and stw_write_roxygen() to write a data-frame (or tibble) to your package data, as well as to write the Roxygen-documentation to a file in your package's R directory.

Usage

1
2
3
4
5
6
7
8
stw_use_data(
  ...,
  file_doc = NULL,
  keep_steward = FALSE,
  overwrite = FALSE,
  compress = "bzip2",
  version = 2
)

Arguments

...

Unquoted names of existing objects to save.

file_doc

character name of the Roxygen-documentation file to be written to the package's R directory; default is "data-{name-of-first-dataset}.R"

keep_steward

logical indicates to keep the steward classes and attributes when writing the dataset to 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".

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.

Value

invisible(NULL), called for side-effects


ijlyttle/steward documentation built on Jan. 5, 2021, 2:25 p.m.