View source: R/func_interpolate_by_index.R
interpolate_by_index | R Documentation |
interpolates between a coloumn between a defined start and end index
interpolate_by_index(
df,
index_start,
index_end,
interp_col,
index = "date",
f = zoo::na.approx,
extend = F
)
index_start |
value of index at begining of index. index must be unique. length must equal |
index_end |
end of index value |
interp_col |
names of column, or vector of names to interpolate over |
index |
name of index column, default "date" |
f |
function to use for interpolation, default |
d |
dataframe to interpolate over |
extrap |
logical. when true, na.locf is applied to the whole interpolation column after the initial interpolation, expand the first and last values to the whole column |
W. S. Drysdale
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.