1
2#' @useDynLib igraph, .registration = TRUE, .fixes = "C_"
3#' @import methods
4#' @importFrom magrittr %>%
5#' @export make_bipartite_graph
6#' @export connect
7#' @export make_de_bruijn_graph
8#' @export make_full_bipartite_graph
9#' @export graph_from_adjacency_matrix
10#' @export graph_from_data_frame
11#' @export graph_from_incidence_matrix
12#' @export make_kautz_graph
13#' @export make_line_graph
14#' @export sample_asym_pref
15NULL
16
17#' Magrittr's pipes
18#'
19#' igraph re-exports the \code{\%>\%} operator of magrittr, because
20#' we find it very useful. Please see the documentation in the
21#' \code{magrittr} package.
22#'
23#' @param lhs Left hand side of the pipe.
24#' @param rhs Right hand side of the pipe.
25#' @return Result of applying the right hand side to the
26#'   result of the left hand side.
27#'
28#' @export
29#' @name %>%
30#' @rdname pipe
31#' @examples
32#' make_ring(10) %>%
33#'   add_edges(c(1,6)) %>%
34#'   plot()
35NULL
36
37#' The igraph package
38#'
39#' igraph is a library and R package for network analysis.
40#'
41#' @rdname aaa-igraph-package
42#' @name igraph-package
43#' @aliases igraph-package igraph
44#' @docType package
45#'
46#' @section Introduction:
47#' The main goals of the igraph library is to provide a set of data types
48#' and functions for 1) pain-free implementation of graph algorithms, 2)
49#' fast handling of large graphs, with millions of vertices and edges, 3)
50#' allowing rapid prototyping via high level languages like R.
51#'
52#' @section Igraph graphs:
53#'   Igraph graphs have a class \sQuote{\code{igraph}}. They are printed to
54#'   the screen in a special format, here is an example, a ring graph
55#'   created using \code{\link{make_ring}}: \preformatted{
56#'     IGRAPH U--- 10 10 -- Ring graph
57#'     + attr: name (g/c), mutual (g/x), circular (g/x)  }
58#'   \sQuote{\code{IGRAPH}} denotes that this is an igraph graph. Then
59#'   come four bits that denote the kind of the graph: the first is
60#'   \sQuote{\code{U}} for undirected and \sQuote{\code{D}} for directed
61#'   graphs. The second is \sQuote{\code{N}} for named graph (i.e. if the
62#'   graph has the \sQuote{\code{name}} vertex attribute set). The third is
63#'   \sQuote{\code{W}} for weighted graphs (i.e. if the
64#'   \sQuote{\code{weight}} edge attribute is set). The fourth is
65#'   \sQuote{\code{B}} for bipartite graphs (i.e. if the
66#'   \sQuote{\code{type}} vertex attribute is set).
67#'
68#'   Then come two numbers, the number of vertices and the number of edges
69#'   in the graph, and after a double dash, the name of the graph (the
70#'   \sQuote{\code{name}} graph attribute) is printed if present. The
71#'   second line is optional and it contains all the attributes of the
72#'   graph. This graph has a \sQuote{\code{name}} graph attribute, of type
73#'   character, and two other graph attributes called
74#'   \sQuote{\code{mutual}} and \sQuote{\code{circular}}, of a complex
75#'   type. A complex type is simply anything that is not numeric or
76#'   character. See the documentation of \code{\link{print.igraph}} for
77#'   details.
78#'
79#'   If you want to see the edges of the graph as well, then use the
80#'   \code{\link{print_all}} function: \preformatted{    > print_all(g)
81#'     IGRAPH badcafe U--- 10 10 -- Ring graph
82#'     + attr: name (g/c), mutual (g/x), circular (g/x)
83#'     + edges:
84#'      [1] 1-- 2 2-- 3 3-- 4 4-- 5 5-- 6 6-- 7 7-- 8 8-- 9 9--10 1--10 }
85#'
86#' @section Creating graphs:
87#'   There are many functions in igraph for creating graphs, both
88#'   deterministic and stochastic; stochastic graph constructors are called
89#'   \sQuote{games}.
90#'
91#'   To create small graphs with a given structure probably the
92#'   \code{\link{graph_from_literal}} function is easiest. It uses R's formula
93#'   interface, its manual page contains many examples. Another option is
94#'   \code{\link{graph}}, which takes numeric vertex ids directly.
95#'   \code{\link{graph.atlas}} creates graph from the Graph Atlas,
96#'   \code{\link{make_graph}} can create some special graphs.
97#'
98#'   To create graphs from field data, \code{\link{graph_from_edgelist}},
99#'   \code{\link{graph_from_data_frame}} and \code{\link{graph_from_adjacency_matrix}} are
100#'   probably the best choices.
101#'
102#'   The igraph package includes some classic random graphs like the
103#'   Erdos-Renyi GNP and GNM graphs (\code{\link{sample_gnp}}, \code{\link{sample_gnm}}) and
104#'   some recent  popular models, like preferential attachment
105#'   (\code{\link{sample_pa}}) and the small-world model
106#'   (\code{\link{sample_smallworld}}).
107#'
108#' @section Vertex and edge IDs:
109#'   Vertices and edges have numerical vertex ids in igraph. Vertex ids are
110#'   always consecutive and they start with one. I.e. for a graph with
111#'   \eqn{n} vertices the vertex ids are between \eqn{1} and
112#'   \eqn{n}. If some operation changes the number of vertices in the
113#'   graphs, e.g. a subgraph is created via \code{\link{induced_subgraph}}, then
114#'   the vertices are renumbered to satisfy this criteria.
115#'
116#'   The same is true for the edges as well, edge ids are always between
117#'   one and \eqn{m}, the total number of edges in the graph.
118#'
119#'   It is often desirable to follow vertices along a number of graph
120#'   operations, and vertex ids don't allow this because of the
121#'   renumbering. The solution is to assign attributes to the
122#'   vertices. These are kept by all operations, if possible. See more
123#'   about attributes in the next section.
124#'
125#' @section Attributes:
126#'   In igraph it is possible to assign attributes to the vertices or edges
127#'   of a graph, or to the graph itself. igraph provides flexible
128#'   constructs for selecting a set of vertices or edges based on their
129#'   attribute values, see \code{\link{vertex_attr}},
130#'   \code{\link{V}} and \code{\link{E}} for details.
131#'
132#'   Some vertex/edge/graph attributes are treated specially. One of them
133#'   is the \sQuote{name} attribute. This is used for printing the graph
134#'   instead of the numerical ids, if it exists. Vertex names can also be
135#'   used to specify a vector or set of vertices, in all igraph
136#'   functions. E.g. \code{\link{degree}} has a \code{v} argument
137#'   that gives the vertices for which the degree is calculated. This
138#'   argument can be given as a character vector of vertex names.
139#'
140#'   Edges can also have a \sQuote{name} attribute, and this is treated
141#'   specially as well. Just like for vertices, edges can also be selected
142#'   based on their names, e.g. in the \code{\link{delete_edges}} and
143#'   other functions.
144#'
145#'   We note here, that vertex names can also be used to select edges.
146#'   The form \sQuote{\code{from|to}}, where \sQuote{\code{from}} and
147#'   \sQuote{\code{to}} are vertex names, select a single, possibly
148#'   directed, edge going from \sQuote{\code{from}} to
149#'   \sQuote{\code{to}}. The two forms can also be mixed in the same edge
150#'   selector.
151#'
152#'   Other attributes define visualization parameters, see
153#'   \code{\link{igraph.plotting}} for details.
154#'
155#'   Attribute values can be set to any R object, but note that storing the
156#'   graph in some file formats might result the loss of complex attribute
157#'   values. All attribute values are preserved if you use
158#'   \code{\link[base]{save}} and \code{\link[base]{load}} to store/retrieve your
159#'   graphs.
160#'
161#' @section Visualization:
162#'   igraph provides three different ways for visualization. The first is
163#'   the \code{\link{plot.igraph}} function. (Actually you don't need to
164#'   write \code{plot.igraph}, \code{plot} is enough. This function uses
165#'   regular R graphics and can be used with any R device.
166#'
167#'   The second function is \code{\link{tkplot}}, which uses a Tk GUI for
168#'   basic interactive graph manipulation. (Tk is quite resource hungry, so
169#'   don't try this for very large graphs.)
170#'
171#'   The third way requires the \code{rgl} package and uses OpenGL. See the
172#'   \code{\link{rglplot}} function for the details.
173#'
174#'   Make sure you read \code{\link{igraph.plotting}} before you start
175#'   plotting your graphs.
176#'
177#' @section File formats:
178#'   igraph can handle various graph file formats, usually both for reading
179#'   and writing. We suggest that you use the GraphML file format for your
180#'   graphs, except if the graphs are too big. For big graphs a simpler
181#'   format is recommended. See \code{\link{read_graph}} and
182#'   \code{\link{write_graph}} for details.
183#'
184#' @section Further information:
185#'   The igraph homepage is at \url{https://igraph.org}.
186#'   See especially the documentation section. Join the discussion forum at
187#'   \url{https://igraph.discourse.group} if you have questions or comments.
188
189 NULL
190