download_model_inputs: Download metabolism model inputs

Description Usage Arguments Value Examples

View source: R/download_model_inputs.R

Description

Download prepared time series inputs used for estimating metabolism. This function will download and load one data frame per site. See metadata associated with data release item 4: Model inputs.

Usage

1
download_model_inputs(sitename, save_dir = temp, overwrite_file = FALSE)

Arguments

sitename

The sitename should be in the same format used in the site data. See examples below.

save_dir

Path to save .tsv file containing model inputs. If save_dir isn't specified, model inputs will not be saved locally.

overwrite_file

Boolean indicating if SITENAME_input.tsv file should be overwritten if it already exists. Default is FALSE.

Value

Returns one data frame per site containing formatted model input data.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
download_model_inputs("nwis_01184000")


## Not run: 

# Load inputs for multiple sites and save .tsv files to local directory:
selected_sites <- c("nwis_01184000","nwis_01125100")
selected_inputs_ls <- lapply(selected_sites,download_model_inputs,save_dir = "./data/model_inputs")
names(selected_inputs_ls) <- selected_sites

## End(Not run)

lekoenig/Appling356MetabolicRegimes documentation built on Dec. 21, 2021, 9:51 a.m.