igo_state_membership {igoR} | R Documentation |
Extract Memberships of a State
Description
Extract all the memberships of a state on a specific date.
Usage
igo_state_membership(state, year = NULL, status = "Full Membership")
Arguments
state |
Any valid name or code of a state as specified on
|
year |
Year to be assessed, an integer or an array of year. If |
status |
Character or vector with the membership status to be extracted. See Details on igo_year_format3. |
Value
A data.frame
.
See Also
igo_year_format3, igo_search_states()
, states2016.
Examples
# Memberships on two different dates
igo_state_membership("Spain", year = 1850)
igo_state_membership("Spain", year = 1870)
igo_state_membership("Spain", year = 1880:1882)
# Last year
igo_state_membership("ZAN")[, 1:7]
# Use codes to get countries
igo_state_membership("2", year = 1865)
# Extract different status
igo_state_membership("kosovo", status = c(
"Associate Membership", "Observer",
"Full Membership"
))
# Vectorized
igo_state_membership(c("usa", "spain"), year = 1870:1871)
# Use countrycodes package to get additional codes
if (requireNamespace("countrycode", quietly = TRUE)) {
library(countrycode)
IT <- igo_state_membership("Italy", year = 1880)
IT$iso3c <- countrycode(IT$ccode, origin = "cown", destination = "iso3c")
head(IT)
}
[Package igoR version 0.2.0 Index]