Arguments
- x
A vector of characters.
Value
A boolean vector indicating whether each element of x
is a
letter or a number.
Examples
is_alnum(chars("Lee7c0deR 4 L1fe"))
#> L e e 7 c 0 d e R 4 L
#> TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE FALSE TRUE FALSE TRUE
#> 1 f e
#> TRUE TRUE TRUE
Filter(is_alnum, chars("2 B or !2 B"))
#> [1] "2Bor2B"