Hello,

I've made up two equal data.frames consisting of two columns each, one df with NAs, the other without and then ran your code. It returned the two columns of both df's without NAs, complete cases only. So it might be better for you to post the data sets where your code fails. Or subsets of them.

Hope this helps,

Rui Barradas
Em 25-09-2012 15:29, Dimitris r escreveu:
hi,

steps taken :

files<-lapply(list.files(),read.csv,header=T)
  numberOfFiles<-length(list.files())
good<-lapply(files,complete.cases)
cleanDataSets<-list()

for (i in 1:numberOfFiles){
     cleanDataSets[i]=files[[i]][good[[i]],]
   }

with this loop for some reason i get only the first column from each data
frame from the list


if want to retrieve the only one data frame from the list i can do like
this:

files<-lapply(list.files(),read.csv,header=T)
good<-complete.cases(files[[1]])
files[[1]][good,]

thanks in advance
Dimitris

        [[alternative HTML version deleted]]

______________________________________________
R-help@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.

______________________________________________
R-help@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.

Reply via email to