Learn R Programming

intergraph (version 2.0-4)

dumpAttr: Dump network attributes to a list

Description

Given a network return a list of all the attributes.

Usage

dumpAttr(x, ...)

# S3 method for network dumpAttr(x, type = c("all", "network", "vertex", "edge"), ...)

# S3 method for igraph dumpAttr(x, type = c("all", "network", "vertex", "edge"), ...)

Value

If type is one of "network", "vertex" or "edge" then a list of corresponding attributes.

If type is "all" then lists of lists of attributes.

Arguments

x

network object

...

other arguments from/to other methods

type

character, type of attributes to dump

Examples

Run this code
# using 'igraph' object
l <- dumpAttr( exIgraph )   # all attributes
identical( dumpAttr(exIgraph, "network"), l$network )
identical( dumpAttr(exIgraph, "vertex"), l$vertex )
identical( dumpAttr(exIgraph, "edge"), l$edge )

# using 'network' object
l <- dumpAttr( exNetwork )   # all attributes
identical( dumpAttr(exNetwork, "network"), l$network )
identical( dumpAttr(exNetwork, "vertex"), l$vertex )
identical( dumpAttr(exNetwork, "edge"), l$edge )

Run the code above in your browser using DataLab