Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

 Quantlet: meancl Description: Computes the mean of the columns of classified data

 Usage: z = meancl(gr, fr) Input: gr m x n grid matrix, each column must be ordered ascendently fr (m-1) x n matrix of frequencies for each interval in each column Output: z 1 x n row vector of means for each column

Note:
Each column of the gr matrix represents a grid (must be ordered ascendently) and each corresponding column of fr matrix represents the numbers of observations in the corresponding intervals (given by gr matrix). E.g., for gr=#(1,2,3)~#(10,15,20) and fr=#(7,4)~#(14,16) the first dataset contains 7 observations in the interval [1,2) and 4 observations in the interval [2,3). The same is true for the second column. The representative for each interval is the mean of its boundaries.

Example:
```library("stats")
randomize(666)
; make four columns each with 15 random intervals
gr = sort(normal(5,4)|5+normal(5,4)|10+normal(5,4),0)
gr[,3] = 10 + gr[,3]
fr = ceil(30*uniform(14)~20*uniform(14,2)~2*uniform(14))
meancl(gr,fr)

```
Result:
```Contents of m
[1,]   4.6065   5.3096    14.82   4.6954
```