[R] Odp: how to analysis a dataset with some missing value?

Petr PIKAL petr.pikal at precheza.cz
Thu Aug 18 10:27:35 CEST 2011


Hi
> 
> my qustion is if my miss value in my dataset is -9999
> for example :
>   1 3 21 33 -9999  23  33  -9999
> how can I plot or analysis this dataset ignoring the missing value ? 
thanks
> .

Use NA instead of -9999 and things will get better

x<-as.numeric(read.table(textConnection("1 3 21 33 -9999  23  33 -9999")))
y<- sample(x, 1000, replace=T)
plot(y)


y[y== -9999]<-NA
plot(y)
 
Regards
Petr

> 
> -- 
> TANG Jie
> 
>    [[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at r-project.org 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.



More information about the R-help mailing list