Thanks a lot Andrea, it works!

Marlene.

2009/5/29 Andrea Weidacher <da09ml@yahoo.de>

> Hi Marlene,
>
> try this:
>
> x[which(x==Inf)] <- 0
>
> Andrea.
>
> ------------------------------
> *Von:* marlene marchena <marchenamarlene@gmail.com>
> *An:* R-help@r-project.org
> *Gesendet:* Freitag, den 29. Mai 2009, 15:17:57 Uhr
> *Betreff:* [R] How to replace Inf by zero?
>
> Hi R users,
>
> Someone knows how to replace Infinite value by zero. I have a vector with
> some Inf value and I want to substitute these values by zero to get the
> mean
> of the components of the vector.
>
> Any idea?
>
> Many thanks,
>
> Marlene.
>
>     [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
>

	[[alternative HTML version deleted]]


