R/getNNA.R

Defines functions getNNA

Documented in getNNA

#' Trivial function to count number of NA values in input
#' @param x vector containing the values to check for NAs
#'
#' @return numeric: the number of NA values in
#' @export
#'
#' @examples
#' getNNA(c(1:5, NA, 7:10))
#' getNNA(c(1:5, NA, 7:10))
#'
#' @family counting functions
#' @family data checking functions
#' @seealso \code{\link{getNOK}} for count of non-missing values
#'
#' @author Chris Evans
#'
#' @section History/development log:
#' Started before 5.iv.21
#'
getNNA <- function(x) {
  sum(is.na(x))
}
cpsyctc/CECPfuns documentation built on April 2, 2024, 2:03 a.m.