remove_nums | R Documentation |
Dealing with strings with numbers
remove_nums(x, trimws = FALSE)
extract_nums_tgthr(x)
extract_nums_all(x)
x |
character vector, or other vector which will be coerced to character |
trimws |
logical. whether to call |
remove_nums()
: remove all the numbers from a string
extract_nums_tgthr()
: extract the numbers from a string all together
(i.e. 12aaa34
-> 1234
)
extract_nums_all()
: extract all the separate numbers from a string.
returns list of numeric vectors. (i.e., 12aaa34 -> [1] 12 [2] 34
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.