Skip to content
Prev 245515 / 398506 Next

Odp: replace values of a table !!!

Hi

r-help-bounces at r-project.org napsal dne 21.12.2010 09:59:31:
values
Do you want to use R for it? If yes you can read the file and set -9999 as 
missing value
see ?read.table

further on you can

change not NA values to 1 by

your.data[!is.na(your.data)] <- 1

and NA values to 0 by

your.data[is.na(your.data)] <- 0

Regards
Petr
http://www.R-project.org/posting-guide.html