Compares against the values of 0:9
(as a number).
Arguments
- x
A vector of characters.
Value
A boolean vector indicating whether each element of x
is a
number (appears in 0:9
as a number)
Examples
is_number(chars("Lee7c0deR"))
#> L e e 7 c 0 d e R
#> FALSE FALSE FALSE TRUE FALSE TRUE FALSE FALSE FALSE
Filter(is_number, chars("w00t"))
#> [1] "00"