use_data_object: Add a data object to a data package.

Description Usage Arguments Value Examples

View source: R/use.R

Description

The data object will be added to the yml configuration file.

Usage

1
use_data_object(object_name = NULL)

Arguments

object_name

Name of the data object. Should be created by a processing script in data-raw. character vector of length 1.

Value

invisibly returns TRUE for success.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
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")
}

RGLab/DataPackageR documentation built on Nov. 12, 2018, 10:51 p.m.