Fills gaps by linear interpolation when possible, or carrying forward/backward when not possible. Labels output according to filling method.
Details
Remember to use `group_by()` and `ungroup()` when needed (do NOT use `.by` with this function). Always add `dplyr::ungroup()` immediately after using this function to prevent grouped data from flowing downstream.
The function creates a Source_* column indicating: - "Original": Value was present in original data - "Linear interpolation": Value filled by linear interpolation - "Last value carried forward": Value filled by carrying last known value forward - "First value carried backwards": Value filled by carrying first known value backward