| as.data.frame.networkDynamic {networkDynamic} | R Documentation |
Creates a data.frame giving lists of edges and their activity spells corresponding to the networkDynamic object. Edges with -Inf or Inf values in the spells may have them censored to an observation window.
## S3 method for class 'networkDynamic'
as.data.frame(x, row.names = NULL, optional = FALSE, e =seq_along(x$mel),
start = NULL, end = NULL, active.default=TRUE,...)
x |
a networkDynamic object |
row.names |
ignored |
optional |
ignored |
e |
vector of edge ids that should be included in the output. |
start |
optional, numeric onset-censoring time: time at which the network was first
observed. Edge spells with onset |
end |
optional right-censoring time: time at which the network was last
observed. Edge spells with terminus |
active.default |
logical indicating if edges with no defined activity spells should be considered active by default (and appear as a row in output) |
... |
possible additional arguments |
Exports the edge dynamics of a networkDynamic object as a data.frame giving a table of edges with their activity spells, including whether an activity spell was “censored” (onset or termination was not observed within the observation window).
If a net.obs.period attribute exists, the maximal and minimal values will be used as censoring times by default. Censoring times can also be provided using the start and end arguments, and censoring can be prevented by setting start=-Inf, end=Inf.
A data.frame containing timed relational information
describing the networkDynamic object, having the following columns:
onset, terminus |
Onset and terminus times of an edge, respectively, if not censored, and left and right censoring times, if censored. |
tail, head |
Tail and head of the edge. |
onset.censored, terminus.censored |
TRUE if onset/terminus time is censored. |
duration |
the duration (terminus-onset) of each spell, evaluated after censoring |
edge.id |
the id of the edge the row corresponds to |
The output data.frame will be sorted by edge.id, onset,terminus. This means that for most (non-multiplex) networks the group of spells for a specific edge will appear in sequential lines of output, but the overall output is not in a temporal order.
Vertex and attribute activity is not included in the returned value. If an edge has multiple activity spells, it will have multiple rows in the output. When output in censored, it may not match values returned by get.edge.activity
See Also as get.edge.activity,get.vertex.activity
net <-network.initialize(3) net[1,2]<-1; net[2,3]<-1; ## censoring activate.edges(net,onset=1,terminus=Inf,e=1) activate.edges(net,onset=2,terminus=3,e=2) activate.vertices(net, onset=1, terminus=Inf, v=1) as.data.frame(net)