Learn R Programming

doseminer (version 0.1.2)

numb_replacements: Dictionary of English names of numbers

Description

For internal use in words2number. When passed as a replacement to a function like str_replace_all, it turns the string into an arithmetic expression that can be evaluated to give an integer representation of the named number.

Usage

numb_replacements

Arguments

Format

An object of class character of length 49.

Details

Lifted from Ben Marwick's words2number package and converted into a named vector (previously a chain of gsub calls).

Examples

Run this code
# NOT RUN {
stringr::str_replace_all('one hundred and forty-two', numb_replacements)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab