which.na {splus2R} | R Documentation |
Returns an integer vector describing which values in the input vector, if any, are missing.
which.na(x)
x |
an R object, which should be of mode "logical" , "numeric" , or "complex" . |
an integer vector describing which values in the input vector, if any, are missing.
anyMissing
, as.rectangular
, colIds
, colMaxs
, colMedians
, colMins
, colRanges
, colStdevs
, colVars
, deparseText
, ifelse1
, is.numeric.atomic.vector
, is.rectangular
, is.missing
, is.zero
, lowerCase
, oldUnclass
, numCols
, numRows
, peaks
, positions
, rowIds
, rowMaxs
, rmvnorm
, stdev
, subscript2d
, upperCase
, vecnorm
.
## A non-zero number divided by zero creates ## infinity, zero over zero creates a NaN weird.values <- c(1/0, -20.9/0, 0/0, NA) ## Produces: 3 4. In this example, the which.na ## expression and the subscript expression ## involving is.na should return the same value which.na(weird.values) seq(along=weird.values)[is.na(weird.values)]