Col Moving Average
Col Moving Average using Row
Summary: Calculates a moving average transformation on the 'height' column, grouping by 'sex' and 'z', while setting the window size to 800x500 and current row to 40.
Code:
Names Default To Here( 1 );
dt = Open("data_table.jmp");
dt << set window size( 800, 500 );
Row() = 40;
Try( Col Moving Average( :height, 1, 5, 0, :sex, :z ), Print( “Error thrown but no crash” ) );
Code Explanation:
- Set default names scope.
- Open data table.
- Resize window to 800x500.
- Set current row to 40.
- Attempt moving average transformation.
- Specify height column.
- Set window size to 1.
- Set window size to 5.
- Exclude missing values.
- Group by sex and z columns.