use_raw_dataset: Add a raw data set to inst/extdata

Description Usage Arguments Value Examples

View source: R/use.R

Description

The file or directory specified by path will be moved into the inst/extdata directory.

Usage

1
use_raw_dataset(path = NULL, ignore = FALSE)

Arguments

path

character path to file or directory.

ignore

logical whether to ignore the path or file in git and R build.

Value

invisibly returns TRUE for success. Stops on failure.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
if(rmarkdown::pandoc_available()){
myfile <- tempfile()
file <- system.file("extdata", "tests", "extra.rmd",
                     package = "DataPackageR")
raw_data <- system.file("extdata", "tests", "raw_data",
                        package = "DataPackageR")
datapackage_skeleton(
  name = "datatest",
  path = tempdir(),
  code_files = file,
  force = TRUE,
  r_object_names = "data")
use_raw_dataset(raw_data)
}

DataPackageR documentation built on March 17, 2021, 5:07 p.m.