String. Possible values are "edgelist" and "gml" .
If format is "edgelist" , we assume the following edgelist matrix format. Each row is assumed to be of the form (from_node_id to_node_id time_stamp ).
from_node_id is the id of the source node. to_node_id is the id of the destination node. time_stamp is the arrival time of the edge. from_node_id and to_node_id are assumed to be integers that are at least 0 . They need not to be contiguous.
To register a new node i at time t without any edge, add a row with format (i -1 t ). This works for both undirected and directed networks.
time_stamp can be either numeric or string. The value of a time-stamp can be arbitrary, but we assume that a smaller time_stamp (regarded so by the sort function in R ) represents an earlier arrival time. Examples of time-stamps that satisfy this assumption are the integer 0:T , the string format ‘yyyy-mm-dd’, and the POSIX time.
If format is "gml" , there must be a binary field directed indicating the type of the network (0 : undirected, 1 : directed). The required fields for an edge are: source , target , and time . source and target are the ID of the source node and the target node, respectively. time is the time-stamp of the edge. The required fields for a node are: id , isolated (binary) and time . The binary field isolated indicates whether this node is an isolated node when it enters the system or not. If isolated is 1 , then time must contain the node's appearance time. If isolated is 0 , then we can automatically infer the node's appearance time from its edges, so the field time in this case can be NULL . The assumptions on node IDs and the format of time-stamps are the same as in the case when format = "edgelist" . See graph_to_file to see detail on the format of the gml file this package outputs.
|