[R] Can I replace NA by 0 (if yes, how) ?

Ptit_Bleu ptit_bleu at yahoo.fr
Wed Nov 7 17:28:00 CET 2007

I found this solution but it must another one much more "R-friendly" ?

for (a in 1:9) {
if (is.na(pfit$coefficients[[a]])) (pfit$coefficients[[a]]<-0)

Again thank you in advance for explainations concerning NA,
Ptit Bleu.
View this message in context: http://www.nabble.com/Can-I-replace-NA-by-0-%28if-yes%2C-how%29---tf4765597.html#a13630590
Sent from the R help mailing list archive at Nabble.com.

More information about the R-help mailing list