Description Usage Arguments Details Value Author(s) References See Also Examples
View source: R/timeProjectedNetwork.R
Builds a new static representation of a dynamic network constructed by binning the dynamic network into static slices and constructing new directed 'identity-arcs' between the vertices' realizations in successive time slices.
1 2 3 |
nd |
the |
start |
optional numeric start time to be use as lower bound for binning interval (default is what is observed in network) |
end |
optional numeric end time to be use as upper bound for binning interval (default is what is observed in network) |
time.increment |
value for the offset (and duration) between successive samples. Will default to 1 if not otherwise specified |
onsets |
A numeric vector containing the onset times of the networks to be extracted. This must be accompanied by |
termini |
A numeric vector containing the terminus times of the networks to be extracted. This must be accompanied by |
... |
Additional arguments to |
Uses network.collapse
to bin the nd
network into a list of static networks, aggregates them into a new network with size equal to original network size X number of slices. To assist with plotting, an edge attribute edge.type
is added to all of the edges, having the value 'within_slice'
for edges existing the the original network and 'identity_arc'
for edges linking the vertices in time. Vertex attributes (possibly collapsed TEAs) are copied from the original network to the projected network. Because of the assumed directionality of time, the output network will always be directed, with the identity arcs pointing forward in time. If the input network is undirected, two corresponding directed edges (one in each direction) will be added in the projected network. Edge attributes (possibly collapsed TEAs) will be copied from the original network to the corresponding within-slice edges in the projected network.
Vertex activity is currently ignored in the projected network (retain.all.vertices
is set to TRUE internally to force all time slice networks to have the same size).
As with all discrete representations of dynamic processes, the time projected graph is an approximation and may over- or under-represent some transmission potential depending on the choice of bin size. Binning is performed by get.networks
, so will use its defaults if not specified.
a network
object that encodes a discrete time representation of the temporal evolution of the input networkDynamic
object.
Skye Bender-deMoll (skyebend@uw.edu), James Moody
James Moody (2015) Static Representations of Dynamic Networks (DRAFT)
Earlier citations?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | data(moodyContactSim)
# use slices at each changing time point
library(networkDynamicData)
data(vanDeBunt_students)
times<-get.change.times(vanDeBunt_students)
vanDProj<-timeProjectedNetwork(vanDeBunt_students,onsets = times,termini = times)
# plot it with gray for the time edges
plot(vanDProj,
arrowhead.cex = 0,
edge.col=ifelse(vanDProj%e%'edge.type'=='within_slice','black','gray'),
vertex.cex=0.7,mode='kamadakawai')
## Not run:
# compute shortest temporal path distances from each vertex in first slice
# to each vertex in last slice
library(sna)
geodist(vanDProj)$gdist[1:32,193:224]
# bin the moody sim into 100 timestep chunks
# (this will over-represent some transmission potential)
moodyProj<-timeProjectedNetwork(moodyContactSim,time.increment=100)
plot(moodyProj,arrowhead.cex = 0,
edge.col=ifelse(moodyProj%e%'edge.type'=='within_slice','black','gray'),
vertex.cex=0.7,displaylabels = TRUE,label.cex=0.6)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.