#' Get decision
#'
#' Highlights which double interactions to keep or exclude.
#'
#' @param x A data frame of interactions. Typically generated by the "duration decider" function. Needs columns "focal_dyad_count" and "partner_dyad_count". (created by get_p_dyad_count).
#'
#' @return Adds new "double_interaction" column with decision on wether to "include" or "exclude" a particular interaction event.
#' @import dplyr
#' @export
get_int_decision <- function(x){
# subset for when focals interacted
x_int <-
x %>%
filter(check_partner == "yes")%>%
group_by(date, dyad) %>%
mutate(focal_dyad_count = n())
# action_partner dyad column
x_int <- get_p_dyad_count(x_int)
# highlight which double interactions to keep or eclude
x_int <- decider(x_int)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.