는 오류를 생성 실제 라인은 다음과 같습니다
는
help
에서
graph.neighborhood(tutti, vcount(tutti), risultato, "out")
## Error in as.igraph.vs(graph, nodes) : Invalid vertex names
-graph.neighborhood(graph, order, nodes=V(graph), mode=c("all", "out", "in"))
은 실제가 될 nodes
을 기대하고있다 igraph
버텍스 시퀀스. 교차 노드가 해당 형식인지 확인해야합니다.
여기 (제공 나는 당신의 화면 캡처에서 올바른 가정을했습니다) 재현 예를 의미 jbaums 내용은 다음과 같습니다
당신이
정말 전에 무엇을하고 있는지
library(igraph)
set.seed(1492) # makes this more reproducible
# simulate your overall graph
tutti <- graph.full(604, directed=TRUE)
V(tutti)$name <- as.character(sample(5000, 604))
# simulate your nodes
tabellaerrori <- as.character(c(sample(V(tutti), 79), sample(6000:6500, 70)))
names(tabellaerrori) <- as.numeric(tabellaerrori)
# give a brief view of the overall data objects
head(V(tutti))
## Vertex sequence:
## [1] "1389" "1081" "922" "553" "261" "42"
length(V(tutti))
## [1] 604
head(tabellaerrori)
## 293 415 132 299 408 526
## "293" "415" "132" "299" "408" "526"
length(tabellaerrori)
## [1] 149
# for your answer, find the intersection of the vertext *names*
risultato <- as.character(intersect(tabellaerrori, V(tutti)$name))
risultato
## Vertex sequence:
## [1] "293" "132" "155" "261" "68" "381" "217" "394" "581"
# who are the ppl in your neighborhood
graph.neighborhood(tutti, vcount(tutti), risultato, "out")
## [[1]]
## IGRAPH DN-- 604 364212 -- Full graph
## + attr: name (g/c), loops (g/l), name (v/c)
##
## [[2]]
## IGRAPH DN-- 604 364212 -- Full graph
## + attr: name (g/c), loops (g/l), name (v/c)
##
## ... (a few more)
(즉 어떤 intersect
세 이하하고 있었다 커버)이다 : 따라서
risultato <- as.character(intersect(tabellaerrori, as.character(V(tutti))))
, 당신의 Invalid vertex names
오류입니다.
재현 예를 제공하십시오 – akrun
https://plus.google.com/u/0/115505398072903675944/posts/4jxcckeLQpT?pid=6106016935769662722&oid=115505398072903675944 https://plus.google.com/u/0/115505398072903675944/포스트/4jxcckeLQpT? PID = 6106016949694762914 및 OID = 115,505398072903,675,944 https://plus.google.com/u/0/115505398072903675944/posts/4jxcckeLQpT?pid=6106016965557307874&oid=115505398072903675944 –
먼저 PIC 정점리스트 V이다 (튜티)를 –