Test For Missing Values - Generic function

DESCRIPTION:
Returns an object similar to the input which is filled with logicals denoting whether the corresponding element of the input is NA.

This function is generic (see Methods); method functions can be written to handle specific classes of data. Classes which already have methods for this function include: data.frame, factor.


USAGE:
is.na(x)

REQUIRED ARGUMENTS:
x:
an S-PLUS object, which should be logical, numeric, or complex.

VALUE:
a logical object like x, with TRUE wherever there is an NA in x and FALSE elsewhere.

CLASSES:
This function will be used as the default method for classes that do not inherit a specifc method for the function. The result will retain the class and the attributes. If this behavior is not appropriate, the designer of the class should provide a method for the function.

WARNING:
This is always FALSE when x is of mode "character".

SEE ALSO:
is.finite .

EXAMPLES:
# if function transform(y) cannot take NAs:
y.ok <- !is.na(y)
y[y.ok] <- transform(y[y.ok])