prep_vdem | R Documentation |
Given a raw data.frame of vdem data, enact further automated pre-processing.
prep_vdem(
vdem,
years = NULL,
metrics = NULL,
drop_no_cow = FALSE,
cow_index = FALSE,
drop_pal = FALSE,
srb_kos = FALSE,
srb_mon = FALSE,
micro = TRUE,
iso3 = FALSE
)
vdem |
A |
years |
A numeric vector of length 2 with start and end years to subset by. |
metrics |
Character vector of vdem metrics of interest to subset against. These will be combined with country-year id variables by default. |
drop_no_cow |
Logical to drop observations without Correlates of War country codes. |
cow_index |
Logical to index vdem against valid Correlates of War country-years. |
drop_pal |
Logical to remove all Palestine related observations. |
srb_kos |
Logical to average metrics Serbia/Yugoslavia with Kosovo for all years < 2008. |
srb_mon |
Logical to calculate values for the State Union of Serbia and
Montenegro (2003-2006) using the average of Serbia's and Montenegro's
scores. To include Kosovo, specify |
micro |
Logical to keep (TRUE) or drop (FALSE) microstates. |
iso3 |
Logical to generate ISO3C country codes. |
A data.frame
of post-processed vdem data.
vdem<-demcon::get_vdem(write_out = FALSE)
vdem<-prep_vdem(vdem, years = c(2010, 2020), cow_index = TRUE, micro = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.