Count Number of Missing Values - Generic function

DESCRIPTION:

Count the number of missing values. This function is generic; both S Version 3 and 4 methods can be written to handle specific classes of data. Classes which have methods include: data.frame , structure , numeric , double , single , integer , logical , list , and miVariableVirtual . (The latter is in library(missing).)

USAGE:

numberMissing(x) 

REQUIRED ARGUMENTS:

x
any object (though not all are currently supported).

VALUE:

number of missing values found.

DETAILS:

The function currently does not support any object with slots, unless a method is written for the class of the object. For objects without slots, the default method uses which.na, so methods written for that function are used by this function.

SEE ALSO:

, , .

EXAMPLES:

numberMissing(1:5) 
numberMissing(c(1, NA, 2, NA)) 
numberMissing(list(a = 1:3, b = NA)) 
numberMissing(data.frame(a = 1:3, b = c(NA, 5:6)))