Skip to contents

Formats a cstidy age as a factor

Formats a cstidy age as a character

Usage

format_cstidy_age_as_factor(x)

format_cstidy_age_as_character(x)

Arguments

x

a string (or multiple strings) with an age or an age group

Value

A vector of factors

A vector of characters

Examples

csstyle::format_cstidy_age_as_factor("009")
#> [1] 9 år
#> Levels: 9 år
csstyle::format_cstidy_age_as_factor("005-014")
#> [1] 5-14 år
#> Levels: 5-14 år
csstyle::format_cstidy_age_as_character("009")
#> [1] "9 år"
csstyle::format_cstidy_age_as_character("005-014")
#> [1] "5-14 år"