I use raster and related packages in R to work a bit with remote sensing. For a number of functions that I write, I would like to quickly calculate the statistics of neighborhoods / moving windows. Unfortunately, any R-implementations I or other entries are very, very slow.
I know that the caTools package offers this functionality written in C for vectors / time series, which gives 10x + time savings. Is anyone familiar with a similar package or function that provides this functionality for matrices and spatial data?
Quick example:
Ideally, I would like to do it faster and for much larger rasters.
Thanks a lot Nick
Ps. There is an interesting discussion of massive velocity differences in R-functions for performing operations with windows on vectors here: http://tolstoy.newcastle.edu.au/R/help/04/10/5161.html
source share