0
I’m having trouble finding a specific value in a matrix. The problem is that my matrix is too big to put here [360,181], so I’ll have to solve with an example.
x<- matrix(1:50, ncol=5)
I need something like:
x[x==14]
And he returns me:
[4,2]
Where respectively my value 14 is found in my row 4 and column 2.
Thank you!
which(x == 14, arr.ind = TRUE)
.– Rui Barradas
Thank you Rui Barradas!
– iara