After loading external graph from disk as edgelist, I want to view the matrix format of this graph. Here is my steps:
> rm(list=ls())
> data <- read.graph("c:\\temp\\graph.txt", format="edgelist")
> adjm <- data.matrix(data)
> adjm
IGRAPH D--- 18 28 --
>
> get.incidence(data)
Error in get.incidence(data) :
Not a bipartite graph, supply `types' argument
The matrix is not print. The data format of external graph is like(graph.txt):
0 7
2 7
3 0
3 2
3 4
4 9
5 1
5 6
6 7
7 12
8 2
8 3
8 14
10 6
11 12
12 13
13 8
14 15
14 13
As you can see, it only print graph information(number of nodes, direct or undirect). How can I print this graph as incidence matrix? or how can I supply types for incidence command? Thanks