checkmate (version 1.7.2)

anyNaN: Check if an object contains NaN values

Description

Supported are atomic types (see is.atomic), lists and data frames.

Usage

anyNaN(x)

Arguments

x
[ANY] Object to check.

Value

  • [logical(1)] Returns TRUE if any element if NaN.

Examples

Run this code
anyNaN(1:10)
anyNaN(c(1:10, NaN))
iris[3, 3] = NaN
anyNaN(iris)

Run the code above in your browser using DataLab