# ave

## Description:

The ave function breaks dataset into groups of size size, finds the average for each group, and returns a range containing these values.

## Syntax:

dataset ave(dataset vd, int size)

## Parameters:

vd

A dataset, or a range pointing to a single dataset.

size

An integer for the number of elements in each group. If the dataset size is not an even multiple of group size, then the final average will represent only mod(DatasetSize,GroupSize) elements.

## Return:

Returns a dataset.

## Examples:

groupave_B = ave(Book1_B,5);
col(Weekly) = ave(col(Days),7);
col(2) = int(65 + 35 * uniform(5000));
range raGross = [Scores]"Section 5"!"Applied Mathematics";
range raSummary = [Summary]"Section 5"!"One Hundred";
raSummary = ave(raGross,100);