This function sets up the analysis by converting the report_date argument to a date object, calculating the start and end dates of the training period and forecast horizon, generating a full time span (as a character vector) from the training start date to the forecast horizon end date, setting the local cache directory, creating an output directory if it doesn't exist, and returning the specified output directory.
Usage
setup_analysis(
report_date,
training_period,
forecast_horizon,
output_dir = NULL,
local_cache_dir = NULL
)
Arguments
- report_date
Date string in yyyy-mm-dd format
- training_period
Numeric value representing the length of the training period in days
- forecast_horizon
Numeric value representing the length of the forecast horizon in days
- output_dir
Character string representing the path to the output directory
- local_cache_dir
Character string representing the path to the local cache directory