transformspreadbyindividual {timeordered} | R Documentation |
A helper function to assess differences in spreading potential by vertex.
Description
Converts a data frame of spreading samples into a data frame that is grouped by vertex identity.
Usage
transformspreadbyindividual(sa)
Arguments
sa |
A data frame returned by |
Value
A data frame whose columns are the identities of vertices and whose rows are the mean fraction of vertices reached by the seed vertex at each time delay, averaged over all samples beginning at this vertex.
Author(s)
Benjamin Blonder bblonder@email.arizona.edu.
See Also
Examples
data(ants)
allindivs <- c(union(ants$VertexFrom, ants$VertexTo), "NULL1", "NULL2")
g <- generatetonetwork(ants, allindivs)
sa <- spreadanalysis(g, seq(0,1000,by=50), 20)
b <- transformspreadbyindividual(sa)
plot(ts(b),plot.type="single",col=rainbow(ncol(b)),xlab="Time",ylab="Fraction reached")
legend("bottomright",colnames(b),lwd=1,col=rainbow(ncol(b)),bg="white")
[Package timeordered version 1.0.0 Index]