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

notNA

Number of nonmissing values in a vector


Description

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

Usage

notNA(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)
notNA(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.