I would think apply(iris3, 3, cov) will work, but it doesn\'t. I expect the output to be 4 x 4 x 3 for 4 x 4 for covariance matrix and 3 for 3 types of iris.