> sapply(airquality, function(x) sum(is.na(x))) Ozone Solar.R Wind Temp Month Day 37 7 0 0 0 0
#find indices of NA's in a dataframe which(is.na(df), arr.ind=TRUE)