R/utils-data-processing.R
interpolate_missing_samples.RdImpute missing samples using linear interpolation
interpolate_missing_samples( data, period = NULL, tol = 1e-06, interpolate_covariates = FALSE )
| data | dataset to modify |
|---|---|
| period | period to check the times against (if |
| tol | tolerance for the period |
| interpolate_covariates |
|
the dataset, with interpolated samples
First, check if the data are evenly sampled in time. If not, we
exit early. Next, apply forecast::na.interp() to each variable that has
non-finite values.