Dear mates,

I am bit of stuck with a coding, all I have to do is to clean and tranform
the missing data "-999997" of the attribute "ej" into a normal number value
in a range from 0 to 22. My steps are :

1) first return the subsets, as check, they do sum to original
2) manipulate the attribute "ej" separately and replace them

# assuming you have done one round of cleaning now and saved the result in
 a file called test.csv.

data<-read.csv("test.csv", header=T)
 data1 <- subset(data, ej=="-999997")
summary(data1)

# ND now listed as an Other field
data2 <- subset(data, ej!="-999997")
summary(data2)
# can store the contents of ej and copy them back into data1 and data2.
# or just operate on them directly;
vector_with_ej <- data1$ej
vector_without_ej <- data2$ej

So, How to do next? can anyone please give me some comments? Many thanks!

        [[alternative HTML version deleted]]

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to