Learn R Programming

tma (version 0.3.1)

namesToAdjacencyKey: Names to Adjacency Key

Description

Convert a vector of strings, representing the names of a square matrix, to an adjacency key matrix.

Usage

namesToAdjacencyKey(vector, upper_triangle = TRUE)

Value

A character matrix with 2 rows and choose(length(vector), 2) columns. Each column contains a pair of names representing a unique adjacency (edge) between nodes in the original square matrix.

Arguments

vector

Vector representing the names of a square matrix.

upper_triangle

Not Implemented.

Details

Returns a matrix with 2 rows and choose(length(vector), 2) columns, where each column represents a unique pair of names from the input vector, corresponding to the upper triangle of a square matrix.