Skip to content

Detecting missing variables

2 messages · Shreyasee, David Winsemius

#
If your data.frame after importing that csv file is DF, then this will  
return a list of variables with the row numbers that have missing  
values for each variables:

sapply(DF, function(x) which(is.na(x)))

But the overall tenor of you question suggests that you may need to  
back up a step and do some more basic reading of the introductory  
material that is available, including the Import/Export Manual, as  
well as re-reading the Posting Guide more carefully before your next  
question.