Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

propNA

Proportion or number of missing values in a vector


Description

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

Usage

propNA(x)

Arguments

x

A vector.

Details

This function just shorthand for mean(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)
propNA(x)

vtable

Variable Table for Variable Documentation

v1.3.1
MIT + file LICENSE
Authors
Nick Huntington-Klein [aut, cre]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.