input_handler: Data preparation function

Description Usage Arguments Details Value Note Examples

Description

Data preparation function

Usage

1
2
input_handler(path, crops, ybetas = list(1, 1), ybeta_update = 0,
  exist_list = NULL, silent = TRUE, code = NULL)

Arguments

path

Path to data directory

crops

Character vector of crop names

ybetas

list of either 2 rasters or 2 vectors providing yield modifications for climate & irrigation. Defaults to 1, 1, currently inactive

ybeta_update

1 or 0; determines whether yield_mod_* is run or not.

exist_list

Default is NULL, other an existing list of processed inputs

silent

Hide or show print statements describing processing steps (TRUE [default] or FALSE)

Details

This function reads in the necessary raster or data.table inputs for tradeoff_mod, but will pass through an existing list if they are provided in exist_list. Yield modifications and standardizations are performed when ybeta_update = 1 and/or exist_list = NULL. In exist_list is NULL, then the full routine will always be run.

Value

List of input variables for model

Note

It is currently used internally by tradeoff_mod, but could well be pulled outside of it.

Examples

1
2
# Outdated and removed, need to be added
il <- input_handler(path = "external/data/ZA", crops = "maize")

PrincetonUniversity/agroEcoTradeoff documentation built on May 8, 2019, 3:12 p.m.