Learn R Programming

pystr (version 2.0.0)

pystr_isnumeric: Check if a string is numeric.

Description

Return TRUE if all characters in the string are numeric characters, and there is at least one character, FALSE otherwise.

Usage

pystr_isnumeric(str)

Arguments

str
A character vector.

Value

A logical vector.

References

https://docs.python.org/3/library/stdtypes.html#str.isnumeric

See Also

pystr_isalpha, pystr_isalnum

Examples

Run this code
pystr_isnumeric("123")
pystr_isnumeric("123a")
pystr_isnumeric("123!")

Run the code above in your browser using DataLab