[R] how to ignore "NA" or replace it by another value
HDoran at air.org
Thu Sep 21 20:53:21 CEST 2006
It depends a bit on what function you are using. For example,
xx <- c(NA, rnorm(10))
> mean(xx, na.rm=TRUE)
Is how you would use this to compute a mean.
> -----Original Message-----
> From: r-help-bounces at stat.math.ethz.ch
> [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Thomas Preuth
> Sent: Thursday, September 21, 2006 1:59 PM
> To: r-help at stat.math.ethz.ch
> Subject: [R] how to ignore "NA" or replace it by another value
> I`m a newbie to R so maybe this question is boring, but I
> have a large table with several empty missing values, which
> come out as "NA". How can i ignore them or replace them by
> another number?
> Greetings, Thomas
> R-help at stat.math.ethz.ch mailing list
> PLEASE do read the posting guide
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help