from.edgelist: Edgelist to 'fastnet'

Description Usage Arguments Details Value Author(s) Examples

View source: R/from.edgelist.R

Description

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

Usage

1
from.edgelist(edgelist)

Arguments

edgelist

A 2-column data frame, in which the 1st column represents the start nodes, and the 2nd column represents the destination nodes.

Details

Most network data repositories choose to store the data in an edgelist form. This function helps user to load it in fastnet.

Value

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

Author(s)

Xu Dong

Examples

1
2
edgelist <- data.frame(from=c(1, 3, 2, 3, 3), to=c(4, 5, 6, 5, 7))
g <- from.edgelist(edgelist)

fastnet documentation built on Jan. 13, 2021, 5:28 p.m.