[R] Keep a record of the observations deleted because of missing

arun smartpink111 at yahoo.com
Wed Aug 28 15:20:44 CEST 2013



Hi,
The question is not clear.
May be this helps:
set.seed(29)
dat1<- as.data.frame(matrix(sample(c(0:7,NA),10*10,replace=TRUE),ncol=10))
 which(is.na(dat1))
 #[1] 11 23 24 28 37 43 47 72 77 87
#missing value index for each column
sapply(dat1,function(x) which(is.na(x)))


A.K.




how to Keep a record of the observations deleted because of  missing? Please help me



More information about the R-help mailing list