countNA: Number of missing values in a vector

View source: R/helpers.R

countNAR Documentation

Number of missing values in a vector

Description

This function calculates the number of values in a vector that are NA.

Usage

countNA(x)

Arguments

x

A vector.

Details

This function just shorthand for sum(is.na(x)), with a shorter name for reference in the vtable or sumtable summ option.

Examples

x <- c(1, 1, NA, 2, 3, NA)
countNA(x)

NickCH-K/vtable documentation built on Oct. 20, 2023, 4:35 a.m.