Does somebody knows if exist a package in R specifically for raster time series smoothing?
I´m using aproachs like this one (using the equation suggested by Hamunyella et al., 2013)
for (i in 2:(length(stacklist)-1)){
r <- raster(stacklist[i])
r1 <- raster(stacklist[i-1])
r3 <- raster(stacklist[i+1])
r2<-mean(r1,r3)
r[((r-r1)<(-0.01*r1)) & ((r-r3)<(-0.01*r3))]<-r2[((r-r1)<(-0.01*r1)) & ((r-r3)<(-0.01*r3))]
writeRaster(r,filename=paste(substr(stacklist[i], p1+1, (p1+7)),"_cropmLname.tif",sep=""),format="GTiff",overwrite=TRUE)
}
It is fast, But there is not any easiest way? For example for implement another kind of filter, like Savitzky-Golay, Double-Logistic filtering?