File: foreign.md

package info (click to toggle)
r-cran-igraph 2.2.2-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 27,772 kB
  • sloc: ansic: 206,420; cpp: 21,827; fortran: 4,090; yacc: 1,229; lex: 518; sh: 52; makefile: 8
file content (75 lines) | stat: -rw-r--r-- 1,904 bytes parent folder | download
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
# reading graph in NCOL format

    Code
      read_graph(ncol_path, "ncol")
    Output
      IGRAPH UN-- 3 2 -- 
      + attr: name (v/c)
      + edges (vertex names):
      [1] 0--1 1--2

# reading graph in LGL format

    Code
      read_graph(lgl_path, "lgl")
    Output
      IGRAPH UN-- 3 2 -- 
      + attr: name (v/c)
      + edges (vertex names):
      [1] 0--1 1--2

# reading graph, unused argument

    Code
      read_graph(lgl_path, "lgl", useless = 1)
    Condition
      Error in `read.graph.lgl()`:
      ! unused argument (useless = 1)

# reading graph in unsupported format

    Code
      read_graph("bla", format = "blop")
    Condition
      Error in `read_graph()`:
      ! `format` must be one of "edgelist", "pajek", "ncol", "lgl", "graphml", "dimacs", "graphdb", "gml", or "dl", not "blop".

# writing graph in unsupported format

    Code
      write_graph(g, file, format = "blop")
    Condition
      Error in `write_graph()`:
      ! `format` must be one of "edgelist", "pajek", "ncol", "lgl", "graphml", "dimacs", "gml", "dot", or "leda", not "blop".

# graph_from_graphdb works

    Code
      g <- graph_from_graphdb(nodes = 1000)

---

    Code
      g <- graph_from_graphdb()
    Condition
      Error in `graph_from_graphdb()`:
      ! Either `nodes`' or ``url`' must be non-null.

---

    Code
      g <- graph_from_graphdb(nodes = 10, prefix = "not_existing")
    Condition
      Error in `graph_from_graphdb()`:
      ! not_existing is not a valid prefix.
      i Must be one of iso, si6, mcs10, mcs30, mcs50, mcs70, and mcs90.

---

    Code
      g <- graph_from_graphdb(nodes = 10, type = "not_existing")
    Condition
      Error in `graph_from_graphdb()`:
      ! not_existing is not a valid graph type.
      i Must be one of r001, r005, r01, r02, m2D, m2Dr2, m2Dr4, m2Dr6, m3D, m3Dr2, m3Dr4, m3Dr6, m4D, m4Dr2, m4Dr4, m4Dr6, b03, b03m, ..., b09, and b09m.