The data set i am using treat missing value as -99 and now I need to replace all these -99 to the number in same row but different column.
Here is the example
V1 V2 V3 V4 V5 V6 V7
1 1958 3 1958.208 315.71 315.71 314.62 -1
2 1958 4 1958.292 317.45 317.45 315.29 -1
3 1958 5 1958.375 317.50 317.50 314.71 -1
4 1958 6 1958.458 **-99.99** *317.10* 314.85 -1
I want to replace (V5, 4) with (V6, 4).
There are several missing data in V5 and we want to replace with the same row in V6.
How to achieve this?
na.string = -99when you read the data in usingread.table()and that will make `R recognize them as a missing value