This function returns a data.frame with a discordant
edgelist, defined as the set of edges for which the status attribute
of interest is discordant between the two partners.
get_discordant_edgelist(
dat,
status.attr,
head.status,
tail.status,
networks = NULL
)A data.frame with the following columns:
head: Positional ID of the head node.
tail: Positional ID of the tail node.
head_status: Status of the head node.
tail_status: Status of the tail node.
network: The numerical index of the network on which the partnership is located.
Main netsim_dat object containing a networkDynamic
object and other initialization information passed from
netsim.
The name of the status attribute of interest.
The value(s) of status.attr for which to look for the head of the edge.
Can be a single value or a vector.
The value(s) of status.attr for which to look for the tail of the edge.
Can be a single value or a vector.
Numerical indexes of the networks to extract the partnerships
from. (May be > 1 for models with multiple overlapping
networks.) If NULL, extract from all networks.
This is a generalized version of the discord_edgelist function.
It creates an edgelist of current partnerships in which the status attribute
of interest (as specified by the parameter status.attr) of one partner matches
the value (or one of the values) of the head.status parameter while the
corresponding status attribute of the other partner matches the value (or
one of the values) of the tail.status parameter.
discord_edgelist