This question is quite basic: I'm very confused by the documentation for rowVars in the package MatrixStats in R.
I have an array of dimensions (12, 12, 10000), ie 10000 12x12 matrices. rowMeans very easily gives me the mean of each row of each matrix in the form of a list with 10000 items. I want to do the same with rowVars to get variances.
This works fine for a single matrix, but for anything with more dimensions it gives an error message saying to use the dim argument, and I don't understand how it works. The package documentation says that dim is "An integer vector of length two specifying the dimension of x, also when not a matrix." (where x is the object the function is to be used on). However, I don't understand what this means, and haven't been able to find any helpful examples of it in use. What does 'specifying the dimension' mean- specifying how many dimensions? or specifying the size of each eg (12, 12, 10000)? If so, how can it be of length 2?
Thank you!