library(tricky)

Parse numbers

parse_French_number(x = "1 123,123")

Format numbers

format_num formats numbers according to a locale (either French or English). format_num() is just a wrapper for the base-R format() function. Therefore, it is possible to use standard arguments of the format() functions such as scientifif = TRUE/FALSE.

format_num(x = 1233.123, locale = "fr")
format_num(x = 1233.123, locale = "en")
format_num(x = 1233.123, locale = "fr", scientific = TRUE)
format_num(x = 1233.123, locale = "en", scientific = TRUE)


pachevalier/tricky documentation built on May 24, 2019, 5:57 p.m.