Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

txtInt

SI or English formatting of an integer


Description

English uses ',' between every 3 numbers while the SI format recommends a ' ' if x > 10^4. The scientific form 10e+? is furthermore avoided.

Usage

txtInt(x, language = "en", html = TRUE, ...)

Arguments

x

The integer variable

language

The ISO-639-1 two-letter code for the language of interest. Currently only English is distinguished from the ISO format using a ',' as the separator.

html

If the format is used in HTML context then the space should be a non-breaking space,  

...

Passed to base::format()

Value

string

See Also

Other text formatters: txtMergeLines(), txtPval(), txtRound()

Examples

txtInt(123)
txtInt(1234)
txtInt(12345)
txtInt(123456)

htmlTable

Advanced Tables for Markdown/HTML

v2.1.0
GPL (>= 3)
Authors
Max Gordon [aut, cre], Stephen Gragg [aut], Peter Konings [aut]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.