add_lead: Add (Select) Leader Experience and Attribute Descriptions (LEAD) Data to Leader-Year or Leader-Dyad-Year Data
Description
add_lead() allows you to add some data recorded in the LEAD data to your leader-year or leader-dyad-year data.
Usage
add_lead(data, keep)
Value
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.
Arguments
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 keep is not specified, everything from the
LEAD data in this package is returned. Otherwise, the function subsets the LEAD
data to just what the user wants.
Author
Steven V. Miller
References
Ellis, Carli Mortenson, Michael C. Horowitz, and Allan C. Stam. 2015. "Introducing the
LEAD Data Set." International Interactions 41(4): 718--741.
# \donttest{# just call `library(tidyverse)` at the top of the your scriptlibrary(magrittr)
create_leaderyears() %>% add_lead()
create_leaderyears() %>% add_lead(keep = c("yrsexper"))
# }