I need a JSL script to take averages from multiple columns of data and subset them into a separate data table. However I need the averages to be grouped by multiple categorical identifiers. For example, for the data table below I would need the averages of SubjectA Group X, and Subject A Group y, as separate lines as shown in the second example table. Something similar to this previous question. How would I modify the script to include averages for multiple columns? If I need to make the average columns in the source data table and then subset out separately that would work as well.
Example Source Table:
| Subject | Group | Data A | Data B |
| A | x | 5 | 2 |
| A | y | 0 | 2 |
| A | x | 5 | 0 |
| B | z | 5 | 2 |
| B | x | 5 | 2 |
| B | x | 5 | 2 |
Example Output Table:
| Subject | Group | Data A Average | Data B Average |
| A | x | 5 | 1 |
| A | y | 0 | 2 |
| B | x | 5 | 2 |
| B | z | 5 | 2 |
I'm using JMP Pro 18 on Windows.