Perform a linear interpolation for any missing values for an ecodata data frame. This is useful for plotting time series with mixed frequencies.

ecodata_linear_interpolate(df, variable_names = NULL)

Arguments

df

An ecodata data frame

variable_names

Optional, vector of strings for the names of the variables in `df` to perform the linear interpolation. Default is to perform the operation on all the variables.

Value

An ecodata data frame with the same structure as `df`, with NA values replaced with linear interpolations.