# NOT RUN {
#Setup
# Load example dataset at a greatly increased interval
x_list <- MODIS_SI_ds[seq(1,length(MODIS_SI_ds),25)]
x_dates <- do.call(c, lapply(MODIS_SI_ds,attr,"time") )[seq(1,length(MODIS_SI_ds),25)]
#Fill NAs
x_list_filled <- ts_fill_na(x_list)
#Make a sequence of output dates, double the length of input dates
out_dates <-seq.POSIXt(from = x_dates[1],
to = x_dates[length(x_dates)],length.out = length(x_dates)*2 )
#For each output date, interpolate a raster image from the input files
r_list_out <- ts_raster(r_list = x_list_filled,
r_times = x_dates,
out_times = out_dates,
fade_raster = TRUE)
#Create the frames
# as from the desired layers
r_frames <- ts_makeframes(x_list = r_list_out,samplesize = 10,
l_indices = c(1,4,3))
# }
Run the code above in your browser using DataLab