pathClass (version 0.9.1)

as.adjacencyList: Uses a adjacency matrix to create a adjacency list...

Description

Uses a adjacency matrix to create a adjacency list

Usage

as.adjacencyList(adjacency.matrix, skip.redundant.nodes=TRUE, is.directed=FALSE)

Arguments

adjacency.matrix
a adjacency matrix.
skip.redundant.nodes
if TRUE and the graph is undirected only the upper triangular matrix (including the diagonal) is used to create the adjacency list.
is.directed
determines wether or not the graph is directed.

Value

  • an adjacency list.

Details

Uses a adjacency matrix to create a adjacency list as needed for fit.networkBasedSVM.

Examples

Run this code
library(pathClass)
data(adjacency.matrix)
ad.list <- as.adjacencyList(adjacency.matrix)

Run the code above in your browser using DataCamp Workspace