[Solved] How to found the mean of column in a matrix in R [closed]
[ad_1] Why not extract that column and take the mean?? > m <- matrix(1:10, nrow=5) > mean(m[,1]) # mean of the first column [1] 3 # mean of the second column conditional on values of column 3 are bigger than 4 > mean(x[x[,3]>4,2]) [1] 5 I don’t understand what you mean with “…second column where … Read more