1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175
|
# error messages are proper
Code
make_()
Condition
Error in `.extract_constructor_and_modifiers()`:
! Don't know how to make_, nothing given
Code
make_(1:10)
Condition
Error in `.extract_constructor_and_modifiers()`:
! Don't know how to make_, nothing given
Code
graph_()
Condition
Error in `.extract_constructor_and_modifiers()`:
! Don't know how to graph_, nothing given
Code
graph_(1:10)
Condition
Error in `.extract_constructor_and_modifiers()`:
! Don't know how to graph_, nothing given
Code
graph_(directed_graph(), directed_graph())
Condition
Error in `.extract_constructor_and_modifiers()`:
! Don't know how to graph_, multiple constructors given
Code
sample_()
Condition
Error in `.extract_constructor_and_modifiers()`:
! Don't know how to sample_, nothing given
Code
sample_(1:10)
Condition
Error in `.extract_constructor_and_modifiers()`:
! Don't know how to sample_, nothing given
Code
sample_(directed_graph(), directed_graph())
Condition
Error in `.extract_constructor_and_modifiers()`:
! Don't know how to sample_, multiple constructors given
# graph_from_literal() and simple undirected graphs
Code
graph_from_literal(A - B)
Output
IGRAPH UN-- 2 1 --
+ attr: name (v/c)
+ edge (vertex names):
[1] A--B
Code
graph_from_literal(A - B - C)
Output
IGRAPH UN-- 3 2 --
+ attr: name (v/c)
+ edges (vertex names):
[1] A--B B--C
Code
graph_from_literal(A - B - C - A)
Output
IGRAPH UN-- 3 3 --
+ attr: name (v/c)
+ edges (vertex names):
[1] A--B A--C B--C
# graph_from_literal() and undirected explosion
Code
graph_from_literal(A:B:C - D:E, B:D - C:E)
Output
IGRAPH UN-- 5 8 --
+ attr: name (v/c)
+ edges (vertex names):
[1] A--D A--E B--C B--D B--E C--D C--E D--E
Code
graph_from_literal(A:B:C - D:E - F:G:H - I - J:K:L:M)
Output
IGRAPH UN-- 13 19 --
+ attr: name (v/c)
+ edges (vertex names):
[1] A--D A--E B--D B--E C--D C--E D--F D--G D--H E--F E--G E--H F--I G--I H--I
[16] I--J I--K I--L I--M
# graph_from_literal() and simple directed graphs
Code
graph_from_literal(A - +B)
Output
IGRAPH DN-- 2 1 --
+ attr: name (v/c)
+ edge (vertex names):
[1] A->B
Code
graph_from_literal(A - +B - +C)
Output
IGRAPH DN-- 3 2 --
+ attr: name (v/c)
+ edges (vertex names):
[1] A->B B->C
Code
graph_from_literal(A - +B - +C - +A)
Output
IGRAPH DN-- 3 3 --
+ attr: name (v/c)
+ edges (vertex names):
[1] A->B B->C C->A
Code
graph_from_literal(A - +B + -C - +A)
Output
IGRAPH DN-- 3 3 --
+ attr: name (v/c)
+ edges (vertex names):
[1] A->B C->A C->B
# graph_from_literal() and directed explosion
Code
graph_from_literal(A:B:C - +D:E, B:D + -C:E)
Output
IGRAPH DN-- 5 9 --
+ attr: name (v/c)
+ edges (vertex names):
[1] A->D A->E B->D B->E C->B C->D C->E E->B E->D
Code
graph_from_literal(A:B:C - +D:E + -F:G:H - +I + -J:K:L:M)
Output
IGRAPH DN-- 13 19 --
+ attr: name (v/c)
+ edges (vertex names):
[1] A->D A->E B->D B->E C->D C->E F->D F->E F->I G->D G->E G->I H->D H->E H->I
[16] J->I K->I L->I M->I
# graph_from_literal(simplify = FALSE)
Code
graph_from_literal(1 - 1, 1 - 2, 1 - 2)
Output
IGRAPH UN-- 2 1 --
+ attr: name (v/c)
+ edge (vertex names):
[1] 1--2
Code
graph_from_literal(1 - 1, 1 - 2, 1 - 2, simplify = FALSE)
Output
IGRAPH UN-- 2 3 --
+ attr: name (v/c)
+ edges (vertex names):
[1] 1--1 1--2 1--2
# make_empty_graph gives an error for invalid arguments
Code
make_empty_graph(NULL)
Condition
Error in `make_empty_graph()`:
! `n` must be numeric, not NULL.
---
Code
make_empty_graph("spam")
Condition
Error in `make_empty_graph()`:
! `n` must be numeric, not a string.
---
Code
make_empty_graph(10, "spam")
Condition
Error in `make_empty_graph()`:
! `directed` must be a logical, not a string.
|