powered by
strs_isnumeric checks whether each element of a character vector contains only numeric characters. It is similar to Python's str.isnumeric() method.
strs_isnumeric
str.isnumeric()
strs_isnumeric(string)
A logical vector of the same length as string, indicating whether each element contains only numeric characters.
string
A character vector to be checked.
Python str.isnumeric() documentation
strs_isnumeric("12345") strs_isnumeric("123a") # contains a non-numeric character
Run the code above in your browser using DataLab