powered by
Emulates behavior of find
find
find(x, sort = TRUE)
A vector of indices of x that satisfy the logical test (nonzero, by default).
object or logic operation on an object
sort output?
X <- matrix(c(1, 0, 2, 0, 1, 1, 0, 0, 4), 3, byrow = TRUE) Y <- seq(1, 19, 2) find(X) find(Y == 13)
Run the code above in your browser using DataLab