[R] Replacing 9999 and 999 values with NA
Alexandra Catena
amc5981 at gmail.com
Fri Feb 20 19:55:30 CET 2015
Hello All,
I have a data frame of two columns for wind. The first column is for wind
speed and the second wind direction. I'm trying to replace the 9999 values
in the first column and the 999 values in the second column with NA. I
tried to use the function ltdl.fix.df but it doesn't seem to do anything.
> ltdl.fix.df(windMV, zero2na = FALSE, coded = 999)
n = 9432 by p = 4 matrix checked, 0 NA(s) present
0 factor variable(s) present
5675 value(s) coded 999 set to NA
0 -ve value(s) set to +ve half the negative value
I have R version 3.1.1
Thanks,
Alexandra
[[alternative HTML version deleted]]
More information about the R-help
mailing list