Learn R Programming

IDPmisc (version 0.3.1)

inf.omit: Handles NA, NaN, Inf and -Inf Values in Objects

Description

Omits observations with NA, NaN, Inf and -Inf Values when object is a vector, a data.frame or a matrix.

Usage

inf.omit(x)

Arguments

x
Vector, data.frame or matrix

Value

  • Returns objects in the same way as na.omit does.

See Also

na.omit

Examples

Run this code
inf.omit(c(1,3,NaN,NA,1/0,-1/0,9))
inf.omit(data.frame(RowNr=letters[1:7],Value=c(1,3,NaN,NA,1/0,-1/0,9)))

M <- matrix(c(1,3,5,10,NaN,NA,1/0,-1/0,9:12),ncol=2)
M
inf.omit(M)

Run the code above in your browser using DataLab