powered by
balabanJ(g, dist = NULL)
library(graph) library(RBGL) set.seed(123) g <- randomGraph(1:8, 1:5, 0.36, weights=FALSE) #calculate Distance Matrix mat.dist <- distanceMatrix(g) balabanJ(g)
Run the code above in your browser using DataLab