Closed Renato-Rodrigues closed 1 year ago
My work-around locally was to add gsub(" [1-9]$", "", p)
, instead of p
in the function call to fix the issue, but I am not sure if you have a more elegant solution for that.
Had a look and don't think there is a more elegant way to fix that issue, so created a PR here: https://github.com/pik-piam/piamInterfaces/pull/181
Reproduction:
Consider two group summations like for example:
group 1:
group 2:
Summation deviations charts will be created perfectly in the pdf for the first group. However, the chart for the second group will have the total black line missing, most probably because the total variable passed to the
showAreaAndBarPlots
function in the following line isEmissions|Kyoto Gases 2
instead ofEmissions|Kyoto Gases
.https://github.com/pik-piam/piamInterfaces/blob/011e72eab3a580371a5fdfcce686eaec1ff42014/R/checkSummations.R#L207