which.first | R Documentation |
TRUE
value in a logical vector.Find the index of first/last TRUE
value in a logical vector.
which.first(x, use.names = TRUE) which.last(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.
which.first(c(FALSE, TRUE)) which.last(c(FALSE, FALSE))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.