make_pg: make_pg

Description Usage Arguments Value Examples

View source: R/make_priogrid.R

Description

A dispatch function that applies functions and assertions to data contained in a folder hierarchy, with each folder under input_folder containing the data needed to produce each variable. The function takes the input folder, an outputfolder which is populated with the same folders as are contained in the inputfolder, and an optional configfile, which is a YAML formatted markupfile specifying what functions and assertions pertain to each variable. The configuration file is specified per variable name, which corresponds with the names of the folders contained in the inputfolder. If no custom config file path is provided, the function tries to use the config that is supplied with the package.

Usage

1
make_pg(input_folder, output_folder, config = NULL, overwrite = FALSE)

Arguments

input_folder

A folder containing folders with data for each variable

output_folder

The destination folder to which data will be written

config

An optional custom config file for custom PRIOGrid builds

Value

The function returns a list of character vectors for each function containing info about assertions.

Examples

1
2
var_messages <- make_pg("~/Projects/pg/pgdata","~/Projects/pg/outfolder"
purrr::walk(var_messages,function(queue){sapply(queue, warning)})

prio-data/priogrid documentation built on June 28, 2021, 5:34 a.m.