User Tools

Site Tools


r:social_network_analysis

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
r:social_network_analysis [2023/06/12 08:09] – [stu x class 처럼 분석한 예] hkimscilr:social_network_analysis [2023/06/12 08:20] – [stu x class 처럼 분석한 예] hkimscil
Line 183: Line 183:
 actor_matrix <- bipartite_matrix %*% t(bipartite_matrix) actor_matrix <- bipartite_matrix %*% t(bipartite_matrix)
 event_matrix <- t(bipartite_matrix) %*% bipartite_matrix event_matrix <- t(bipartite_matrix) %*% bipartite_matrix
 +
  
 diag(actor_matrix) <- 0 diag(actor_matrix) <- 0
Line 194: Line 195:
  
 actor_g_cff_2 <- graph_from_adjacency_matrix(actor_matrix_cff_2,  actor_g_cff_2 <- graph_from_adjacency_matrix(actor_matrix_cff_2, 
-                                       mode = "undirected",  +                                             mode = "undirected",  
-                                       weighted = TRUE)+                                             weighted = TRUE)
 actor_g_cff_3 <- graph_from_adjacency_matrix(actor_matrix_cff_3,  actor_g_cff_3 <- graph_from_adjacency_matrix(actor_matrix_cff_3, 
-                                       mode = "undirected",  +                                             mode = "undirected",  
-                                       weighted = TRUE)+                                             weighted = TRUE) 
 + 
 +V(actor_g)$size <- betweenness(actor_g) 
 +V(actor_g_cff_2)$size <- betweenness(actor_g_cff_2) 
 +V(actor_g_cff_3)$size <- betweenness(actor_g_cff_3) 
 +V(actor_g)$label.cex <- betweenness(actor_g) * 0.2 
 +V(actor_g_cff_2)$label.cex <- betweenness(actor_g_cff_2) * 0.1 
 +V(actor_g_cff_3)$label.cex <- betweenness(actor_g_cff_3) * 0.4 
 actor_g actor_g
 actor_g_cff_2 actor_g_cff_2
Line 228: Line 237:
      vertex.label.family= fnts[as.numeric(V(g)$type)+1],      vertex.label.family= fnts[as.numeric(V(g)$type)+1],
      edge.color="red", edge.width=3      edge.color="red", edge.width=3
-) </code>+ 
 +</code>
  
-[{{:r:pasted:20230612-080626.png|actor_g}}] +[{{:r:pasted:20230612-081851.png|actor_g}}] \\ 
-[{{:r:pasted:20230612-080636.png|actor_g_cff_2}}] +[{{:r:pasted:20230612-082040.png|actor_g_cff_2}}] \\ 
-[{{:r:pasted:20230612-080646.png|actor_g_cff_3}}]+[{{:r:pasted:20230612-082055.png|actor_g_cff_3}}]
  
  
r/social_network_analysis.txt · Last modified: 2023/11/22 22:02 by hkimscil

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki