A wrapper function for metnordic_aggregate() which aggregates files from a
start to end date (in parallel). You must supply a variable type and a method
of aggregation (eg. mean). This function is designed to take input from
metnordic_download_daterange() and provides input for
metnordic_merge_daily()
metnordic_aggregate_daterange(
directory,
variable,
method,
start,
end,
outpath,
overwrite = TRUE,
verify = FALSE,
n_cores = NULL,
verbose = TRUE
)String: Path to the source files (as downloaded by metnordic_download() or metnordic_download_daterange())
String: MET Nordic variable to aggregate (eg. "precipitation_amount", (see more))
String: method of aggregation ("mean", "min", "max", "sum")
String: start of the date range to aggregate (eg. "2015-01-01")
String: end of the date range to aggregate (eg. "2015-12-31")
String: path to directory of to be created files
Logical: overwrite existing files? (optional, default TRUE)
Logical: verify the existence of all required files? (recommended to be TRUE)
Numeric: max number of cores to perform operation with. (optional)
Logical: print to console? (optional)
Returns a named list with file paths to each aggregated file. FALSE
indicates a file failed to be aggregated, likely due to not having 24hrs
(24 individual files) to aggregated from.
Currently supported are the following types of aggregation: "mean" "min"
"max" "sum". Operations are performed in paralell on multiple cores. You can
control the number of cores used with the num_cores parameters.