is.nan.data.frame: Checks for NaN is data.frame

View source: R/is.nan.data.frame.R

is.nan.data.frameR Documentation

Checks for NaN is data.frame

Description

Function by Hong Ooi; https://stackoverflow.com/questions/18142117/how-to-replace-nan-value-with-zero-in-a-huge-data-frame

Usage

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

Arguments

x

Data frame to be checked for NaN

Value

logical. Returns info if data.frame contains NaNs.

Examples

## this function will overwrite the is.nan function that works only on vectors and matrices
df<-data.frame(c(0,NaN), c(1, 2))
is.nan(df)
df[is.nan(df)]<- 0

mkajano/HDXBoxeR documentation built on Nov. 15, 2023, 3:43 p.m.