wrap_procedure: wrap_procedure

Description Usage Arguments

View source: R/control.R

Description

This function manages a procedure, which is defined as the application of a (gen) function to raw data, yielding a data frame. This data frame is then saved in the given format.

Each gen function must manage its own raw data path. The wrap procedure only provides the folder containing the file structure that hosts the raw data folders.

The wrapper also avoids doing any work if the output file exists. If the output file should be remade, delete it before running the make function.

This function should not be called directly, but is rather called by the make function. If you want to build a single variable, call the gen function directly instead.

Usage

1
wrap_procedure(fn, input_folder, output_folder, format)

Arguments

fn

The function to apply

input_folder

The folder containing the priogrid raw data.

output_folder

Where to write the output data files

format

What format to write the output data to


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