Extract all vertex attributes from the network

extract_all_vertex_attributes(g)

Arguments

g

name of the input network

Value

data.frame in case of vertex attributes, otherwise NULL

Details

This function extract all vertex attributes from a network object or from a igraph object and returns it as a data.frame.

The columns of the data.frame have the corresponding attribute names.

No attempt is made to assign a specific class to the attributes. The user will have to set them appropriately for the analysis at hand.

Note that network objects tend to have a vertex attribute called na. This will, correctly, be included, but is likely irrelevant.

If there are no vertex attributes, NULL is returned.

Examples

if (FALSE) { # \dontrun{
data(florentine, package = "SNA4DSData")
flomar <- florentine$flomarriage
extract_all_vertex_attributes(flomar)

# NULL
extract_all_vertex_attributes(igraph::erdos.renyi.game(10, 4, type = "gnm"))

flomar_nw <- to_network(flomar)
extract_all_vertex_attributes(flomar_nw)
} # }