R/read_iotable_parameters.R

Defines functions read_iotable_parameters

Documented in read_iotable_parameters

#' Load the input parameters for the different available IO models.
#'
#' @param iotable the input-output table to be used for the analysis. Options are `example` and `fai`. Default is `example`
#'
#' @return a vector of inputs for the read_iotable function.
#'
#' @export
read_iotable_parameters <- function(iotable = c("example")) {

  ## cell ranges and file/sheet names for the example IO table
  if (iotable == "example") {
  params <- c("iotable_example","Model Calculations","D4:F7","D11:F11","H5:H7","D12:F12","J5:J7")
  }
  ## cell ranges and file/sheet names for the FAI IO table
  if (iotable == "fai") {
    params <- c("2010_UK_Alcohol_consumption_disaggregated_IxI","Sheet1","D5:DE111","D117:DE117","DG6:DG111","D120:DE120","DS6:DS111")
  }
  ## clean the vector producing the parameters
  params <- matrix(params,nrow=1,
                   dimnames = list(c(""),
                                   c("table","sheet","f_range","hhold_output_range",
                                     "hhold_demand_range","total_output_range","final_demand_range")
                                   )
                   )
return(params)
  }
djmorris1989/iomodeltobalc documentation built on June 11, 2020, 12:16 a.m.