dynam_event_dyad | R Documentation |
Convert a dyadic event list into an edge list to be used with the goldfish package (DyNAM) model. The input data contains sender and receiver and is timestamped. The DyNAM model requires certain naming conventions and data type formats, to be delivered by this function.
dynam_event_dyad(
x,
twl = 0,
vprefix = NULL,
vpostfix = NULL,
use.labels = F,
time = 1,
...
)
x |
Dyadic data. Accepted formas are "matrix" (adjacency), "network" or "edgelist" objects (sna package), "interact" data frame. |
twl |
Numeric. Indicates the time window length to cluster (merge) interactions together.
This is passed to |
vprefix |
String prefix for labeling vertices. This is useful in relation to matrix where col or row names might be just numbers while vertices are names. |
vpostfix |
String postfix for labeling vertices. |
time |
POSIXct time object for event list. |
use.lables |
Logical. In case a network/edgelist object is used, indicates ifthe associated vertice names should be copied or not. |
Object of type data.frame to be used with the DyNAM model.
#Construct DyNAM edge list from "advice" network matrix
adv <- matrix(c(0,0,1, 1,0,0, 1,1,1), nrow=3, ncol=3)
#without names
dynam_event_dyad(adv)
#with node prefix
dynam_event_dyad(adv, vprefix="Node_")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.