[R] is.infinite usage

Ernesto Jardim ernesto at ipimar.pt
Wed Apr 21 16:23:33 CEST 2004


Hi,

Is there a way of using is.infinite as is.na ? I'd like to avoid looping
the data.frame.

> mat
  x   y  z
1 1 Inf NA
2 2 Inf NA
3 3 Inf NA
> is.na(mat)
      x     y    z
1 FALSE FALSE TRUE
2 FALSE FALSE TRUE
3 FALSE FALSE TRUE

What I get at the moment is

> is.infinite(mat)
    x     y     z
FALSE FALSE FALSE

Thanks

EJ




More information about the R-help mailing list