Re: [R] Replace NaN with zero

2008-11-25 Thread Mike Prager
Mike Prager <[EMAIL PROTECTED]> wrote: > The function is.nan() does not operate like is.na(). One could > consider that a design deficiency in R. I meant to write, "design inconsistency". -- Mike Prager, NOAA, Beaufort, NC * Opinions expressed are personal and not represented otherwise. * Any

Re: [R] Replace NaN with zero

2008-11-25 Thread Mike Prager
"Spilak,Jacqueline [Edm]" <[EMAIL PROTECTED]> wrote: > I need help with replacing NaN with zero (the value '0') in my dataset. > The reason is that I can't get it to graph because of the NaN in the > dataset. I have tried: > data[is.nan(data)] <- 0 > that others have suggested in the help archiv

Re: [R] Replace NaN with zero

2008-11-25 Thread Alexandre Swarowsky
what about ?sub and ?ifelse Spilak,Jacqueline [Edm] wrote: > I need help with replacing NaN with zero (the value '0') in my dataset. > The reason is that I can't get it to graph because of the NaN in the > dataset. I have tried: > data[is.nan(data)] <- 0 > that others have suggested in the help

Re: [R] Replace NaN with zero

2008-11-25 Thread Uwe Ligges
Spilak,Jacqueline [Edm] wrote: I need help with replacing NaN with zero (the value '0') in my dataset. The reason is that I can't get it to graph because of the NaN in the dataset. I have tried: data[is.nan(data)] <- 0 Since data is a data.frame and not a matrix, you might want to loop over

[R] Replace NaN with zero

2008-11-25 Thread Spilak,Jacqueline [Edm]
I need help with replacing NaN with zero (the value '0') in my dataset. The reason is that I can't get it to graph because of the NaN in the dataset. I have tried: data[is.nan(data)] <- 0 that others have suggested in the help archives but this does nothing so I am not sure what I am doing wrong.