words2number {doseminer}R Documentation

Convert English names of numbers to their numerical values

Description

Convert English names of numbers to their numerical values

Usage

words2number(txt)

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

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


[Package doseminer version 0.1.2 Index]