View source: R/pipeline-helpers.R
| approx_fun | R Documentation | 
approx (interpolation) for use in a dplyr pipeline.
approx_fun(year, value, rule = 1)
year | 
 Numeric year, in a melted tibble or data frame  | 
value | 
 Numeric value to interpolate  | 
rule | 
 Rule to use; see   | 
This was gcam_interp in the original data system.
Interpolated values.
df <- data.frame(year = 1:5, value = c(1, 2, NA, 4, 5))
approx_fun(df$year, df$value, rule = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.