Skip to contents

Sets the global defaults that control how location codes become labels in format_location_code_as_factor and format_location_code_as_character. Both functions use these defaults when a call leaves label or label_if_not_unique unset.

Usage

set_global(
  location_code_to_factor_label = "location_name",
  location_code_to_factor_label_if_not_unique = "location_name_description_nb"
)

Arguments

location_code_to_factor_label

Column name in the reference data to use for location labels. Default "location_name".

location_code_to_factor_label_if_not_unique

Column name in the reference data to use when the chosen labels are not unique. Default "location_name_description_nb".

Value

Called for the side effect of updating the global configuration. Returns the assigned value invisibly.

See also

Other csstyle_utilities: colors, display_all_palettes(), every_nth()

Examples

# Set global location formatting preferences
set_global(
  location_code_to_factor_label = "custom_name",
  location_code_to_factor_label_if_not_unique = "custom_description"
)

# Reset to defaults
set_global()