rvkstat (version 3.2.0)

vkGetDbCountries: Country Dictionary.

Description

Get list of countries.

Usage

vkGetDbCountries(
    need_all     = TRUE,
    code         = NULL,
    username     = getOption("rvkstat.username"),
    api_version  = getOption("rvkstat.api_version"),
    token_path   = vkTokenPath(),
    access_token = getOption("rvkstat.access_token")
)

Arguments

need_all

Boolean TRUE or FALSE, flag <U+2014> return a list of all countries.

code

Text vector, two-letter codes of countries in ISO 3166-1 alpha-2, for which you need to give information. Example c ("RU", "UA", "BY"), a list of all codes can be viewed at the link - https://vk.com/dev/country_codes.

username

Your vkontakte login.

api_version

Vkontakte API version.

token_path

Path to dir with credentials

access_token

API access tokens obtained using vkAuth or vkGetToken functions

Value

Date frame with community statistics with the following values:

1. cid

country id.

2. title

country name.

Details

If the need_all and code parameters are not specified, then a short list of countries located closest to the current user's country is returned. If the need_all parameter is specified, a list of all countries will be returned. If the code parameter is specified, only countries with the listed ISO 3166-1 alpha-2 codes will be returned. A list of all country codes can be obtained at the link - https://vk.com/dev/country_codes

References

Documentation for API method database.getCountries: https://vk.com/dev/database.getCountries

Examples

Run this code
# NOT RUN {
## get dictionary
vk_countries <- vkGetDbCountries(need_all = T,
                                 code = c("RU","UA","BY"))

# }

Run the code above in your browser using DataLab