Learn R Programming

biometrics (version 1.0.3)

interpy1: A simple linear interpolation function applicable to two vectors (\(X\) and \(Y\)), when the first element of \(Y\) is missing.

Description

A simple linear interpolation function applicable to two vectors (e.g., \(X\) and \(Y\)) of length three, suitable when the first element of \(Y\) is missing.

Usage

interpy1(xs = xs, ys = ys)

Value

The interpolated value for the first element of vector \(Y\).

Arguments

xs

A numeric vector of length 3

ys

A numeric vector of length 3, with the first position empty.

Author

Christian Salas-Eljatib.

Examples

Run this code
x<-c(0.2,0.8,1.3)
y<-c(NA,41,38)
interpy1(xs=x,ys=y)

Run the code above in your browser using DataLab