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

Description Usage Arguments

View source: R/translate.R

Description

Cycles through all of the spec files inside a folder. The default behaivor is if a language setting is detected ('Sys.getenv("LANGUAGE")'), it will look for a sub-folder that matches the setting inside the 'spec_folder' path.

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_package_translations(spec_folder = "translations", verbose = TRUE,
  envir = baseenv(), language = NULL, package = NULL)

Arguments

spec_folder

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

verbose

Prints to the console the name of the original data set, and the name of the new translated data set.

envir

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

language

Optional argument that allows the target language to be specified.

package

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


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