igraph has some parameters which (usually) affect the behavior of many
functions. These can be set for the whole session via igraph_options.
igraph_options(...)igraph_opt(x, default = NULL)
A character string holding an option name.
If the specified option is not set in the options list, this value is returned. This facilitates retrieving an option and checking whether it is set and setting it separately if not.
A list may be given as the only argument, or any number of
arguments may be in the name=value form, or no argument at all may be
given. See the Value and Details sections for explanation.
igraph_options returns a list with the updated values of the
parameters. If the argument list is not empty, the returned list is
invisible.
For igraph_opt, the current value set for option x, or
NULL if the option is unset.
The parameter values set via a call to the igraph_options function
will remain in effect for the rest of the session, affecting the subsequent
behaviour of the other functions of the igraph package for which the
given parameters are relevant.
This offers the possibility of customizing the functioning of the
igraph package, for instance by insertions of appropriate calls to
igraph_options in a load hook for package igraph.
The currently used parameters in alphabetical order:
Logical scalar, whether to add model
    parameter to the graphs that are created by the various
    graph constructors. By default it is TRUE.
Logical scalar, whether to add
    vertex names to node level indices, like degree, betweenness
    scores, etc. By default it is TRUE.
Logical scalar, whether to annotate igraph
    plots with the graph's name (name graph attribute, if
    present) as main, and with the number of vertices and edges
    as xlab. Defaults to FALSE.
The plotting function to use when plotting
    community structure dendrograms via
    plot_dendrogram
Specifies what to do with the edge
    attributes if the graph is modified. The default value is
    list(weight="sum", name="concat", "ignore"). See
    attribute.combination for details on this.
The base URL of the default Nexus server. See
    nexus for details.
Logical constant, whether to print edge
    attributes when printing graphs. Defaults to FALSE.
Logical scalar, whether print.igraph
    should show the graph structure as well, or only a summary of the
    graph.
Logical constant, whether to print
    graph attributes when printing graphs. Defaults to FALSE.
Logical constant, whether to print
    vertex attributes when printing graphs. Defaults to FALSE.
Whether to use the Matrix package for
    (sparse) matrices. It is recommended, if the user works with
    larger graphs.
Logical constant, whether igraph functions should
    talk more than minimal. Eg. if TRUE thne some functions
    will use progress bars while computing. Defaults to FALSE.
Specifies what to do with the vertex
    attributes if the graph is modified. The default value is
    list(name="concat", "ignore") See
    attribute.combination for details on this.
igraph_options is similar to options and
igraph_opt is similar to getOption.
# NOT RUN {
oldval <- igraph_opt("verbose")
igraph_options(verbose=TRUE)
layout_with_kk(make_ring(10))
igraph_options(verbose=oldval)
#'
# }
Run the code above in your browser using DataLab