From 37c8c38ecc0efc3cd941ea187bacf1308452a237 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Sat, 13 Jul 2024 14:15:27 -0400 Subject: [PATCH 1/2] cherry pick fix for #281 --- R/BuildModel.R | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/R/BuildModel.R b/R/BuildModel.R index b2020ef2..d5693f59 100644 --- a/R/BuildModel.R +++ b/R/BuildModel.R @@ -229,6 +229,12 @@ createCfromFactorsandBflows <- function(factors,B_flows) { flows_inBnotC <- setdiff(B_flows, colnames(C)) C[, flows_inBnotC] <- 0 C[is.na(C)] <- 0 + + if("Greenhouse Gases" %in% factors$Indicator) { + # Make sure CO2e flows are characterized (see issue #281) + f <- B_flows[!(B_flows %in% factors$Flow) & grepl("kg CO2e", B_flows)] + C["Greenhouse Gases", f] <- 1 + } # Filter and resort model C flows and make it into a matrix C <- as.matrix(C[, B_flows]) return(C) From b69161ba3305a122222348a6fdee46b25d78dcd8 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Sat, 13 Jul 2024 14:23:20 -0400 Subject: [PATCH 2/2] :bookmark: bump to v1.5.3 --- DESCRIPTION | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 4b601cec..5bbf8f77 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: useeior Type: Package Title: USEEIO R modeling software -Version: 1.5.2 -Date: 2024-6-14 +Version: 1.5.3 +Date: 2024-7-13 Authors@R: c( person("Ben","Young", email="ben.young@erg.com", role="aut"), person("Jorge","Vendries", email="jvendries@gmail.com", role="aut"),