R-script to create moving averages from matrix in x and Y!