如果您从 R 中使用 igraph,请使用此选项
igraph-vs-indexing2 {igraph} | R 文档 |
双中括号运算符可用于顶点序列,以打印序列中顶点的元数据(顶点属性)。
## S3 method for class 'igraph.vs'
x[[...]]
x |
一个顶点序列。 |
... |
其他参数,传递给 |
从技术上讲,当与顶点序列一起使用时,双中括号运算符与单中括号运算符的功能完全相同,但生成的顶点序列的打印方式不同:序列中所有顶点的属性也会被打印出来。
有关索引顶点序列的更多信息,请参见 [.igraph.vs
。
双中括号运算符返回另一个顶点序列,并启用元数据(属性)打印。请参见下面的详细信息。
其他顶点和边序列:E()
,V()
,igraph-es-attributes
,igraph-es-indexing2
,igraph-es-indexing
,igraph-vs-attributes
,igraph-vs-indexing
,print.igraph.es()
,print.igraph.vs()
其他顶点和边序列操作:c.igraph.es()
,c.igraph.vs()
,difference.igraph.es()
,difference.igraph.vs()
,igraph-es-indexing2
,igraph-es-indexing
,igraph-vs-indexing
,intersection.igraph.es()
,intersection.igraph.vs()
,rev.igraph.es()
,rev.igraph.vs()
,union.igraph.es()
,union.igraph.vs()
,unique.igraph.es()
,unique.igraph.vs()
g <- make_ring(10) %>%
set_vertex_attr("color", value = "red") %>%
set_vertex_attr("name", value = LETTERS[1:10])
V(g)
V(g)[[]]
V(g)[1:5]
V(g)[[1:5]]