diff --git a/R/configureSystemData.R b/R/configureSystemData.R index f3a0a6c..1da51bf 100644 --- a/R/configureSystemData.R +++ b/R/configureSystemData.R @@ -29,7 +29,7 @@ configureSystemData <- function( rDataList[["stateData"]] <- list(name="stateData", data=list()) if(reshape){ - rDataList[["rsData_reg" ]] <- list(name="rsData_reg" , data=list()) + # rDataList[["rsData_reg" ]] <- list(name="rsData_reg" , data=list()) rDataList[["rsData_state"]] <- list(name="rsData_state", data=list()) } ### End if(reshape) @@ -39,7 +39,7 @@ configureSystemData <- function( ###### 1. Load Excel Data ###### ### Load region data (!silent) |> ifelse("\n", "") |> paste0(msg1, "Loading region-level data...") |> message() - loadReg0 <- loadData( + loadReg0 <- loadData( fileDir = fileDir, ### Path to project fileName = fileName, ### Name of excel file with config information sheetName = sheetName, ### Sheet with info about tables in config file @@ -62,7 +62,7 @@ configureSystemData <- function( ### Reshape region data (!silent) |> ifelse("\n", "") |> paste0(msg1, "Reshaping region-level data...") |> message() reshapeReg0 <- loadReg0|> reshapeData(byState=F, silent=silent) - if(reshape){ + if(reshape){ rDataList[["rsData_reg"]] <- reshapeReg0 } ### End if(reshape) rm(loadReg0) @@ -92,17 +92,12 @@ configureSystemData <- function( ### List of data that is the same for both state & region and not modified in configuration steps frediNames0 <- c("fredi_config") |> c("co_sectors", "co_sectorsRef", "co_stateSectors") |> - c("co_variants", "co_impactTypes") |> - c("co_impactYears", "co_impactYearLevels") |> - c("co_regions", "co_states") |> - c("co_models", "co_modelTypes") |> - c("co_econMultipliers", "co_scalarInfo") |> - c("co_slrScalars") |> - c("co_defaultTemps", "temp_default") |> - c("slr_cm", "slr_default") |> - c("gdp_default") |> - c("co_inputScenarioInfo", "testDev") |> - c("co_defaultScenario") # |> c("co_statePopRatios") + c("co_variants", "co_impactTypes", "co_impactYears", "co_impactYearLevels") |> + c("co_regions", "co_states", "co_models", "co_modelTypes", "co_inputScenarioInfo") |> + c("co_econMultipliers", "co_scalarInfo", "co_slrScalars") |> + c("co_defaultTemps", "temp_default", "slr_default", "gdp_default", "co_defaultScenario") |> + c("slr_cm") |> + c("testDev") ### Update objects # sysDataList0 |> names() |> print() frediList0 <- sysDataList0 |> (function(x){x[ names(x) %in% frediNames0 ]})()