Description Usage Arguments Details Value Author(s) Examples
Recode Austrian "Gemeindecodes" due to changes over the years (e.g. "Gemeindestrukturreform 2015")
1 2 3 |
year |
a character or an integer containing the year |
gcd |
a vector containing Austrian "Gemeindekennziffern"
corresponding to the |
targetyear |
a character or an integer containing the
year for which the |
invalid |
a character or an integer specifying what should be returned for invalid gcd-year-combinations (see details) |
... |
further arguments in |
Different states for gcd
are available for 2011, 2012,
2013, 2015, 2016, 2017 and 2018 (first of January). All of them,
except the first one, are therefore meaningful values for
targetyear
, which has to be higher than year
.
gcdrc
is the vectorized version to be used for
different values of year
. If year
is constant
in your data, gcdrecode
should be used to avoid
needless overhead.
There are three possibilities to handle wrong gcd-year-combinations, which can be caused by wrong gcd e.g. if the last two digits are zero (60100):
invalid = "NA"
(default): result is set to
NA
invalid = "orig"
: original values of
gcd
are returned instead of recoding them
invalid = <something else>
: something else
(character or numeric) is returned
For some gcd
there is no unique match possible due to
splitting of municipalities in 2015. For these cases the
gcd
of the part with the higher population (2015) is
used and the other is skipped (warning
). The
numbers in brackets are the gcd
belonging to the names
of municipalities in 2013 (before splitting) respectively
2015 (after splitting).
Kohlberg (62336)
used Gnas (62380)
skipped Paldau (62384)
Oberstorcha (62349)
used Paldau (62384)
skipped Kirchberg an der Raab (62382)
Limbach bei Neudau (62277)
used Neudau (62274)
skipped Bad Waltersdorf (62264)
Schlag bei Thalberg (62248)
used Rohrbach an der Lafnitz (62277)
skipped Dechantskirchen (62265)
Stocking (61040)
used Wildon (61059)
skipped Sankt Georgen an der Stiefing (61055)
a vector containing Austrian "Gemeindecodes"
corresponding to the targetyear
Gerhard Nachtmann kpm.nachtmann@gmail.com
1 2 3 4 5 6 7 8 | ### 62380 is existing since 2015
gcdrecode(2011, 62380, 2015) # warning
gcdrecode(2011, 62380, 2015, invalid = "orig") # warning
gcdrecode(2011, 62380, 2015, invalid = "wrong") # warning
gcdrecode(2015, 62380, 2017) # didn't change
gcdrc(2011:2012, c(60201, 60201), 2016)
### some gcd of the sequence are not existing --> warning
gcdrc(2016, 32401:32424, 2017) # warning; WU ex 2017
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.