Description Usage Arguments Details Value Examples
Get the name, label or number of the canton from the Gemeindenummer
1 | get_kanton(x, render = "label", bfs = TRUE)
|
x |
a |
render |
Return |
bfs |
|
Each canton uses certain ranges of the Gemeindenummer (GEOSTAT-Nr. or BFS-Nr.)
which runs from 1 to 6806. This function converts Gemeindenummern either to the
name of the canton (if render="name"
), the two-character label
(render="label"
) or the canton number (render="number"
).
x
can either be the 1-4 digit Gemeindenummer (set bfs=TRUE
)
or the 1-2 digits canton number (bfs=FALSE
). If x
is not
a numeric vector, it is coerced to one.
a character vector of names/labels or a numeric vector.
1 2 3 4 5 6 7 | ## Not run:
get_kanton( c("4951") )
get_kanton( c("02", "3"), bfs=TRUE )
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.