Skip to content
Prev 179871 / 398506 Next

a general way to select a subset of matrix rows?

One simple adjustment is the following:

apply(matrix(x[rows,],nr=length(rows)),2,mean)


Quoting Peter Kharchenko <peter.kharchenko at post.harvard.edu>: