add_lead: Add (Select) Leader Experience and Attribute Descriptions...

View source: R/add_lead.R

add_leadR Documentation

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)

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.

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.

Author(s)

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.

Examples



# just call `library(tidyverse)` at the top of the your script
library(magrittr)

create_leaderyears() %>% add_lead()

create_leaderyears() %>% add_lead(keep = c("yrsexper"))



peacesciencer documentation built on March 31, 2023, 8:37 p.m.