Learn R Programming

mlr3misc (version 0.15.1)

count_missing: Count Missing Values in a Vector

Description

Same as sum(is.na(x)), but without the allocation.

Usage

count_missing(x)

Value

(integer(1)) number of missing values.

Arguments

x

vector()
Supported are logical, integer, double, complex and string vectors.

Examples

Run this code
count_missing(c(1, 2, NA, 4, NA))

Run the code above in your browser using DataLab