Learn R Programming

petersenlab (version 1.1.0)

is.nan.data.frame: NaN (Not a Number).

Description

Check whether a value is "Not A Number" (NaN) in a dataframe.

Usage

# S3 method for data.frame
is.nan(x)

Value

TRUE or FALSE, indicating whether values in a dataframe are Not a Number (NA).

Arguments

x

Dataframe.

Details

[INSERT].

See Also

https://stackoverflow.com/questions/18142117/how-to-replace-nan-value-with-zero-in-a-huge-data-frame/18143097#18143097

Other dataEvaluations: dropColsWithAllNA(), dropRowsWithAllNA(), not_all_na(), not_any_na()

Examples

Run this code
# Prepare Data
df <- data.frame(item1 = rnorm(1000), item2 = rnorm(1000), item3 = rnorm(1000))
df[sample(1:nrow(df), size = 100), c("item1","item2","item3")] <- NaN

# Calculate Missingness-Adjusted Row Sum
is.nan(df)

Run the code above in your browser using DataLab