Convert a vector of strings, representing names of a square matrix, to an adjacency
Usage
namesToAdjacencyKey(vector, upper_triangle = TRUE, diagonal = FALSE)
Arguments
- vector
Vector representing the names of a square matrix
- upper_triangle
Not Implemented
- diagonal
Logical, include the diagonal (self-connections). Default FALSE
Details
Returns a matrix of 2 rows by choose(length(vector), 2) columns,
or by n * (n + 1) / 2 columns when diagonal is TRUE
(the self-connection layout: upper triangle with the diagonal, column-major,
e.g. A & A, A & B, B & B, A & C, B & C, C & C).