mat=matrix(c(0,5,3,7,0,5,0,0,0,4,3,8,0,1,0,7,0,1,0,0,0,4,6,2,0),5,5)
#compare the differences for each type of links
node.similarity(gemat=mat,type="in")
node.similarity(gemat=mat,type="out")
node.similarity(gemat=mat,type="both")
Run the code above in your browser using DataLab