OUTPUT:

tableStats (class=list)

[[1]]

[,1] [,2] [,3]

[1,] 170 30 0.1500000

[2,] 59 86 0.4068966

[[2]]

[,1] [,2] [,3]

[1,] 0.000000 0.000000 0.00000000

[2,] 2.828427 2.828427 0.01950639

[[3]]

[,1] [,2] [,3]

[1,] 0 0 0.0000000

[2,] 2 2 0.0137931

OUTPUT:

mean.mat (class=matrix or array)

[,1] [,2] [,3]

[1,] 170 30 0.1500000

[2,] 59 86 0.4068966

```
dim(mean.mat) = 2 3
```

```
Error2.f <- function(mat)
1 - sum(diag(mat[,1:2]))/sum(mat[,1:2])
```

```
apply(mean.mat,1:2,Error2.f)
```

Error in mat[, 1:2] : incorrect number of dimensions

Why is this not operating on first two columns of mean.mat?

Thanks. M