Creates a dataframe indicating start and end time point
get_actor_time_info.Rd
get_actor_time_info
takes in a longitudinal dyadic dataset and computes when
actors entered and exited the network. Entering will be determined by the
first period the actor had an interaction and exiting by the last period.
Value
a dataframe with three columns:
- actor
a column indicating actors in the data
- min_time
a column indicating the first time point in which the actor should be considered a part of the network
- max_time
a column indicating the last time point in which the actor should be considered a part of the network
Examples
if (FALSE) { # \dontrun{
library(peacesciencer)
library(dplyr)
cow_dyads <- create_dyadyears(
subset_years = c(1980:2001)
) %>%
# add mids
add_cow_mids()
actor_time <- get_actor_time_info(
dyad_data = cow_dyads,
actor1 = 'ccode1',
actor2 = 'ccode2',
time = 'year'
)
} # }