- which
Index of true elements - which
examples/vectors/index_of_true_elements.R
# the index of the elements that have TRUE value which(c(TRUE, FALSE, FALSE, TRUE)) # 1, 4
# the index of the elements that have TRUE value which(c(TRUE, FALSE, FALSE, TRUE)) # 1, 4