format_ags: Formats AGS with a Leading Zero

View source: R/format_ags.R

format_agsR Documentation

Formats AGS with a Leading Zero

Description

Formats AGS with a Leading Zero

Usage

format_ags(ags, type, verbose = FALSE)

Arguments

ags

Input vector that will be coerced into an integer vector. Factor vectors are first coerced to a character vector and then to an integer vector.

type

Type of AGS supplied as ags. Three options are available:

  • land: Bundesland AGS (Bundeslandschlüssel, 2 digits)

  • district: District AGS (Kreisschlüssel, 5 digits)

  • municipality: Municipality AGS (Gemeindeschlüssel, 8 digits)

The abbreviations l, d, and m are also accepted.

verbose

If TRUE the function outputs additional information.

Value

A character vector.

Examples

format_ags(c(1,14), type="land")
format_ags(c(1002,14612), type="district")
format_ags(c(01002000,14612000), type="municipality")


sumtxt/ags documentation built on April 10, 2024, 7:20 p.m.