Skip to content
Prev 171526 / 398503 Next

subsetting a matrix based on condition

one way is:

mat <- matrix(rnorm(2500*12), 2500, 12)

ind <- rowSums(mat > 0) > 6
mat[ind, ]


I hope it helps.

Best,
Dimitris
A Ezhil wrote: