View source: R/extra_functions.R
get_matrix | R Documentation |
Given a vector that encodes an adjacency matrix, returns the matrix representation.
get_matrix(beta, type = c("undirected", "directed"))
beta |
Vectorized adjacency matrix. If the network is undirected, the vector is assumed to represent the upper triangular part of the adjacency matrix in column major order. For undirected network, the vector contains the entries ordered by column and excluding the diagonal elements. |
type |
Specifies whether the vector represents an |
Adjacency matrix.
# Obtain the adjacency matrix of a COBRE data subject data(COBRE.data) A <- get_matrix(COBRE.data$X.cobre[1,], type = "undirected") plot_adjmatrix(A)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.