R/identify_non_na_elements.R

Defines functions identify_non_na_elements

Documented in identify_non_na_elements

#' Find the index of list elements that are not NA
#'
#' @param x a list
#'
#' @return a vector of the numeric indexes where non-NA values are found
identify_non_na_elements <- function(x) {
  x %>%
    lapply(is.na) %>%
    sapply(all) %>%
    `!`() %>%
    which()
}
henobe/flexoptr documentation built on March 11, 2021, 6:04 p.m.