Predict data by linear interpolation from existing data
predict_interpolation(
x,
y,
newdata,
extrapolate_predictions = TRUE,
na.rm = TRUE
)A vector of response values for each predictor value in
newdata
A vector of known predictor values.
A vector of known response values.
A vector of new predictor values for which the response value will be predicted
Boolean indicating whether values of newdata that are
out of the domain of x should be predicted (by
extrapolating the slope from the endpoints of x). If
FALSE, such values will be returned as NA.
logical whether NA's should be removed before making predictions