I am writing a function, which needs a check on whether (and which!) column (variable) has all missing values (NA, ). The following is fr
NA
To find the columns with all values missing
allmisscols <- apply(dataset,2, function(x)all(is.na(x))); colswithallmiss <-names(allmisscols[allmisscols>0]); print("the columns with all values missing"); print(colswithallmiss);