notANumber: Identify Strings that Cannot be Interpreted as Numbers

Description Usage Arguments Details Value

View source: R/notANumber.bare.R

Description

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.

Usage

1
notANumber(x, result=c("logical", "values"))

Arguments

x

A character vector.

result

The form of result to be returned (see VALUE).

Details

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.

Value

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.


tablesgg documentation built on June 3, 2021, 1:06 a.m.