Learn R Programming

fastnet (version 1.0.0)

from.adjacency: Adjacency Matrix to fastnet

Description

Transform an adjacency matrix to an ego-centric list form used in fastnet.

Usage

from.adjacency(adj.mat)

Arguments

adj.mat

The input adjacency matrix

Value

A list containing the nodes of the network and their respective neighbors.

Examples

Run this code
# NOT RUN {
adj.mat <- matrix(c(0,1,0,0,1,0,0,0,0,0,0,1,0,0,1,0), nrow = 4, ncol = 4)
g <- from.adjacency(adj.mat)

# }

Run the code above in your browser using DataLab