Learn R Programming

oddnet (version 0.1.1)

compute_features: Computes features for each network.

Description

This function computes features for each network using graph theoretic constructs.

Usage

compute_features(gr, attributes = FALSE, attr_name = NULL, fast = FALSE)

Value

A network features object containing 20 graph-theoretic features.

Arguments

gr

The network or graph as an igraph object.

attributes

If the network nodes/vertices have attributes, then attributes = TRUE.

attr_name

The name of the node/vertex attribute. Only a single attribute can be specified.

fast

If set to TRUE will avoid computing time consuming features.

Examples

Run this code
set.seed(1)
gr <- igraph::erdos.renyi.game(100, 0.05)
compute_features(gr)


Run the code above in your browser using DataLab