Skip to content

How to replace Inf by zero?

2 messages · marlene marchena, Don MacQueen

#
Although, in this case, the which() is unnecessary.

   x[x==Inf] <- 0

See the online help, that is,

    help('[')

and also the documentation, "An Introduction to R", available online at  CRAN.

-Don
At 2:58 PM +0100 5/29/09, marlene marchena wrote: