interpolate: 2 point interpolation

View source: R/wpp_fetch.R

interpolateR Documentation

2 point interpolation

Description

2 point interpolation

Usage

interpolate(y1, y2, x1, x2, x)

Arguments

y1, y2, x1, x2

Reference known points (x1,y1), (x2,y2)

x

Point for which we want to estimate y based on slope given by points 1 and 2

Value

y = (x - x1)/(x2-x1) * (y2-y1) + y1


josehcms/fertestr documentation built on Oct. 9, 2024, 9:03 p.m.