which.na: Determine Missing Values

which.naR Documentation

Determine Missing Values

Description

Returns a vector showing the position of missing values in a vector.

Usage

which.na(x)

Arguments

x

An object which should be of logical, numeric, or complex

Value

This returns the indices of values in x which are missing or "Not a Number".

Examples

# A non-zero number divided by zero creates infinity,
# zero over zero creates a NaN 
weird.values <- c(1/0, -2.9/0, 0/0, NA) 
which.na(weird.values) 
# Produces:
#  [1] 3 4 

GLDEX documentation built on Aug. 21, 2023, 9:08 a.m.

Related to which.na in GLDEX...