words2number: Convert English names of numbers to their numerical values

View source: R/numbers.R

words2numberR 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'))


Selbosh/doseminer documentation built on May 6, 2023, 8:33 p.m.