iGraph でグラフに結合しようとしてgraph.union
いますが、結果のグラフで頂点ラベルが保持されません。
testGraph1 = barabasi.game(3,
m = 5,
power = 0.6,
out.pref = TRUE,
zero.appeal = 0.5,
directed = TRUE)
V(testGraph1)$name = c('one', 'two', 'three')
testGraph2 = barabasi.game(5,
m = 5,
power = 0.6,
out.pref = TRUE,
zero.appeal = 0.5,
directed = TRUE)
V(testGraph2)$name = c('one', 'two', 'three', 'four', 'five')
combine = graph.union(testGraph1, testGraph2)
V(combine)$name #Is NULL
も使用してみgraph.union.by.name
ましたが、どちらのテスト グラフも確実に方向付けられているため、バグがあると思いますが、奇妙なエラーが発生しています。
combine = graph.union.by.name(testGraph1, testGraph2)
#Error: !is.directed(g1) & !is.directed(g2) is not TRUE