顶点之间的关系

R 中的网络分析

James Curley

Associate Professor, University of Texas at Austin

识别邻接点

neighbors(g, "F", mode = c("all"))
+ 5/12 vertices, named:
[1] A E G H I
R 中的网络分析

识别共同邻接点

x <- neighbors(
  g, "F", mode = c("all")
)

y <- neighbors(
  g, "D", mode = c("all")
)

intersection(x,y)
A
R 中的网络分析

路径

farthest_vertices(g)
$vertices
+ 2/12 vertices, named:
[1] J G

$distance
[1] 6
get_diameter(g)
+ 7/12 vertices, named:
[1] J D A E H F G
R 中的网络分析

识别 N 步可达的顶点

ego(g, 2, 'F', mode=c('out'))
+ 5/12 vertices, named:
[1] F A E G H
R 中的网络分析

Let's practice!

R 中的网络分析

Preparing Video For Download...