This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require("igraph") | |
g <- read.graph("listalumia.txt", format="ncol", directed=TRUE) | |
# funkce similirarity vychazi z stuie Friends and Neighbors on the Web (http://www.hpl.hp.com/research/idl/papers/web10/fnn2.pdf) | |
m <-similarity.dice(g) | |
colnames(m)=c(V(g)$name) | |
rownames(m)=colnames(m) | |
d <- dist(m, method = "euclidean") # distance matrix |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require("igraph") | |
g <- read.graph("listalumia.txt", format="ncol", directed=TRUE) | |
# defaultni graf | |
plot(g) | |
# pocet hran | |
ecount(g) | |
# pocet nodu | |
vcount(g) |
NewerOlder