approx_fun: approx_fun

Description Usage Arguments Details Value Examples

View source: R/pipeline-helpers.R

Description

approx (interpolation) for use in a dplyr pipeline.

Usage

1
approx_fun(year, value, rule = 1)

Arguments

year

Numeric year, in a melted tibble or data frame

value

Numeric value to interpolate

rule

Rule to use; see approx and details

Details

This was gcam_interp in the original data system.

Value

Interpolated values.

Examples

1
2
df <- data.frame(year = 1:5, value = c(1, 2, NA, 4, 5))
approx_fun(df$year, df$value, rule = 2)

rohmin9122/gcam-korea-release documentation built on Nov. 26, 2020, 8:11 a.m.