moving_average: Moving average

View source: R/moving_average.R

moving_averageR Documentation

Moving average

Description

Create a new map/matrix by doing a moving average on a matrix

Usage

moving_average(Z, r)

Arguments

Z

matrix/dataframe

r

integer : the radius of the window of the moving average. Ex : r = 1 implies a window of 3*3

Value

matrix (side effects imply a smaller matrix than the Z matrix passed in parametre)

Examples

moving_average(matrix(rnorm(10*10, 0,1), nrow = 10), r=2)

C-Juliette/randomfields documentation built on Sept. 3, 2023, 5:56 a.m.