Open lentinj opened 1 year ago
Also:
What happens if you would do by_year = c(1981, 1999:2004, 2010) ? It would be cool if this would be wrapped into:
if(year >= 1981 && year < 1999)
par.1981
else if(year==1999)
par.1999
....
else if(year >=2004 && year < 2010)
par.2004
else
par.2010
From the desk of @bthe:
It'd be incredibly easy to add, but I'm guessing that we'd quickly find hard-coding the years problematic, and what we really want is
by_year = yes_but_not_the_first_two_years
. This shouldn't be much harder, just needs a decent syntax. Something likeby_year = c(skip_start = 2, skip_end=2)
could work.The implementation would (with crossed fingers) just need the values substituted into the expression generated here:
https://github.com/gadget-framework/gadget3/blob/f7585beda4e12d0e854c6abe4c7e315d62b20e61/R/params.R#L19-L21