The moving mean (also known as moving average) analyzes data points by creating a series of averages of different subsets of the chosen column.
Returns the moving average of the column, evaluated on the lag continuous rows, computed according to groups defined by the group parameter if required.
Each row represents the first value of the lags in which the column will be divided.
Function and parameters
movMean(column, lag, group, front)
It identifies the column to which you want to apply the formula. The column parameter is mandatory.
It is the number of continuous rows used to evaluate the moving average. The lag parameter is mandatory.
It allows you to group the results by a certain column. This is an optional parameter.
it is an optional parameter. If not specified,
The following example uses the HR-employee-attrition dataset.