format_ags {ags}R 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")


[Package ags version 1.0.1 Index]