Skip to contents

Formats numeric values as rates per 100k with Norwegian conventions and 0 decimal places.

Formats numeric values as rates per 100k with Norwegian conventions and 1 decimal place.

Formats numeric values as rates per 100k with Norwegian conventions and 2 decimal places.

Usage

format_num_as_nor_per100k_0(x)

format_num_as_nor_per100k_1(x)

format_num_as_nor_per100k_2(x)

Arguments

x

Numeric vector to format.

Value

Character vector of Norwegian-formatted numbers with a "/100k" suffix.

Character vector of Norwegian-formatted numbers with a "/100k" suffix.

Character vector of Norwegian-formatted numbers with a "/100k" suffix.

Examples

# Format rates per 100k population
format_num_as_nor_per100k_0(c(123.45, 678.90, NA))
#> [1] "123 /100k" "679 /100k" "IK"       
format_num_as_nor_per100k_1(c(123.45, 678.90, NA))
#> [1] "123,5 /100k" "678,9 /100k" "IK"         
format_num_as_nor_per100k_2(c(123.45, 678.90, NA))
#> [1] "123,45 /100k" "678,90 /100k" "IK"