# NOT RUN {
# 1) generate a random graph according to the ER model
set.seed(825)
g <- erdos.renyi.game(10, 3/10)
V(g)$name <- paste0('n',1:vcount(g))
# }
# NOT RUN {
# 2) pre-computate affinity matrix between all nodes
Amatrix <- xRWkernel(g)
# visualise affinity matrix
visHeatmapAdv(as.matrix(Amatrix), colormap="wyr",
KeyValueName="Affinity")
# }
Run the code above in your browser using DataLab