who_formatter: Formatting numbers like in WHO publications

View source: R/formating.R

who_formatterR Documentation

Formatting numbers like in WHO publications

Description

In WHO publications, population numbers are usually presented as follow:

  • 0 if < 5

  • 10 if = 5 and < 10

  • one significant digit if = 10 and < 100

  • two significant digits if = 100 and < 10 millions

  • three significant digits if = 10 millions

Usage

who_formatter(x)

Arguments

x

a numeric vector to format

Examples

who_formatter(c(3, 8, 42, 75, 45678, 9876543, 12345678))

larmarange/JLutils documentation built on March 24, 2023, 6:39 a.m.