edgelist.to.adjacency: Convert edge list into adjacency matrix

Description Usage Arguments Value Examples

View source: R/edgelist.to.adjacency.R

Description

This funciton converts a weighted or unweighted edge list into an adjacency matrix.

Usage

1

Arguments

edgelist

The input edge list.

Value

Returns an adjacency matrix of the specified network.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
edg <- rbind(c(1,2,4),
c(1,3,2),
c(1,5,3),
c(2,1,4),
c(2,3,4),
c(2,4,1),
c(2,5,2),
c(2,6,1),
c(3,1,2),
c(3,2,4),
c(3,5,3),
c(4,2,1),
c(4,5,2),
c(5,2,2),
c(5,6,1),
c(6,5,1))
edgelist.to.adjacency(edg)

hangxiong/wNetwork documentation built on May 17, 2019, 2:28 p.m.