Dear R community
Â
I have a large data set contain some empty cells. Because of that, may be I
am wrong, <NA> values are produced.
Now I want replace both empty and <NA> values with zero.
Â
Elder1 <- data.frame(
 ID=c("ID1","ID2","ID3","ID6","ID8"),
 age=c(38,35,"",NA,NA))
Output I am expecting
Â
IDÂ Â age
ID1Â 38
ID2Â 35
ID3Â 0
ID6Â 0
ID8Â 0
Â
In advance I thank your help.
--
View this message in context:
http://r.789695.n4.nabble.com/how-to-replace-NA-values-tp4683831.html
Sent from the R help mailing list archive at Nabble.com.
[[alternative HTML version deleted]]
______________________________________________
[email protected] 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.