# \donttest{
# just call `library(tidyverse)` at the top of the your script
library(magrittr)
library(dplyr)
create_stateyears(system="gw") %>% add_ucdp_onsets()
create_stateyears() %>%
add_gwcode_to_cow() %>% add_ucdp_onsets()
# Recall, these are summaries. You'll need to post-process to what you want.
create_stateyears(system="gw") %>%
add_ucdp_onsets() %>%
mutate(onset = ifelse(sumonset1 > 0, 1, 0))
# }
Run the code above in your browser using DataLab