Skip to content

Commit

Permalink
fix bug in fixOnRef, avoid that 'scenario' has two meanings for R
Browse files Browse the repository at this point in the history
  • Loading branch information
orichters committed Mar 26, 2024
1 parent 03b2fe0 commit 24a2fcb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/output/single/fixOnRef.R
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ findRefMif <- function(outputdir, envi) {
return(refmif)
}

fixMAGICC <- function(d, dref, startyear, scenario) {
fixMAGICC <- function(d, dref, startyear, scen) {
magiccgrep <- "^Forcing|^Temperature|^Concentration"
message("Fixing MAGICC6 data before ", startyear)
dnew <-
Expand All @@ -47,7 +47,7 @@ fixMAGICC <- function(d, dref, startyear, scenario) {
filter(d, ! grepl(magiccgrep, .data$variable) |
.data$period >= startyear)
) %>%
mutate(scenario = factor(scenario)) %>%
mutate(scenario = factor(scen)) %>%
droplevels()
return(dnew)
}
Expand Down

0 comments on commit 24a2fcb

Please sign in to comment.