Индекс в р

which(myVector == 1)
# will return all the indices that satisfy the argument
Rocku0