words2number: Convert English names of numbers to their numerical values

Description Usage Arguments Value Source Examples

View source: R/numbers.R

Description

Convert English names of numbers to their numerical values

Usage

1

Arguments

txt

A character vector containing names of numbers (only).

Value

A named numeric vector of the same length as phrase.

Source

Originally adapted from the words2number package by Ben Marwick.

Examples

1
2
3
words2number('seven')
words2number('forty-two')
words2number(c('three', 'one', 'twenty two thousand'))

doseminer documentation built on July 19, 2021, 5:06 p.m.