Skip to content

Commit

Permalink
Merge pull request #322 from fpiontek/master
Browse files Browse the repository at this point in the history
fix error in readTCdamageKrichene
  • Loading branch information
fpiontek authored Sep 28, 2022
2 parents 7cbdd29 + 10e5d0b commit 8a69d64
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/readTCdamageKrichene.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ readTCdamageKrichene <- function(subtype) {
for (q in quant) {
a2 <- a[which(a$persistence == p), ]
col <- which(colnames(a2) == paste0("estimates_", q))
if (p == 0 && q == quant[1]) {
if (p == unique(a$persistence)[1] && q == quant[1]) {
out <- new.magpie(a2$iso, NULL, paste0(p, ".", q), a2[, col], sets = c("CountryCode", "year", "persistence.quantile"))
} else {
out <- mbind(out, new.magpie(a2$iso, NULL, paste0(p, ".", q), a2[, col], sets = c("CountryCode", "year", "persistence.quantile")))
Expand Down

0 comments on commit 8a69d64

Please sign in to comment.