igraph-es-indexing2: Select edges and show their metadata

Description Usage Arguments Details Value See Also Examples

Description

The double bracket operator can be used on edge sequences, to print the meta-data (edge attributes) of the edges in the sequence.

Usage

1
2
## S3 method for class 'igraph.es'
x[[...]]

Arguments

x

An edge sequence.

...

Additional arguments, passed to [.

Details

Technically, when used with edge sequences, the double bracket operator does exactly the same as the single bracket operator, but the resulting edge sequence is printed differently: all attributes of the edges in the sequence are printed as well.

See [.igraph.es for more about indexing edge sequences.

Value

Another edge sequence, with metadata printing turned on. See details below.

See Also

Other vertex and edge sequences: E(), V(), igraph-es-attributes, igraph-es-indexing, igraph-vs-attributes, igraph-vs-indexing2, igraph-vs-indexing, print.igraph.es(), print.igraph.vs()

Other vertex and edge sequence operations: c.igraph.es(), c.igraph.vs(), difference.igraph.es(), difference.igraph.vs(), igraph-es-indexing, igraph-vs-indexing2, 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()

Examples

1
2
3
4
5
6
g <- make_(ring(10),
  with_vertex_(name = LETTERS[1:10]),
  with_edge_(weight = 1:10, color = "green"))
E(g)
E(g)[[]]
E(g)[[.inc('A')]]

Example output

Attaching package: 'igraph'

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

    decompose, spectrum

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

    union

+ 10/10 edges from f0e8010 (vertex names):
 [1] A--B B--C C--D D--E E--F F--G G--H H--I I--J A--J
+ 10/10 edges from f0e8010 (vertex names):
   tail head tid hid weight color
1     A    B   1   2      1 green
2     B    C   2   3      2 green
3     C    D   3   4      3 green
4     D    E   4   5      4 green
5     E    F   5   6      5 green
6     F    G   6   7      6 green
7     G    H   7   8      7 green
8     H    I   8   9      8 green
9     I    J   9  10      9 green
10    A    J   1  10     10 green
+ 2/10 edges from f0e8010 (vertex names):
   tail head tid hid weight color
1     A    B   1   2      1 green
10    A    J   1  10     10 green

igraph documentation built on March 19, 2020, 5:13 p.m.