which.na | R Documentation |
Returns a vector showing the position of missing values in a vector.
which.na(x)
x |
An object which should be of |
This returns the indices of values in x
which are missing or
"Not a Number".
# A non-zero number divided by zero creates infinity,
# zero over zero creates a NaN
weird.values <- c(1/0, -2.9/0, 0/0, NA)
which.na(weird.values)
# Produces:
# [1] 3 4
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.