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
vectorof known predictor values.- y
A
vectorof known response values.- newdata
A
vectorof 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
logicalwhetherNA's should be removed before making predictions