load_folder_data: Translates and loads multiple a data sets into an R...

Description Usage Arguments Examples

View source: R/translate.R

Description

Cycles through all of the spec files inside a folder specified in the 'spec_folder' argument. The function translates and loads each new data set to a specified R environment.

This function is meant for packages that will do not wish to ship a copy of the data set, and wish to execute the translation on the fly, preferably when the "host" package is attached.

Usage

1
2
load_folder_data(spec_folder = "inst/specs", verbose = FALSE,
  envir = baseenv(), package = NULL)

Arguments

spec_folder

The path to the folder where the YAML spec files are located. Defaults to 'inst/specs'.

verbose

If TRUE, it returns a list object with specs that where processed

envir

The target environment where the translated data set will be loaded to. Defaults to the base R environment.

package

Name of the package as a character variable. It is used in the help tracker.

Examples

1
2
3
library(datalang)
my_spec_folder <- system.file("specs", package = "datalang")
load_folder_data(my_spec_folder)

edgararuiz/datalang documentation built on May 29, 2019, 11:42 a.m.