NN2M | R Documentation |
Define a function convert nn list to adjacency matrix that can be further used for igraph
NN2M(nn)
nn |
nn list, which has two components: nn$idx and nn$dist |
return an nn.matrix. This is adjacency matrix can be input to igraph graph<-graph_from_adjacency_matrix(nn.matrix,diag = F,mode = "undirected")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.