library(tidyverse)
library(vdemdata)
myData <- vdem %>%
mutate(region = e_regionpol_6C) %>% ## make a better region variable
mutate(region = case_match(region, # new variable called region
1 ~ "Eastern Europe",
2 ~ "Latin America",
3 ~ "Middle East",
4 ~ "Africa",
5 ~ "The West",
6 ~ "Asia")) %>%
select(country_name, year, v2x_egaldem, v2x_polyarchy, v2x_delibdem, region, v2x_regime, e_peaveduc)