Learn R Programming

vtable (version 1.2.6)

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

Run this code
# NOT RUN {
x <- c(1, 1, NA, 2, 3, NA)
notNA(x)
# }

Run the code above in your browser using DataLab