| add_lead | R Documentation |
add_lead() allows you to add some data recorded in the LEAD data to
your leader-year or leader-dyad-year data.
add_lead(data, keep)
data |
a leader-year or leader-dyad-year data frame |
keep |
an optional parameter, specified as a character vector, about what leader attributes
the user wants to return from this function. If |
add_lead() takes a leader-year or leader-dyad-year data frame and adds
some data recorded in the LEAD data to it. For leader-dyad-year data, suffices
of "1" and "2" are added to the data to indicate attributes of the first
leader (obsid1) or the second leader (obsid2), respectively.
Steven V. Miller
Ellis, Carli Mortenson, Michael C. Horowitz, and Allan C. Stam. 2015. "Introducing the LEAD Data Set." International Interactions 41(4): 718–741.
# just call `library(tidyverse)` at the top of the your script
library(magrittr)
create_leaderyears() %>% add_lead()
create_leaderyears() %>% add_lead(keep = c("yrsexper"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.