[Solved] How to find the row number of a matrix when its two columns match the given values in r


use this

a = matrix(c(1,2,3,4,5,2,3,3,4,1,5,6,77,8,9,10,9,3,4,17), byrow = T, ncol = 5)
which(a[, 3] == 3 & a[ ,4] == 4)

[1] 1 2 4

0

solved How to find the row number of a matrix when its two columns match the given values in r