Not Available / ``Missing'' Values

Usage

NA
is.na(x)

Description

NA is a logical constant of length 1 which contains a missing value indicator. NA can be freely coerced to any other vector type.

is.na takes a vector argument and returns a logical vector of the same length containing TRUE for those elements marked NA or NaN (!) and FALSE otherwise. dim, dimnames and names attributes are preserved.

See Also

NaN, is.nan, etc. and the utility function complete.cases.

na.action, na.omit, na.fail on how methods can be tuned to deal with missing values.

Examples

is.na(c(1,NA))       #> F TRUE
is.na(paste(c(1,NA)))#> F FALSE


[Package Contents]