location_code_to_factor: Makes a factor with a label from a vector of location codes

View source: R/location_code_to_factor.r

location_code_to_factorR Documentation

Makes a factor with a label from a vector of location codes

Description

Makes a factor with a label from a vector of location codes

Usage

location_code_to_factor(
  x,
  label = fhiplot::config$location_code_to_factor_label,
  label_if_not_unique = fhiplot::config$location_code_to_factor_label_if_not_unique,
  reference = fhidata::norway_locations_names(),
  direction = 1
)

Arguments

x

A vector of location codes

label

The label of the elements in the new factor

label_if_not_unique

The label of elements that are not unique

reference

Where you get your data

direction

-1 is reverse


folkehelseinstituttet/fhiplot documentation built on March 25, 2022, 7:59 a.m.