Predict data by linear interpolation from existing data
Source:R/functions.R
predict_interpolation.RdPredict data by linear interpolation from existing data
Arguments
- x
A vector of known predictor values.
- y
A vector of known response values.
- newdata
A vector of new predictor values for which the response value will be predicted
- extrapolate_predictions
Boolean indicating whether values of
newdatathat are out of the domain ofxshould be predicted (by extrapolating the slope from the endpoints ofx). IfFALSE, such values will be returned asNA.- na.rm
logical whether NA's should be removed before making predictions