load_translation: Translates and loads a data set into an R environment

Description Usage Arguments Examples

View source: R/translate.R

Description

Translates and loads the translation 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
load_translation(spec_path, envir = baseenv(), package = NULL)

Arguments

spec_path

The file location of the YAML spec translation file. It is a required argument, cannot be left empty.

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 <- system.file("specs/thisweek.yml", package = "datalang")
load_translation(my_spec)

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