Description Usage Arguments Details Value See Also Examples
Uses numb_replacements
to match parts of a string corresponding
to numbers, then invokes words2number
to convert these
substrings to numeric. The rest of the string (the non-number words) is
left intact.
1 | replace_numbers(string)
|
string |
A character vector. Can contain numbers and other text |
Works on non-negative integer numbers under one billion (one thousand million). Does not support fractions or decimals (yet).
A character vector the same length as string
, with words
replaced by their decimal representations.
words2number
, for use on cleaned text that does not contain
any non-number words
1 2 3 | replace_numbers('Two plus two equals four')
replace_numbers('one hundred thousand dollars!')
replace_numbers(c('A vector', 'containing numbers', 'like thirty seven'))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.