Interpolates missing values in sequence using stats::approx()
ps_interpolate_sequence(
x,
sequence = "DateTime",
value = "Value",
by = character(0),
max_gap = 10L,
method = "linear",
step = 0.5
)
The data.frame.
A string naming the sequence column.
A character vector of the value column.
A character vector of columns to interpolate by.
A count of the maximum gap to interpolate within.
A string specifying the method (linear or constant).
An probability (number between 0 and 1 inclusive) specifing the compromise between left- and right- continuous step function.
A tbl data frame sorted by sequence and by.