R/cantons.R

Defines functions cantons

Documented in cantons

#' Vector of Swiss cantons
#'
#' @param full logical full names or two letter classification. defaults to FALSE.
#' @export
cantons <- function(full=F){
  if(full){
    c("Aargau",
      "Appenzell Ausserrhoden",
      "Appenzell Innerrhoden",
      "Basel-Land",
      "Basel-Stadt",
      "Bern",
      "Fribourg",
      "Genf",
      "Glarus",
      "Graub\u00fcnden",
      "Jura",
      "Luzern",
      "Neuenburg",
      "Nidwalden",
      "Obwalden",
      "Schaffhausen",
      "Schwyz",
      "Solothurn",
      "St. Gallen",
      "Thurgau",
      "Tessin",
      "Uri",
      "Wallis",
      "Waadt",
      "Zug",
      "Z\u00fcrich"
    )
  } else {
    c("AG",
      "AR",
      "AI",
      "BL",
      "BS",
      "BE",
      "FR",
      "GE",
      "GL",
      "GR",
      "JU",
      "LU",
      "NE",
      "NW",
      "OW",
      "SH",
      "SZ",
      "SO",
      "SG",
      "TG",
      "TI",
      "UR",
      "VS",
      "VD",
      "ZG",
      "ZH")
  }
}

Try the kofdata package in your browser

Any scripts or data that you put into this service are public.

kofdata documentation built on April 29, 2022, 9:06 a.m.