[R] removing rows with NAs in anywere

2009-12-22 Thread milton ruser
Dear all, I have a data.frame with some NAs that can happens anywere, and I would like to keep only rows without NAs. Thanks in advance for your help, and Merry Xmas. myvect-runif(100) myvect[sample(1:100)[1:5]]-NA myDF-data.frame(matrix(myvect,ncol=5)) myDF miltinho [[alternative HTML

Re: [R] removing rows with NAs in anywere

2009-12-22 Thread Dimitris Rizopoulos
try this: myDF[complete.cases(myDF), ] Best, Dimitris milton ruser wrote: Dear all, I have a data.frame with some NAs that can happens anywere, and I would like to keep only rows without NAs. Thanks in advance for your help, and Merry Xmas. myvect-runif(100) myvect[sample(1:100)[1:5]]-NA