Say I have the following R data.frame ZZZ:
ZZZ
( ZZZ <- structure(list(n = c(1, 2, NA), m = c(6, NA, NA), o = c(7, 8, 8)), .Names = c(\
If you only want the sum total of NAs overall, then sum() with !is.na() will do it:
ZZZ <- data.frame(n = c(1, 2, NA), m = c(6, NA, NA), o = c(7, 8, 8)) sum(!is.na(ZZZ))