I am calculating a moving average for 601 rasters (720, 1440)and it is taking a day to finish. I wonder if this is normal or something is wrong I am using Linux .
code: dir1 <- list.files("/home/spa4-358-4-365", "*.img", full.names = TRUE) saf=stack(dir1) meansmosas <- overlay(saf,fun=function(x) movingFun(x, fun=mean,n=35, na.rm=TRUE)) info: saf class : RasterStack dimensions : 720, 1440, 1036800, 601 (nrow, ncol, ncell, nlayers) resolution : 0.25, 0.25 (x, y) extent : -180, 180, -90, 90 (xmin, xmax, ymin, ymax) coord. ref. : +proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0 -- View this message in context: http://r.789695.n4.nabble.com/why-a-moving-average-fun-takes-too-long-time-tp4661920.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.