strs_isnumeric {strs} | R Documentation |
Check if string contains only numeric characters
Description
strs_isnumeric
checks whether each element of a character vector contains
only numeric characters. It is similar to Python's str.isnumeric()
method.
Usage
strs_isnumeric(string)
Arguments
string |
A character vector to be checked. |
Value
A logical vector of the same length as string
, indicating whether
each element contains only numeric characters.
See Also
Python str.isnumeric() documentation
Examples
strs_isnumeric("12345")
strs_isnumeric("123a") # contains a non-numeric character
[Package strs version 0.1.0 Index]