View source: R/spreadanalysis.R
spreadanalysis | R Documentation |
Determines the number of unique vertices that can be causally linked to an interaction event after a certain time delay. This function determines the fraction of unique vertices reached after a certain time from a random sample of interaction events.
spreadanalysis(g, timedelays, numsamples, normalizebyname=FALSE)
g |
The time-ordered network to be studied. |
timedelays |
A vector time delays at which to determine the fraction of vertices reached. |
numsamples |
The number of random events to sample (without replacement) as seeds for the spreading process. |
normalizebyname |
If true, divides the number of vertices reached by the number of unique vertex names; if false, by the number of time-ordered vertices. |
A data frame whose columns are named for each time delay and contains the fraction of total vertices reached by a spreading process beginning from the seed vertices by the time delay.
Results can be aggregated by start vertex - see transformspreadbyindividual
Benjamin Blonder bblonder@email.arizona.edu.
transformspreadbyindividual
data(ants)
allindivs <- c(union(ants$VertexFrom, ants$VertexTo), "NULL1", "NULL2")
g <- generatetonetwork(ants, allindivs)
sa <- spreadanalysis(g, seq(0,1000,by=50), 20)
boxplot(sa[,-1],xlab="Time delay",ylab="Fraction reached")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.