number_to_word: Change a number into an English word

View source: R/utils-number-to-word.R

number_to_wordR Documentation

Change a number into an English word

Description

Change a number into an English word

Usage

number_to_word(x = NA, th = FALSE, cap_first = FALSE)

Arguments

x

The number to convert

th

Logical. If TRUE the th versions will be returned, e.g. 4 = fourth

cap_first

Logical. Capitalize the first letter of the returned string?

Details

See https://github.com/ateucher/useful_code/blob/master/R/numbers2words.r See Function by John Fox found here: http://tolstoy.newcastle.edu.au/R/help/05/04/2715.html

Value

The English word representing the number

Examples

number_to_word(c(1000,2,3,10000001), th = TRUE, cap_first = TRUE)

pacific-hake/hake-assessment documentation built on Jan. 14, 2025, 9:12 p.m.