library(dplyr)
# --- VECTOR ----
values <- c(1,2,3, 4*2, 5,6,7, NA, 9,10,11, 12*2)
values
# Linear interpolation + Outlier Cleansing
ts_clean_vec(values, period = 1, lambda = NULL)
# Seasonal Interpolation: set period = 4
ts_clean_vec(values, period = 4, lambda = NULL)
# Seasonal Interpolation with Box Cox Transformation (internal)
ts_clean_vec(values, period = 4, lambda = "auto")
Run the code above in your browser using DataLab