use_raw_dataset: Add a raw data set to inst/extdata

View source: R/use.R

use_raw_datasetR Documentation

Add a raw data set to inst/extdata

Description

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

Usage

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

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)
}

ropensci/DataPackageR documentation built on April 17, 2024, 11:43 a.m.