data-raw/benin.R

# Code to clean and write original csv file.
if ( FALSE ) {
    library( tidyverse )
    benin <- read.csv("data/Benin.csv", stringsAsFactors = FALSE )
    benin <- benin %>% rename(VoteShare = vote_pop ) %>%
        mutate( Treatment = factor(Treatment,
                                   labels = c("Control", "Clientelist", "Policy")),
                Treatment = reorder(Treatment, -VoteShare))
    head( benin )

    save( benin, file = here::here( "data/benin.RData"  ) )
}
li-xinran/RIQITE documentation built on July 1, 2023, 6:58 p.m.