create_dyadyears() allows you to dyad-year data from
either the Correlates of War (
CoW) state system membership data or the
gw) system membership data. The function leans on internal
data provided in the package.
create_dyadyears(system = "cow", mry = TRUE, directed = TRUE, subset_years)
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.
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
optional, defaults to TRUE. If TRUE, the function returns so-called "directed" dyad-year data. In directed dyad-year data, France-Germany (220-255) and Germany-France (255-220) are observationally different. If FALSE, the function returns non-directed data. In non-directed data, France-Germany and Germany-France in the same year are the same observation. The standard here is to drop cases where the country code for the second observation is less than the country code for the first observation.
and optional character vector for subsetting the years
returned to just some temporal domain of interest to the user. For example,
create_dyadyears() takes state system membership data provided
by either Correlates of War or Gleditsch-Ward and returns a dyad-year data frame.
Steven V. Miller
Miller, Steven V. 2019. “Create Country-Year and (Non)-Directed Dyad-Year Data With Just a Few Lines in R” http://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_dyadyears() # Gleditsch-Ward, include most recent years create_dyadyears(system="gw") # Gleditsch-Ward, don't include most recent years create_dyadyears(system="gw", mry=FALSE) # Gleditsch-Ward, don't include most recent years, directed = FALSE create_dyadyears(system="gw", mry=FALSE, directed = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.