Description Usage Arguments Value Author(s)
View source: R/module-helpers.R
Takes a wide format tibble with years as columns, coverts to long format, and
ensures values are filled in for all out_years
using the following rules:
- Linearly interpolated for missing values that have end points
- Extrapolated using an exponential decay function paramaterized by the columns
improvement.rate
and improvement.max
using the following formulation
v_0*max+(v_0-v_0*max)*(1-rate)^(y-y_0)
- For rows that specify a char value in the column improvement.shadow.technology
exponential decay will be calculated on the difference between the values calculated
by left joining with itself on the column improvement.shadow.technology
with
the column technology
. In other words for shadowing technologies the decay is
only applied to the difference in the values in the last year in which one was
specified. This is to allow for instance a Gas CC plant to have cost reductions at a
moderate pace but a Gas CC+CCS can have rapid cost reductions tothe CCS portion of
the cost.
1 | fill_exp_decay_extrapolate(d, out_years)
|
d |
The wide format tibble with values under year columns that will be filled to ensure the given years are present using the rules mentioned above. |
out_years |
A vector of integers specifying which years must have values in the output data. |
The filled out data set in long format. The years will be in the year
column and will include all values in out_years
and the filled in values will
be in the value
column. All extrapolation parameters will be cleaned out.
Pralit Patel
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.