#' Return indices of NA values
#'
#' Returns the indices of values that are `NA` in a vector.
#' Useful for comparing vectors.
#'
#' @param vector Vector with NA values to be indexed.
#'
#' @return A vector of indices of `NA` values.
#' @import magrittr
#' @noRd
#'
#' @examples
#' na_indices(vector)
na_indices <- function(vector) {
vector %>%
is.na() %>%
which()
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.