Identify strings in a character vector that cannot be interpreted as valid numbers. This is an internal utility function, not intended to be called by package users.
notANumber(x, result=c("logical", "values"))
If result
is "logical", a logical vector as long as x
that
is TRUE for those elements that cannot be interpreted as valid numbers.
If result
is "values", a character vector containing the unique
values in x
that cannot be interpreted as valid numbers.
A character vector.
The form of result to be returned (see VALUE).
Which character strings can or cannot be interpreted as valid numbers is
determined by the function as.numeric
. Note that the empty string
"" is considered a valid representation of NA.