View source: R/create_stateyears.R
create_stateyears | R Documentation |
create_stateyears()
allows you to generate state-year data from either
the Correlates of War (CoW) state system membership data or the Gleditsch-Ward
(gw) system membership data.
create_stateyears(system = "cow", mry = TRUE, subset_years)
system |
a character specifying whether the user wants Correlates of War state-years ("cow") or Gleditsch-Ward ("gw") state-years. Correlates of War is the default. |
mry |
optional, defaults to TRUE. If TRUE, the function extends the
script beyond the most recent system membership updates to include observation
to the most recently concluded calendar year. For example, the Gleditsch-Ward
data extend to the end of 2017. When |
subset_years |
and optional character vector for subsetting the years
returned to just some temporal domain of interest to the user. For example,
|
The function leans on data made available in the isard package.
create_stateyears()
takes state system membership data provided
by either Correlates of War or Gleditsch-Ward and returns a simple state-year
data frame. The Gleditsch-Ward state-years also include an indicator for
whether the state is a microstate.
Steven V. Miller
Miller, Steven V. 2019. “Create Country-Year and (Non)-Directed Dyad-Year Data With Just a Few Lines in R” https://svmiller.com/blog/2019/01/create-country-year-dyad-year-from-country-data/
# CoW is default, will include years beyond 2016 (most recent CoW update)
create_stateyears()
# Gleditsch-Ward, include most recent years
create_stateyears(system="gw")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.