I have a dataset of a graph (undirected), represented by the edges. But most of the vertices are not connected.
Supposing the vertex set is
{1,2,3,4,5,6,7,8}
and the edges are just
1->2
2->3
1->3
How do I get the adjacency matrix for this using the igraph package? Using the below code doesnt give the full adjacency as it gets only 3 vertices in the input edgelist
get.adjacency(graph.edgelist(as.matrix(edges), directed=FALSE))