Remove duplicate vertices from a vertex sequence
Usage
# S3 method for class 'igraph.vs'
unique(x, incomparables = FALSE, ...)Arguments
- x
A vertex sequence.
- incomparables
a vector of values that cannot be compared. Passed to base function
duplicated. See details there.- ...
Passed to base function
duplicated().
See also
Other vertex and edge sequence operations:
c.igraph.es(),
c.igraph.vs(),
difference.igraph.es(),
difference.igraph.vs(),
igraph-es-indexing,
igraph-es-indexing2,
igraph-vs-indexing,
igraph-vs-indexing2,
intersection.igraph.es(),
intersection.igraph.vs(),
rev.igraph.es(),
rev.igraph.vs(),
union.igraph.es(),
union.igraph.vs(),
unique.igraph.es()
Examples
g <- make_(ring(10), with_vertex_(name = LETTERS[1:10]))
V(g)[1, 1:5, 1:10, 5:10]
#> ── <vertex sequence> 22/10 · named · from c43c209 ──────────────────────────────
#> [1] A A B C D E A B C D E F G H I J E F G H I J
V(g)[1, 1:5, 1:10, 5:10] %>% unique()
#> ── <vertex sequence> 10/10 · named · from c43c209 ──────────────────────────────
#> [1] A B C D E F G H I J
