Fills small gaps (NAs) in downsampled UID data using linear interpolation,
only for gaps that are no longer than a specified number of bins.
Assumes a regular time step (e.g., 1-minute bins) and operates within
grouping variables like rfid
and session_name
.
Usage
interpolate_gaps(
df,
max_gap = 10,
target_cols = c("temperature", "activity_index"),
add_flag = FALSE
)