Get the index of the first/last TRUE
A quick C implementation for “which.first” (head(which(x), 1)) and
“which.last” (tail(which(x), 1)).
wf(x, use.names = TRUE) wl(x, use.names = TRUE)
x |
[ |
use.names |
[ |
[integer(1) | integer(0)].
Returns the index of the first/last TRUE value in x or
an empty integer vector if none is found. NAs are ignored.
wf(c(FALSE, TRUE)) wl(c(FALSE, FALSE)) wf(NA)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.