Learn R Programming

igoR (version 0.2.1)

igo_members: Extract members of an IGO

Description

Extract all the countries belonging to an IGO on a specific date.

Usage

igo_members(ioname, year = NULL, status = "Full Membership")

Value

A data.frame.

Arguments

ioname

Any valid ioname of an IGO as specified on igo_year_format3. It could be also a vector of IGOs.

year

Year to be assessed, an integer or an array of year. If NULL the latest year available of the IGO would be extracted.

status

Character or vector with the membership status to be extracted. See Details on state_year_format3.

See Also

igo_year_format3, igo_search(), state_year_format3.

Examples

Run this code
library(dplyr)
igo_members("EU", year = 1993) %>% as_tibble()
igo_members("EU") %>% as_tibble()
igo_members("NAFTA", year = c(1995:1998)) %>% as_tibble()

# Extract different status
igo_members("ACCT", status = c("Associate Membership", "Observer")) %>%
  as_tibble()

# States no members of the UN
igo_members("UN", status = "No Membership") %>%
  as_tibble()

# Vectorized
igo_members(c("NAFTA", "EU"), year = 1993) %>%
  as_tibble() %>%
  arrange(state)

# Use countrycodes package to get additional codes
if (requireNamespace("countrycode", quietly = TRUE)) {
  library(countrycode)
  EU <- igo_members("EU")
  EU$iso3c <- countrycode(EU$ccode, origin = "cown", destination = "iso3c")

  EU$continent <- countrycode(EU$ccode,
    origin = "cown",
    destination = "continent"
  )

  tibble(EU)
}

Run the code above in your browser using DataLab