R/which_NA.R

Defines functions which_notNA which_NA

which_NA <- function(x) {
  ans <- .Call("Cwhich_isna", x, FALSE, 1L, PACKAGE = packageName)
  if (is.null(ans)) {
    return(seq_along(x))
  }
  ans
}

which_notNA <- function(x) {
  ans <- .Call("Cwhich_isna", x, TRUE, 1L, PACKAGE = packageName)
  if (is.null(ans)) {
    return(seq_along(x))
  }
  ans
}
HughParsonage/hutilscpp documentation built on March 1, 2025, 12:29 p.m.