See ?is.na and use its result for indexing.

Uwe Ligges

Sergio Della Franca wrote:
> Dearl R-Helpers,
> 
> 
> I have the following data set:
> 
> YEAR   PRODUCTS
> 1990     2478
> 1995     3192
> 2000     NA
> 2005     1594
> 
> 
> I wanto to replace NA values, in the PRODUCTS column, with 0.
> 
> 
> How can i obtain this?
> 
> 
> Thak you in advance.
> 
> 
> Sergio Della Franca
> 
>       [[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help@stat.math.ethz.ch 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.

______________________________________________
R-help@stat.math.ethz.ch 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.

Reply via email to