I have difficulty in understanding this piece of code :
The inner apply function gives the rows of indata which contain NAs, but I don't know what the outer apply function do ? why summing over columns ?
This piece of code is for removing NAs from indata .
na.rows = which( apply( apply( indata, 1, is.na ), 2, sum ) > 0 )
if( length( na.rows ) > 0 )
{
indata = indata[ -na.rows, ]
cat( "\n!!Removed NAs from data set!!\n" ); flush.console()
}