Skip to content

Commit

Permalink
Merge pull request #302 from USEPA/issue_281
Browse files Browse the repository at this point in the history
Release v1.5.3
  • Loading branch information
bl-young authored Jul 15, 2024
2 parents b623b9b + b69161b commit 6d5209a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -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="[email protected]", role="aut"),
person("Jorge","Vendries", email="[email protected]", role="aut"),
Expand Down
6 changes: 6 additions & 0 deletions R/BuildModel.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 6d5209a

Please sign in to comment.