Learn R Programming

plgraphics (version 1.2)

nainf.exclude: Drop Rows Containing NA or Inf

Description

Drops the rows of a data frame that contain an NA, an NaN, or an Inf value

Usage

nainf.exclude(object, ...)

Value

The value is of the same type as the argument object, with possibly less elements.

Arguments

object

an R object, typically a data frame

...

further arguments special methods could require.

Author

Werner A. Stahel, ETH Zurich

Details

This is a simple modification of na.omit and na.exclude

See Also

Examples

Run this code
t.d <- data.frame(V1=c(1,2,NA,4), V2=c(11,12,13,Inf))
nainf.exclude(t.d)

Run the code above in your browser using DataLab