Returns names and ISO-2 codes for 57 World countries (listed from NordVPN servers). User can search for specific patterns (see examples below).

get_countries(pattern = NULL)

Arguments

pattern

a character of length 1. A regular expression to be matched (optional).

Value

A 2-column data.frame with:

  • country: the country name

  • iso_2: the country ISO-2 code

Examples

get_countries()
#>                           country iso_2
#> 1                         Albania    al
#> 2                       Argentina    ar
#> 3                       Australia    au
#> 4                         Austria    at
#> 5                         Belgium    be
#> 6          Bosnia and Herzegovina    ba
#> 7                          Brazil    br
#> 8                        Bulgaria    bg
#> 9                          Canada    ca
#> 10                          Chile    cl
#> 11                     Costa Rica    cr
#> 12                        Croatia    hr
#> 13                         Cyprus    cy
#> 14                        Czechia    cz
#> 15                        Denmark    dk
#> 16                        Estonia    ee
#> 17                        Finland    fi
#> 18                         France    fr
#> 19                        Georgia    ge
#> 20                        Germany    de
#> 21                         Greece    gr
#> 22                      Hong Kong    hk
#> 23                        Hungary    hu
#> 24                        Iceland    is
#> 25                          India    in
#> 26                      Indonesia    id
#> 27                        Ireland    ie
#> 28                         Israel    il
#> 29                          Italy    it
#> 30                          Japan    jp
#> 31        Korea (the Republic of)    kr
#> 32                         Latvia    lv
#> 33                     Luxembourg    lu
#> 34                       Malaysia    my
#> 35                         Mexico    mx
#> 36      Moldova (the Republic of)    md
#> 37              Netherlands (the)    nl
#> 38                    New Zealand    nz
#> 39                         Norway    no
#> 40                         Poland    pl
#> 41                       Portugal    pt
#> 42    Republic of North Macedonia    mk
#> 43                        Romania    ro
#> 44                         Serbia    rs
#> 45                      Singapore    sg
#> 46                       Slovakia    sk
#> 47                       Slovenia    si
#> 48                   South Africa    za
#> 49                          Spain    es
#> 50                         Sweden    se
#> 51                    Switzerland    ch
#> 52     Taiwan (Province of China)    tw
#> 53                       Thailand    th
#> 54                         Turkey    tr
#> 55                        Ukraine    ua
#> 56 United States of America (the)    us
#> 57                       Viet Nam    vn
get_countries(pattern = "Fr")
#>        country iso_2
#> 1       France    fr
#> 2 South Africa    za