Apologies if this question was not framed well. I am experimenting my novice R skills, to analyse SNA on ecommerce data from SNAP. I got the large data sets on product co-purchased information. The data set has details on #FromNode & #ToNode information apart from other transaction details (which has recommendation details about the product). I wish to test the data on some of the network parameters like closeness centrality, betweenness, Egocentricity, density etc. following is the first code i tried on the dataset, and I got struck with the error.
library(igraph)
dat=read.csv(file.choose(),skip=4, header=FALSE)
m=as.matrix(dat)
g=graph.adjacency(m,mode="undirected",weighted=NULL)
Error in .Call("R_igraph_graph_adjacency", adjmatrix, as.numeric(mode), : At structure_generators.c:272 : Non-square matrix, Non-square matrix
The data set says "Directed graph (each unordered pair of nodes is saved once)". I don't know how to proceed from here on. Also, how to link the transaction details with these node&edges analysis (nodes being products & edges being link between one product and co-purchased product)