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 . -- TANG Jie [[alternative HTML version deleted]]
Daniel Malter
2011-Aug-18 08:03 UTC
[R] how to analysis a dataset with some missing value?
if your vector of data is x, use x[x!=-9999]. Subseting entire data frames works analogously. HTH, Daniel -- View this message in context: http://r.789695.n4.nabble.com/how-to-analysis-a-dataset-with-some-missing-value-tp3751940p3752003.html Sent from the R help mailing list archive at Nabble.com.
Petr PIKAL
2011-Aug-18 08:27 UTC
[R] Odp: how to analysis a dataset with some missing value?
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 guidehttp://www.R-project.org/posting-guide.html> and provide commented, minimal, self-contained, reproducible code.