Learn R Programming

matrixProfile (version 0.5.0)

movmean: Moving mean

Description

Calculates moving mean of input data.

Usage

movmean(x = x, w = w)

Arguments

x

A given input data.

w

A sliding window of length w.

Value

An array of local w-point mean values, where each mean is calculated over a sliding window of length w across neighboring elements of x. The window size is automatically truncated at the endpoints when there are not enough elements to fill the window. When the window is truncated, the average is taken over only the elements that fill the window. Output is the same size as x.

References

https://kr.mathworks.com/help/matlab/ref/movmean.html?lang=en

Examples

Run this code
# NOT RUN {
x <- 1:10
movmean(x, 3)
# }

Run the code above in your browser using DataLab