Re: [R] Cannot clean infinite values

2011-08-04 Thread mayouf.k
hi everyone, i had the same problem, i simply wrote: *ifelse(is.infinite(AALB),NA,AALB)* this code replace infinite values by NA's, then you can use "na.omit", "replace", or even a zero, which is my case. goog luck Nigel -- View this message in context: http://r.789695.n4.nabble.com/

Re: [R] Cannot clean infinite values

2009-04-26 Thread Ben Bolker
Nigel Birney wrote: > > 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

Re: [R] Cannot clean infinite values

2009-04-26 Thread Sundar Dorai-Raj
Use ?is.infinite inf <- is.infinite(data) data[inf] <- 0.3 * sign(data[inf]) On Sun, Apr 26, 2009 at 5:44 PM, Nigel Birney wrote: > > 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: >

Re: [R] Cannot clean infinite values

2009-04-26 Thread Charles Annis, P.E.
, April 26, 2009 8:45 PM To: r-help@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"

[R] Cannot clean infinite values

2009-04-26 Thread Nigel Birney
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 sugg