ãããã¯ã¼ã¯åæ (Rã§å¦ã¶ãã¼ã¿ãµã¤ã¨ã³ã¹ 8)ã®ç¬¬3ç« ã®å 容 å¯åº¦ï¼densityï¼ ã°ã©ãã«ããã¦å¼µããã¨ã®åºæ¥ãå ¨ã¦ã®ã¨ãã¸ã®æ°ã«å¯¾ãããå®éã®ã¨ãã¸ã®æ°ã®æ¯ç ä¾ ãã¼ã¿ã®å ¥å library(igraph) A <- matrix(c( 0,1,1,1,1, 1,0,0,1,1, 1,0,0,0,0, 1,1,0,0,0, 1,1,0,0,0),nrow=5) B <- matrix(c( 0,1,1,1,1, 0,0,0,1,1, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0),nrow=5,byrow=T) g1 <- graph.adjacency(A, mode = "undirected") g2 <- graph.adjacency(B) Aã®ãããã plot(g1) Bã®ãããã plot(g2) å¯åº¦ã®è¨ç® > graph.density(g
{{#tags}}- {{label}}
{{/tags}}