unique.igraph.es: Remove duplicate edges from an edge sequence

Description Usage Arguments Value See Also Examples

View source: R/iterators.R

Description

Remove duplicate edges from an edge sequence

Usage

1
2
## S3 method for class 'igraph.es'
unique(x, incomparables = FALSE, ...)

Arguments

x

An edge sequence.

incomparables

a vector of values that cannot be compared. Passed to base function duplicated. See details there.

...

Passed to base function duplicated().

Value

An edge sequence with the duplicate vertices removed.

See Also

Other vertex and edge sequence operations: [.igraph.es, %–%, %->%, %<-%, igraph-es-indexing; [.igraph.vs, igraph-vs-indexing; [[.igraph.es, igraph-es-indexing2; [[.igraph.vs, igraph-vs-indexing2; c.igraph.es; c.igraph.vs; difference.igraph.es; difference.igraph.vs; intersection.igraph.es; intersection.igraph.vs; rev.igraph.es; rev.igraph.vs; union.igraph.es; union.igraph.vs; unique.igraph.vs

Examples

1
2
3
g <- make_(ring(10), with_vertex_(name = LETTERS[1:10]))
E(g)[1, 1:5, 1:10, 5:10]
E(g)[1, 1:5, 1:10, 5:10] %>% unique()

Example output

Attaching package: 'igraph'

The following objects are masked from 'package:stats':

    decompose, spectrum

The following object is masked from 'package:base':

    union

+ 22/10 edges (vertex names):
 [1] A--B A--B B--C C--D D--E E--F A--B B--C C--D D--E E--F F--G G--H H--I I--J
[16] A--J E--F F--G G--H H--I I--J A--J
+ 10/10 edges (vertex names):
 [1] A--B B--C C--D D--E E--F F--G G--H H--I I--J A--J

igraph documentation built on May 30, 2017, 2:56 a.m.

Search within the igraph package
Search all R packages, documentation and source code