The data object will be added to the yml configuration file.
Arguments
- object_name
Name of the data object. Should be created by a processing script in data-raw.
character
vector of length 1.
Examples
if(rmarkdown::pandoc_available()){
myfile <- tempfile()
file <- system.file("extdata", "tests", "extra.rmd",
package = "DataPackageR")
datapackage_skeleton(
name = "datatest",
path = tempdir(),
code_files = file,
force = TRUE,
r_object_names = "data")
use_data_object(object_name = "newobject")
}
#> ✔ Creating '/tmp/Rtmp91YS0s/datatest/'
#> ✔ Setting active project to '/tmp/Rtmp91YS0s/datatest'
#> ✔ Creating 'R/'
#> ✔ Writing 'DESCRIPTION'
#> Package: datatest
#> Title: What the Package Does (One Line, Title Case)
#> Version: 0.0.0.9000
#> [email protected] (parsed):
#> * First Last <[email protected]> [aut, cre] (YOUR-ORCID-ID)
#> Description: What the package does (one paragraph).
#> License: `use_mit_license()`, `use_gpl3_license()` or friends to
#> pick a license
#> Encoding: UTF-8
#> Roxygen: list(markdown = TRUE)
#> RoxygenNote: 7.2.3
#> ✔ Writing 'NAMESPACE'
#> ✔ Setting active project to '/tmp/Rtmp91YS0s/file76f424531e0'
#> ✔ Setting active project to '/tmp/Rtmp91YS0s/datatest'
#> ✔ Added DataVersion string to 'DESCRIPTION'
#> ✔ Creating 'data-raw/'
#> ✔ Creating 'data/'
#> ✔ Creating 'inst/extdata/'
#> ✔ Copied extra.rmd into 'data-raw'
#> ✔ configured 'datapackager.yml' file
#> configuration:
#> files:
#> extra.rmd:
#> enabled: yes
#> objects:
#> - data
#> - newobject
#> render_root:
#> tmp: '552099'