Check whether a string does only contain numeric data.

StrIsNumeric(x)

Arguments

x

a character vector

Value

a logical vector with the same dimension as x

Author

Andri Signorell <andri@signorell.net>

See also

Other string functions, e.g. StrTrunc

Examples

x <- c("123", "-3.141", "foobar123")
StrIsNumeric(x)
#> [1]  TRUE  TRUE FALSE