Skip to content

Commit

Permalink
validate CommodityCPI based on BaseIOSchema, increase tolerance sli…
Browse files Browse the repository at this point in the history
…ghtly
  • Loading branch information
bl-young committed May 23, 2024
1 parent 34127dd commit 1621d9f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/IOFunctions.R
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ transformIndustryCPItoCommodityCPIforYear <- function(year, model) {
# To avoid interruption in later calculations, they are forced to 100
CommodityCPI[CommodityCPI==0] <- 100
# Validation: check if IO year CommodityCPI is 100
if (year==2012) {
if (year==model$specs$BaseIOSchema) {
for (s in CommodityCPI) {
if (abs(100-s)>0.3) {
if (abs(100-s)>0.4) {
stop("Error in CommodityCPI")
}
}
Expand Down

0 comments on commit 1621d9f

Please sign in to comment.