Learn R Programming

CGPfunctions (version 0.6.3)

number_to_word: Convert a vector of numbers to large-number word representation

Description

Converts a vector of numbers to a character string approximation using the "short scale" version of large number names. e.g. 312e6 returns as '300 million.' Simultaneously returns a numeric representation of the approximation.

Usage

number_to_word(x, nsmall = 0)

Arguments

x

A vector of numbers to convert.

nsmall

Optional. An integer number of digits to include to the right of the the leading digit

Value

A string representation of the number