From e03cb1482de4972a81cc8d468f623ae686fab654 Mon Sep 17 00:00:00 2001 From: Felix Schreyer Date: Mon, 13 Jan 2025 11:29:56 +0100 Subject: [PATCH] bugfix calculations with incineration rate of plastics as some years had NAs --- R/reportEmi.R | 3 +++ 1 file changed, 3 insertions(+) diff --git a/R/reportEmi.R b/R/reportEmi.R index 22317749..3af2f91b 100644 --- a/R/reportEmi.R +++ b/R/reportEmi.R @@ -360,6 +360,9 @@ reportEmi <- function(gdx, output = NULL, regionSubsetList = NULL, spatial = 2, react = "silent")[,t,] + # replace NA by 0 + pm_incinerationRate[is.na(pm_incinerationRate)] <- 0 + if (is.null(vm_nonIncineratedPlastics)) { vm_nonIncineratedPlastics <- (1-pm_incinerationRate) * v37_plasticWaste }