format_number: Convert number to words

View source: R/format_number.R

format_numberR Documentation

Convert number to words

Description

Convert number to words

Usage

format_number(x, textual = TRUE, ...)

Arguments

x

Number.

textual

Return words. If FALSE, will run format_value().

...

Arguments to be passed to format_value() if textual is FALSE.

Value

A formatted string.

Note

The code has been adapted from here https://github.com/ateucher/useful_code/blob/master/R/numbers2words.r

Examples

format_number(2)
format_number(45)
format_number(324.68765)

easystats/insight documentation built on Dec. 3, 2024, 5:45 p.m.