Skip to contents

Union of vertex sequences

Usage

# S3 method for igraph.vs
union(...)

Arguments

...

The vertex sequences to take the union of.

Value

A vertex sequence that contains all vertices in the given sequences, exactly once.

Details

They must belong to the same graph. Note that this function has ‘set’ semantics and the multiplicity of vertices is lost in the result. (This is to match the behavior of the based unique function.)

Examples

g <- make_(ring(10), with_vertex_(name = LETTERS[1:10]))
union(V(g)[1:6], V(g)[5:10])
#> + 10/10 vertices, named, from f8c176f:
#>  [1] A B C D E F G H I J