Convert a network to, possibly two, data frames: an edge list with edge
attributes (if any), and data frame of vertexes with vertex attributes (if
any). This is a generic function, see below for available methods.
Usage
asDF(object, ...)
Arguments
object
R object representing a network, see below for available
methods
...
other arguments passed to/from other methods
Value
List with two components: edges containing an edge list at first two
columns and edge attributes on further ones. vertexes with vertex id in
the first column, named id and any vertex attributes in the other
columns.
Details
Currently there are methods for object being in one of the following
classes: "network", "igraph".
The function first gets the graph edge list using the appropriate function
depending on the class of object (see below). Edge attributes, if any,
are then extracted using dumpAttr and added to it.
The vertex data frame is constructed with a vertex id as a sequence of integer
numbers. Details are method-specific, see below. Vertex attributes are
extracted with dumpAttr and added to this data frame.