The function interpolates a linear model within two points, and finds at which x the curve has a specified y.

find_intercept(x, y, inter = 0)

Arguments

x

number of x variable

y

number of y variable

inter

number of y at which you want to calculate x

Value

Examples

find_intercept(x = c(-1.1, 1.1) , y = c(-1.1, 0.9))
#> [1] -0.1