Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 201867

Forming a new matrix in R

$
0
0

Suppose I have a matrix M of 1000x20. I would like to form a new matrix M' using some particular row vectors of M. Suppose v is one of the row vectors where:

(sum(v[c(1,3,5)])<=m1)  && (m2<= sum(v)) && (sum(v)<= m3)

m1, m2 and m3 are fixed real values.


Viewing all articles
Browse latest Browse all 201867

Trending Articles