Skip to content
Prev 178441 / 398503 Next

Cannot clean infinite values

?is.infinite

Charles Annis, P.E.

Charles.Annis at StatisticalEngineering.com
phone: 561-352-9699
eFax:  614-455-3265
http://www.StatisticalEngineering.com
 
-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On
Behalf Of Nigel Birney
Sent: Sunday, April 26, 2009 8:45 PM
To: r-help at r-project.org
Subject: [R] Cannot clean infinite values


Hello all,

I have to import numeric data from file but found it contains Infinite
values which need to be eliminated. I tried to replace them in this way:

	data[which(data=="-Inf")] <- -0.3
	data[which(data=="+Inf")] <-  0.3

But, somehow, the Infinite values stayed there. Any suggestions?

regards,

N.