[R] R: Changing zeros to NAs in a data frame
Vito Ricci
vito_ricci at yahoo.com
Tue Nov 16 18:20:37 CET 2004
Hi,
see this example. I hope I helped you a little bit.
Bye
Vito
dati
X Y Z
1 10 0 "0"
2 0 20 "60"
3 30 40 "50"
4 11 12 3"
> dati[dati==0]<-NA
> dati
X Y Z
1 10 NA "0"
2 NA 20 "60"
3 30 40 "50"
4 11 12 3"
=====
Diventare costruttori di soluzioni
Became solutions' constructors
"The business of the statistician is to catalyze
the scientific learning process."
George E. P. Box
Visitate il portale http://www.modugno.it/
e in particolare la sezione su Palese http://www.modugno.it/archivio/cat_palese.shtml
More information about the R-help
mailing list