diff --git a/R/cohesive.blocks.R b/R/cohesive.blocks.R index 18eef59d2ef..ce601cc1a2e 100644 --- a/R/cohesive.blocks.R +++ b/R/cohesive.blocks.R @@ -224,7 +224,6 @@ blockGraphs <- function(blocks, graph) { #' For `graphs_from_cohesive_blocks()` and `export_pajek()` the same graph must be #' supplied whose cohesive block structure is given in the `blocks()` #' argument. -#' @inheritParams rlang::args_dots_empty #' @param labels Logical, whether to add the vertex labels to the result #' object. These labels can be then used when reporting and plotting the #' cohesive blocks. @@ -263,6 +262,8 @@ blockGraphs <- function(blocks, graph) { #' the Reingold-Tilford layout generator. #' @param \dots Additional arguments. `plot_hierarchy()` and [plot()] pass #' them to `plot.igraph()`. [print()] and [summary()] ignore them. +#' `cohesive_blocks()` and `export_pajek()` do not accept extra arguments; +#' these dots must be empty for them. #' @return `cohesive_blocks()` returns a `cohesiveBlocks` object. #' #' `blocks()` returns a list of numeric vectors, containing vertex IDs. @@ -632,7 +633,6 @@ exportPajek.cohesiveblocks.nopf <- function(blocks, graph, file) { } #' @rdname cohesive_blocks -#' @inheritParams rlang::args_dots_empty #' @export export_pajek <- function( blocks, diff --git a/R/community.R b/R/community.R index 783f7676000..0989f11dcfa 100644 --- a/R/community.R +++ b/R/community.R @@ -921,7 +921,9 @@ modularity <- function(x, ...) { #' 0. Set it to 1 to use the classical definition of modularity. #' @param directed Whether to use the directed or undirected version of #' modularity. Ignored for undirected graphs. -#' @param \dots Additional arguments, none currently. +#' @param \dots For `modularity_matrix()`, these dots must be empty. For +#' `modularity()`, unused, present for S3 method consistency but may be +#' used by other methods that implement it. #' @return For `modularity()` a numeric scalar, the modularity score of the #' given configuration. #' @@ -983,7 +985,6 @@ modularity.communities <- function(x, ...) { } #' @rdname modularity.igraph -#' @inheritParams rlang::args_dots_empty #' @export modularity_matrix <- function( graph, diff --git a/R/components.R b/R/components.R index e1ef087a952..bd11a592761 100644 --- a/R/components.R +++ b/R/components.R @@ -437,7 +437,6 @@ is_biconnected <- function(graph) { #' @rdname components -#' @inheritParams rlang::args_dots_empty #' @export largest_component <- function( graph, diff --git a/R/conversion.R b/R/conversion.R index 61791722a72..6f3db75f1f0 100644 --- a/R/conversion.R +++ b/R/conversion.R @@ -1932,7 +1932,8 @@ graph.data.frame <- function(d, directed = TRUE, vertices = NULL) { #' @author Gabor Csardi \email{csardi.gabor@@gmail.com} #' @seealso [graph_from_literal()] #' for another way to create graphs, [read.table()] to read in tables -#' from files. +#' from files. See [from_data_frame()] to build a lazy constructor +#' specification for [make_()] or [sample_()]. #' @keywords graphs #' @examples #' @@ -2077,8 +2078,26 @@ graph_from_data_frame <- function( g } -#' @rdname graph_from_data_frame -#' @param ... Passed to `graph_from_data_frame()`. +#' Constructor specifications for `make_()` and `sample_()` +#' +#' @description +#' Each of these functions builds a lazy constructor specification for the +#' given graph constructor, to be used with [make_()] or [sample_()]. The +#' specification is only evaluated when the graph is actually constructed, +#' so it can be combined with constructor modifiers such as +#' [with_vertex_()] or [with_edge_()]. +#' +#' `from_data_frame()`, `from_edgelist()`, `tree()` and `degseq()` wrap +#' [graph_from_data_frame()], [graph_from_edgelist()], [make_tree()] (or +#' `sample_tree()`) and [sample_degseq()] (or `realize_degseq()`), +#' respectively. +#' +#' @param ... Forwarded to the corresponding constructor function. +#' @return An object of class `igraph_constructor_spec`. +#' @seealso [make_()] and [sample_()] to apply a constructor specification. +#' @family deterministic constructors +#' @keywords graphs +#' @rdname constructor_spec #' @export from_data_frame <- function(...) constructor_spec(graph_from_data_frame, ...) @@ -2098,6 +2117,8 @@ from_data_frame <- function(...) constructor_spec(graph_from_data_frame, ...) #' @inheritParams rlang::args_dots_empty #' @param directed Whether to create a directed graph. #' @return An igraph graph. +#' @seealso [from_edgelist()] to build a lazy constructor specification for +#' [make_()] or [sample_()]. #' #' @family deterministic constructors #' @export @@ -2172,7 +2193,6 @@ graph_from_edgelist <- function( res } -#' @rdname graph_from_edgelist -#' @param ... Passed to `graph_from_edgelist()`. +#' @rdname constructor_spec #' @export from_edgelist <- function(...) constructor_spec(graph_from_edgelist, ...) diff --git a/R/epi.R b/R/epi.R index ad2871cbdec..450d57aa50e 100644 --- a/R/epi.R +++ b/R/epi.R @@ -20,7 +20,6 @@ ################################################################### #' @rdname sir -#' @inheritParams rlang::args_dots_empty #' @export time_bins <- function( x, diff --git a/R/flow.R b/R/flow.R index ce14c85cd09..6f185ca6b83 100644 --- a/R/flow.R +++ b/R/flow.R @@ -521,7 +521,9 @@ min_cut <- function( #' can be `NULL`, see details below. #' @param target The ID of the target vertex, for `vertex_connectivity()` it #' can be `NULL`, see details below. -#' @inheritParams rlang::args_dots_empty +#' @param \dots For `vertex_connectivity()`, these dots must be empty. For +#' `cohesion()`, unused, present for S3 method consistency but may be used +#' by other methods that implement it. #' @param checks Logical. Whether to check that the graph is connected #' and also the degree of the vertices. If the graph is not (strongly) #' connected then the connectivity is obviously zero. Otherwise if the minimum @@ -529,8 +531,6 @@ min_cut <- function( #' perform these checks, as they can be done quickly compared to the #' connectivity calculation itself. They were suggested by Peter McMahan, #' thanks Peter. -#' @param ... Additional arguments passed to methods. Not used by `vertex_connectivity()` -#' directly but may be used by other methods that implement `cohesion()`. #' @return A scalar real value. #' @author Gabor Csardi \email{csardi.gabor@@gmail.com} #' @references White, Douglas R and Frank Harary 2001. The Cohesiveness of diff --git a/R/games.R b/R/games.R index eda1cb03a22..c61ca99b114 100644 --- a/R/games.R +++ b/R/games.R @@ -1515,7 +1515,8 @@ random.graph.game <- function( #' @author Gabor Csardi \email{csardi.gabor@@gmail.com} #' @seealso #' [simplify()] to get rid of the multiple and/or loops edges, -#' [realize_degseq()] for a deterministic variant. +#' [realize_degseq()] for a deterministic variant. See [degseq()] to build a +#' lazy constructor specification for [make_()] or [sample_()]. #' @family games #' @export #' @keywords graphs @@ -1738,10 +1739,10 @@ sample_degseq <- function( res } -#' @rdname sample_degseq -#' @param deterministic Whether the construction should be deterministic -#' @param ... Passed to `realize_degseq()` if \sQuote{deterministic} is true, -#' or to `sample_degseq()` otherwise. +#' @rdname constructor_spec +#' @param deterministic For `degseq()`, whether the construction should be +#' deterministic; if `TRUE`, wraps [realize_degseq()] instead of +#' [sample_degseq()]. #' @export degseq <- function(..., deterministic = FALSE) { constructor_spec( diff --git a/R/layout.R b/R/layout.R index 5c028fe8959..663836acf88 100644 --- a/R/layout.R +++ b/R/layout.R @@ -702,7 +702,8 @@ normalize <- function( #' @return A matrix with two columns and as many rows as the number of vertices #' in the input graph. #' @author Gabor Csardi \email{csardi.gabor@@gmail.com} -#' @seealso [layout_with_sugiyama()] +#' @seealso [layout_with_sugiyama()]. See [as_bipartite()] to build a lazy +#' layout specification for [add_layout_()]. #' @keywords graphs #' @export #' @family graph layouts @@ -779,8 +780,31 @@ layout_as_bipartite <- function( } -#' @rdname layout_as_bipartite -#' @param ... Arguments to pass to `layout_as_bipartite()`. +#' Layout specifications for `add_layout_()` +#' +#' @description +#' Each of these functions builds a lazy layout specification for the given +#' layout function, to be used with [add_layout_()]. The specification is +#' only evaluated when the layout is actually computed, so it can be combined +#' with layout modifiers such as [component_wise()] or [normalize()]. +#' +#' `as_bipartite()`, `as_star()` and `as_tree()` wrap [layout_as_bipartite()], +#' [layout_as_star()] and [layout_as_tree()] respectively. `in_circle()`, +#' `nicely()`, `on_grid()`, `on_sphere()` and `randomly()` wrap +#' [layout_in_circle()], [layout_nicely()], [layout_on_grid()], +#' [layout_on_sphere()] and [layout_randomly()]. `with_dh()`, `with_fr()`, +#' `with_gem()`, `with_graphopt()`, `with_kk()`, `with_lgl()`, `with_mds()`, +#' `with_sugiyama()` and `with_drl()` wrap [layout_with_dh()], +#' [layout_with_fr()], [layout_with_gem()], [layout_with_graphopt()], +#' [layout_with_kk()], [layout_with_lgl()], [layout_with_mds()], +#' [layout_with_sugiyama()] and [layout_with_drl()]. +#' +#' @param ... Forwarded to the corresponding `layout_*()` function. +#' @return An object of class `igraph_layout_spec`. +#' @seealso [add_layout_()] to apply a layout specification to a graph. +#' @family graph layouts +#' @keywords graphs +#' @rdname layout_spec #' @export as_bipartite <- function(...) layout_spec(layout_as_bipartite, ...) @@ -806,7 +830,8 @@ as_bipartite <- function(...) layout_spec(layout_as_bipartite, ...) #' @author Gabor Csardi \email{csardi.gabor@@gmail.com} #' @seealso [layout()] and [layout_with_drl()] for other layout #' algorithms, [plot.igraph()] and [tkplot()] on how to -#' plot graphs and [star()] on how to create ring graphs. +#' plot graphs and [star()] on how to create ring graphs. See [as_star()] to +#' build a lazy layout specification for [add_layout_()]. #' @keywords graphs #' @export #' @family graph layouts @@ -879,8 +904,7 @@ layout_as_star <- function( } -#' @rdname layout_as_star -#' @param ... Arguments to pass to `layout_as_star()`. +#' @rdname layout_spec #' @export as_star <- function(...) layout_spec(layout_as_star, ...) @@ -928,6 +952,8 @@ as_star <- function(...) layout_spec(layout_as_star, ...) #' \email{csardi.gabor@@gmail.com} #' @references Reingold, E and Tilford, J (1981). Tidier drawing of trees. #' *IEEE Trans. on Softw. Eng.*, SE-7(2):223--228. +#' @seealso [as_tree()] to build a lazy layout specification for +#' [add_layout_()]. #' @keywords graphs #' @export #' @family graph layouts @@ -1027,8 +1053,7 @@ layout_as_tree <- function( } -#' @rdname layout_as_tree -#' @param ... Passed to `layout_as_tree()`. +#' @rdname layout_spec #' @export as_tree <- function(...) layout_spec(layout_as_tree, ...) @@ -1068,6 +1093,8 @@ layout.reingold.tilford <- function(..., params = list()) { #' IDs. #' @return A numeric matrix with two columns, and one row for each vertex. #' @author Gabor Csardi \email{csardi.gabor@@gmail.com} +#' @seealso [in_circle()] to build a lazy layout specification for +#' [add_layout_()]. #' @keywords graphs #' @export #' @family graph layouts @@ -1098,8 +1125,7 @@ layout_in_circle <- function(graph, order = NULL) { ) } -#' @rdname layout_in_circle -#' @param ... Passed to `layout_in_circle()`. +#' @rdname layout_spec #' @export in_circle <- function(...) layout_spec(layout_in_circle, ...) @@ -1159,12 +1185,12 @@ layout.circle <- function(..., params = list()) { #' #' @param graph The input graph #' @param dim Dimensions, should be 2 or 3. -#' @param \dots For `layout_nicely()` the extra arguments are passed to -#' the real layout function. For `nicely()` all argument are passed to -#' `layout_nicely()`. +#' @param \dots Extra arguments are passed to the real layout function that +#' `layout_nicely()` ends up calling. #' @return A numeric matrix with two or three columns. #' @author Gabor Csardi \email{csardi.gabor@@gmail.com} -#' @seealso [plot.igraph()] +#' @seealso [plot.igraph()]. See [nicely()] to build a lazy layout +#' specification for [add_layout_()]. #' @keywords graphs #' @export #' @family graph layouts @@ -1230,7 +1256,7 @@ layout_nicely <- function(graph, dim = 2, ...) { } -#' @rdname layout_nicely +#' @rdname layout_spec #' @export nicely <- function(...) layout_spec(layout_nicely, ...) @@ -1258,7 +1284,8 @@ nicely <- function(...) layout_spec(layout_nicely, ...) #' @param dim Two or three. Whether to make 2d or a 3d layout. #' @return A two-column or three-column matrix. #' @author Tamas Nepusz \email{ntamas@@gmail.com} -#' @seealso [layout()] for other layout generators +#' @seealso [layout()] for other layout generators. See [on_grid()] to build +#' a lazy layout specification for [add_layout_()]. #' @keywords graphs #' @export #' @family graph layouts @@ -1345,8 +1372,7 @@ layout_on_grid <- function( } -#' @rdname layout_on_grid -#' @param ... Passed to `layout_on_grid()`. +#' @rdname layout_spec #' @export on_grid <- function(...) layout_spec(layout_on_grid, ...) ## ---------------------------------------------------------------- @@ -1366,6 +1392,8 @@ on_grid <- function(...) layout_spec(layout_on_grid, ...) #' @param graph The input graph. #' @return A numeric matrix with three columns, and one row for each vertex. #' @author Gabor Csardi \email{csardi.gabor@@gmail.com} +#' @seealso [on_sphere()] to build a lazy layout specification for +#' [add_layout_()]. #' @keywords graphs #' @export #' @family graph layouts @@ -1377,8 +1405,7 @@ layout_on_sphere <- function(graph) { } -#' @rdname layout_on_sphere -#' @param ... Passed to `layout_on_sphere()`. +#' @rdname layout_spec #' @export on_sphere <- function(...) layout_spec(layout_on_sphere, ...) @@ -1414,6 +1441,8 @@ layout.sphere <- function(..., params = list()) { #' or 3. #' @return A numeric matrix with two or three columns. #' @author Gabor Csardi \email{csardi.gabor@@gmail.com} +#' @seealso [randomly()] to build a lazy layout specification for +#' [add_layout_()]. #' @keywords graphs #' @export #' @family graph layouts @@ -1472,8 +1501,7 @@ layout_randomly <- function( } } -#' @rdname layout_randomly -#' @param ... Parameters to pass to `layout_randomly()`. +#' @rdname layout_spec #' @export randomly <- function(...) layout_spec(layout_randomly, ...) @@ -1550,7 +1578,8 @@ layout.random <- function(..., params = list()) { #' } #' @author Gabor Csardi \email{csardi.gabor@@gmail.com} #' @seealso [layout_with_fr()], -#' [layout_with_kk()] for other layout algorithms. +#' [layout_with_kk()] for other layout algorithms. See [with_dh()] to build a +#' lazy layout specification for [add_layout_()]. #' @references Ron Davidson, David Harel: Drawing Graphs Nicely Using Simulated #' Annealing. *ACM Transactions on Graphics* 15(4), pp. 301-331, 1996. #' @export @@ -1711,8 +1740,7 @@ layout_with_dh <- function( } -#' @rdname layout_with_dh -#' @param ... Passed to `layout_with_dh()`. +#' @rdname layout_spec #' @export with_dh <- function(...) layout_spec(layout_with_dh, ...) @@ -1771,7 +1799,8 @@ with_dh <- function(...) layout_spec(layout_with_dh, ...) #' vertex, according to the IDs of the vertex IDs. #' @author Gabor Csardi \email{csardi.gabor@@gmail.com} #' @seealso [layout_with_drl()], [layout_with_kk()] for -#' other layout algorithms. +#' other layout algorithms. See [with_fr()] to build a lazy layout +#' specification for [add_layout_()]. #' @references Fruchterman, T.M.J. and Reingold, E.M. (1991). Graph Drawing by #' Force-directed Placement. *Software - Practice and Experience*, #' 21(11):1129-1164. @@ -1988,8 +2017,7 @@ layout_with_fr <- function( } -#' @rdname layout_with_fr -#' @param ... Passed to `layout_with_fr()`. +#' @rdname layout_spec #' @export with_fr <- function(...) layout_spec(layout_with_fr, ...) @@ -2040,7 +2068,8 @@ layout.fruchterman.reingold <- function(..., params = list()) { #' vertices. #' @author Gabor Csardi \email{csardi.gabor@@gmail.com} #' @seealso [layout_with_fr()], -#' [plot.igraph()], [tkplot()] +#' [plot.igraph()], [tkplot()]. See [with_gem()] to build a lazy layout +#' specification for [add_layout_()]. #' @references Arne Frick, Andreas Ludwig, Heiko Mehldau: A Fast Adaptive #' Layout Algorithm for Undirected Graphs, *Proc. Graph Drawing 1994*, #' LNCS 894, pp. 388-403, 1995. @@ -2136,8 +2165,7 @@ layout_with_gem <- function( } -#' @rdname layout_with_gem -#' @param ... Passed to `layout_with_gem()`. +#' @rdname layout_spec #' @export with_gem <- function(...) layout_spec(layout_with_gem, ...) @@ -2182,6 +2210,8 @@ with_gem <- function(...) layout_spec(layout_with_gem, ...) #' @return A numeric matrix with two columns, and a row for each vertex. #' @author Michael Schmuhl for the original graphopt code, rewritten and #' wrapped by Gabor Csardi \email{csardi.gabor@@gmail.com}. +#' @seealso [with_graphopt()] to build a lazy layout specification for +#' [add_layout_()]. #' @keywords graphs #' @export #' @family graph layouts @@ -2269,8 +2299,7 @@ layout_with_graphopt <- function( } -#' @rdname layout_with_graphopt -#' @param ... Passed to `layout_with_graphopt()`. +#' @rdname layout_spec #' @export with_graphopt <- function(...) layout_spec(layout_with_graphopt, ...) @@ -2328,7 +2357,8 @@ with_graphopt <- function(...) layout_spec(layout_with_graphopt, ...) #' of the vertices. #' @author Gabor Csardi \email{csardi.gabor@@gmail.com} #' @seealso [layout_with_drl()], [plot.igraph()], -#' [tkplot()] +#' [tkplot()]. See [with_kk()] to build a lazy layout specification for +#' [add_layout_()]. #' @references Kamada, T. and Kawai, S.: An Algorithm for Drawing General #' Undirected Graphs. *Information Processing Letters*, 31/1, 7--15, 1989. #' @export @@ -2533,10 +2563,8 @@ layout_with_kk <- function( } -#' @rdname layout_with_kk -#' @param ... Passed to `layout_with_kk()`. +#' @rdname layout_spec #' @export -#' with_kk <- function(...) layout_spec(layout_with_kk, ...) #' The Kamada-Kawai layout algorithm @@ -2586,6 +2614,8 @@ layout.kamada.kawai <- function(..., params = list()) { #' default value is -1 which means that a random vertex is selected. #' @return A numeric matrix with two columns and as many rows as vertices. #' @author Gabor Csardi \email{csardi.gabor@@gmail.com} +#' @seealso [with_lgl()] to build a lazy layout specification for +#' [add_layout_()]. #' @keywords graphs #' @export #' @family graph layouts @@ -2684,8 +2714,7 @@ layout_with_lgl <- function( } -#' @rdname layout_with_lgl -#' @param ... Passed to `layout_with_lgl()`. +#' @rdname layout_spec #' @export with_lgl <- function(...) layout_spec(layout_with_lgl, ...) @@ -2738,7 +2767,8 @@ layout.lgl <- function(..., params = list()) { #' @return A numeric matrix with `dim` columns. #' @author Tamas Nepusz \email{ntamas@@gmail.com} and Gabor Csardi #' \email{csardi.gabor@@gmail.com} -#' @seealso [layout()], [plot.igraph()] +#' @seealso [layout()], [plot.igraph()]. See [with_mds()] to build a lazy +#' layout specification for [add_layout_()]. #' @references Cox, T. F. and Cox, M. A. A. (2001) *Multidimensional #' Scaling*. Second edition. Chapman and Hall. #' @export @@ -2780,8 +2810,7 @@ layout_with_mds <- function( } -#' @rdname layout_with_mds -#' @param ... Passed to `layout_with_mds()`. +#' @rdname layout_spec #' @export with_mds <- function(...) layout_spec(layout_with_mds, ...) @@ -2852,6 +2881,8 @@ with_mds <- function(...) layout_spec(layout_with_mds, ...) #' } #' } #' @author Tamas Nepusz \email{ntamas@@gmail.com} +#' @seealso [with_sugiyama()] to build a lazy layout specification for +#' [add_layout_()]. #' @references K. Sugiyama, S. Tagawa and M. Toda, "Methods for Visual #' Understanding of Hierarchical Systems". IEEE Transactions on Systems, Man #' and Cybernetics 11(2):109-125, 1981. @@ -3166,8 +3197,7 @@ layout_with_sugiyama <- function( } -#' @rdname layout_with_sugiyama -#' @param ... Passed to `layout_with_sugiyama()`. +#' @rdname layout_spec #' @export with_sugiyama <- function(...) layout_spec(layout_with_sugiyama, ...) @@ -3198,7 +3228,6 @@ with_sugiyama <- function(...) layout_spec(layout_with_sugiyama, ...) #' #' @param graphs A list of graph objects. #' @param layouts A list of two-column matrices. -#' @inheritParams rlang::args_dots_empty #' @param method Character constant giving the method to use. Right now only #' `dla` is implemented. #' @param layout A function object, the layout function to use. The default @@ -3623,7 +3652,8 @@ layout.drl <- function( #' @author Shawn Martin () #' and Gabor Csardi \email{csardi.gabor@@gmail.com} for the R/igraph interface #' and the three dimensional version. -#' @seealso [layout()] for other layout generators. +#' @seealso [layout()] for other layout generators. See [with_drl()] to +#' build a lazy layout specification for [add_layout_()]. #' @references See the following technical report: Martin, S., Brown, W.M., #' Klavans, R., Boyack, K.W., DrL: Distributed Recursive (Graph) Layout. SAND #' Reports, 2008. 2936: p. 1-10. @@ -3738,9 +3768,7 @@ layout_with_drl <- function( } -#' @rdname layout_with_drl -#' @param ... Passed to `layout_with_drl()`. -#' @family layout_drl +#' @rdname layout_spec #' @export with_drl <- function(...) layout_spec(layout_with_drl, ...) diff --git a/R/make.R b/R/make.R index 7f245ca01ea..ec1f8fd6487 100644 --- a/R/make.R +++ b/R/make.R @@ -2519,6 +2519,8 @@ wheel <- function( #' to their parents, while `undirected` creates an undirected #' graph. #' @return An igraph graph +#' @seealso [tree()] to build a lazy constructor specification for +#' [make_()] or [sample_()]. #' #' @family deterministic constructors #' @export @@ -2658,8 +2660,7 @@ sample_tree <- function( ) } -#' @rdname make_tree -#' @param ... Passed to `make_tree()` or `sample_tree()`. +#' @rdname constructor_spec #' @export tree <- function(...) { constructor_spec(list(make = make_tree, sample = sample_tree), ...) diff --git a/R/par.R b/R/par.R index a57b7e8f9dc..0091dacfc6c 100644 --- a/R/par.R +++ b/R/par.R @@ -195,23 +195,14 @@ igraph.pars.callbacks <- list("verbose" = igraph.pars.set.verbose) #' } #' } #' -#' @aliases igraph_options igraph_opt #' @param \dots 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. -#' @param x A character string holding an option name. -#' @param default 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. -#' @return `igraph_options()` returns a list with the old values of the -#' updated parameters, invisibly. Without any arguments, it returns the -#' values of all options. -#' -#' For `igraph_opt()`, the current value set for option `x`, or -#' `NULL` if the option is unset. +#' @return A list with the old values of the updated parameters, invisibly. +#' Without any arguments, it returns the values of all options. #' @author Gabor Csardi \email{csardi.gabor@@gmail.com} -#' @seealso `igraph_options()` is similar to [options()] and -#' `igraph_opt()` is similar to [getOption()]. +#' @seealso Similar to [options()]. See [igraph_opt()] to retrieve the +#' value of a single option. #' @keywords graphs #' @examples #' @@ -294,9 +285,28 @@ get_all_options <- function() { res } -#' @rdname igraph_options +#' Query a single igraph parameter +#' +#' Retrieve the current value of one igraph option set via +#' [igraph_options()]. +#' +#' @param x A character string holding an option name. #' @inheritParams rlang::args_dots_empty +#' @param default 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. +#' @return The current value set for option `x`, or `NULL` if the option is +#' unset. +#' @author Gabor Csardi \email{csardi.gabor@@gmail.com} +#' @seealso Similar to [getOption()]. See [igraph_options()] to set options. +#' @keywords graphs +#' @examples +#' oldval <- igraph_opt("verbose") +#' igraph_options(verbose = TRUE) +#' layout_with_kk(make_ring(10)) +#' igraph_options(verbose = oldval) #' @export +#' @family igraph options igraph_opt <- function( x, ..., diff --git a/R/sir.R b/R/sir.R index faf57515852..efc2d8056c3 100644 --- a/R/sir.R +++ b/R/sir.R @@ -53,7 +53,9 @@ #' @param gamma Positive scalar. The rate of recovery of an infected #' individual. Formally, this is the rate parameter of an exponential #' distribution. -#' @inheritParams rlang::args_dots_empty +#' @param \dots For `sir()` and `time_bins()`, these dots must be empty. For +#' `median.sir()` and `quantile.sir()`, unused, present for S3 method +#' consistency. #' @param no.sim Integer scalar, the number simulation runs to perform. #' @param x A `sir` object, returned by the `sir()` function. #' @param middle Logical, whether to return the middle of the time bins, @@ -66,7 +68,6 @@ #' for recovered. #' @param prob Numeric vector of probabilities, in \[0,1\], they specify the #' quantiles to calculate. -#' @param \dots Additional arguments, ignored currently. #' @return For `sir()` the results are returned in an object of class #' \sQuote{`sir`}, which is a list, with one element for each simulation. #' Each simulation is itself a list with the following elements. They are all diff --git a/R/structural-properties.R b/R/structural-properties.R index c2970ebc5a9..6206c631c40 100644 --- a/R/structural-properties.R +++ b/R/structural-properties.R @@ -4147,12 +4147,12 @@ dfs <- function( #' depth-first searches. #' #' @param graph The graph to analyze. -#' @inheritParams rlang::args_dots_empty #' @param mode Character string, either \dQuote{weak} or \dQuote{strong}. For #' directed graphs \dQuote{weak} implies weakly, \dQuote{strong} strongly #' connected components to search. It is ignored for undirected graphs. -#' @param \dots Additional attributes to pass to `cluster`, right now only -#' `mode` makes sense. +#' @param \dots For `component_distribution()`, forwarded to `components()`. +#' For `components()`, `is_connected()`, `count_components()` and +#' `largest_component()`, these dots must be empty. #' @return For `is_connected()` a Logical. #' #' For `components()` a named list with three components: @@ -4246,7 +4246,6 @@ components <- function( } #' @rdname components -#' @inheritParams rlang::args_dots_empty #' @export is_connected <- function( graph, @@ -4295,7 +4294,6 @@ is_connected <- function( } #' @rdname components -#' @inheritParams rlang::args_dots_empty #' @export count_components <- function( graph, diff --git a/R/tkplot.R b/R/tkplot.R index 9342a284939..96934a4c80d 100644 --- a/R/tkplot.R +++ b/R/tkplot.R @@ -276,8 +276,9 @@ assign(".next", 1, .tkplot.env) #' vertices, in absolute coordinates. #' @param degree The degree to rotate the plot. #' @param rad The degree to rotate the plot, in radian. -#' @param \dots Additional plotting parameters. See [igraph.plotting] for -#' the complete list. +#' @param \dots For `tkplot()`, additional plotting parameters, see +#' [igraph.plotting] for the complete list. For `tk_close()`, `tk_fit()`, +#' `tk_coords()` and `tk_rotate()`, these dots must be empty. #' @return `tkplot()` returns an integer, the ID of the plot, this can be #' used to manipulate it from the command line. #' @@ -527,7 +528,6 @@ tkplot <- function(graph, canvas.width = 450, canvas.height = 450, ...) { ################################################################### #' @rdname tkplot -#' @inheritParams rlang::args_dots_empty #' @export tk_close <- function( tkp.id, @@ -595,7 +595,6 @@ tk_off <- function() { } #' @rdname tkplot -#' @inheritParams rlang::args_dots_empty #' @export tk_fit <- function( tkp.id, @@ -729,7 +728,6 @@ tk_postscript <- function(tkp.id) { } #' @rdname tkplot -#' @inheritParams rlang::args_dots_empty #' @export tk_coords <- function( tkp.id, @@ -798,7 +796,6 @@ tk_set_coords <- function(tkp.id, coords) { } #' @rdname tkplot -#' @inheritParams rlang::args_dots_empty #' @export tk_rotate <- function( tkp.id, diff --git a/man/add_layout_.Rd b/man/add_layout_.Rd index eacd658cfef..fb1d950e94d 100644 --- a/man/add_layout_.Rd +++ b/man/add_layout_.Rd @@ -29,6 +29,7 @@ Add layout to graph \code{\link[=layout_]{layout_()}} for a description of the layout API. Other graph layouts: +\code{\link[=as_bipartite]{as_bipartite()}}, \code{\link[=component_wise]{component_wise()}}, \code{\link[=layout_]{layout_()}}, \code{\link[=layout_as_bipartite]{layout_as_bipartite()}}, diff --git a/man/cluster.distribution.Rd b/man/cluster.distribution.Rd index ff4aea99839..6075fd30f11 100644 --- a/man/cluster.distribution.Rd +++ b/man/cluster.distribution.Rd @@ -15,8 +15,9 @@ frequency) is calculated.} \item{mul.size}{Logical. If TRUE the relative frequencies will be multiplied by the cluster sizes.} -\item{...}{Additional attributes to pass to \code{cluster}, right now only -\code{mode} makes sense.} +\item{...}{For \code{component_distribution()}, forwarded to \code{components()}. +For \code{components()}, \code{is_connected()}, \code{count_components()} and +\code{largest_component()}, these dots must be empty.} } \description{ \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} diff --git a/man/cohesive_blocks.Rd b/man/cohesive_blocks.Rd index e03fc6bf354..80162d81f0b 100644 --- a/man/cohesive_blocks.Rd +++ b/man/cohesive_blocks.Rd @@ -60,7 +60,9 @@ supplied whose cohesive block structure is given in the \code{blocks()} argument.} \item{\dots}{Additional arguments. \code{plot_hierarchy()} and \code{\link[=plot]{plot()}} pass -them to \code{plot.igraph()}. \code{\link[=print]{print()}} and \code{\link[=summary]{summary()}} ignore them.} +them to \code{plot.igraph()}. \code{\link[=print]{print()}} and \code{\link[=summary]{summary()}} ignore them. +\code{cohesive_blocks()} and \code{export_pajek()} do not accept extra arguments; +these dots must be empty for them.} \item{labels}{Logical, whether to add the vertex labels to the result object. These labels can be then used when reporting and plotting the diff --git a/man/component_wise.Rd b/man/component_wise.Rd index 050e6882e4d..d3b5f01615e 100644 --- a/man/component_wise.Rd +++ b/man/component_wise.Rd @@ -34,6 +34,7 @@ Other layout modifiers: Other graph layouts: \code{\link[=add_layout_]{add_layout_()}}, +\code{\link[=as_bipartite]{as_bipartite()}}, \code{\link[=layout_]{layout_()}}, \code{\link[=layout_as_bipartite]{layout_as_bipartite()}}, \code{\link[=layout_as_star]{layout_as_star()}}, diff --git a/man/components.Rd b/man/components.Rd index 82a5a4fe0eb..7e90fda56ba 100644 --- a/man/components.Rd +++ b/man/components.Rd @@ -27,8 +27,9 @@ frequency) is calculated.} \item{mul.size}{Logical. If TRUE the relative frequencies will be multiplied by the cluster sizes.} -\item{\dots}{Additional attributes to pass to \code{cluster}, right now only -\code{mode} makes sense.} +\item{\dots}{For \code{component_distribution()}, forwarded to \code{components()}. +For \code{components()}, \code{is_connected()}, \code{count_components()} and +\code{largest_component()}, these dots must be empty.} \item{mode}{Character string, either \dQuote{weak} or \dQuote{strong}. For directed graphs \dQuote{weak} implies weakly, \dQuote{strong} strongly diff --git a/man/constructor_spec.Rd b/man/constructor_spec.Rd new file mode 100644 index 00000000000..b35b06ab9df --- /dev/null +++ b/man/constructor_spec.Rd @@ -0,0 +1,63 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/conversion.R, R/games.R, R/make.R +\name{from_data_frame} +\alias{from_data_frame} +\alias{from_edgelist} +\alias{degseq} +\alias{tree} +\title{Constructor specifications for \code{make_()} and \code{sample_()}} +\usage{ +from_data_frame(...) + +from_edgelist(...) + +degseq(..., deterministic = FALSE) + +tree(...) +} +\arguments{ +\item{...}{Forwarded to the corresponding constructor function.} + +\item{deterministic}{For \code{degseq()}, whether the construction should be +deterministic; if \code{TRUE}, wraps \code{\link[=realize_degseq]{realize_degseq()}} instead of +\code{\link[=sample_degseq]{sample_degseq()}}.} +} +\value{ +An object of class \code{igraph_constructor_spec}. +} +\description{ +Each of these functions builds a lazy constructor specification for the +given graph constructor, to be used with \code{\link[=make_]{make_()}} or \code{\link[=sample_]{sample_()}}. The +specification is only evaluated when the graph is actually constructed, +so it can be combined with constructor modifiers such as +\code{\link[=with_vertex_]{with_vertex_()}} or \code{\link[=with_edge_]{with_edge_()}}. + +\code{from_data_frame()}, \code{from_edgelist()}, \code{tree()} and \code{degseq()} wrap +\code{\link[=graph_from_data_frame]{graph_from_data_frame()}}, \code{\link[=graph_from_edgelist]{graph_from_edgelist()}}, \code{\link[=make_tree]{make_tree()}} (or +\code{sample_tree()}) and \code{\link[=sample_degseq]{sample_degseq()}} (or \code{realize_degseq()}), +respectively. +} +\seealso{ +\code{\link[=make_]{make_()}} and \code{\link[=sample_]{sample_()}} to apply a constructor specification. + +Other deterministic constructors: +\code{\link[=graph_from_atlas]{graph_from_atlas()}}, +\code{\link[=graph_from_edgelist]{graph_from_edgelist()}}, +\code{\link[=graph_from_literal]{graph_from_literal()}}, +\code{\link[=make_]{make_()}}, +\code{\link[=make_chordal_ring]{make_chordal_ring()}}, +\code{\link[=make_circulant]{make_circulant()}}, +\code{\link[=make_empty_graph]{make_empty_graph()}}, +\code{\link[=make_full_citation_graph]{make_full_citation_graph()}}, +\code{\link[=make_full_graph]{make_full_graph()}}, +\code{\link[=make_full_multipartite]{make_full_multipartite()}}, +\code{\link[=make_graph]{make_graph()}}, +\code{\link[=make_lattice]{make_lattice()}}, +\code{\link[=make_ring]{make_ring()}}, +\code{\link[=make_star]{make_star()}}, +\code{\link[=make_tree]{make_tree()}}, +\code{\link[=make_turan]{make_turan()}}, +\code{\link[=make_wheel]{make_wheel()}} +} +\concept{deterministic constructors} +\keyword{graphs} diff --git a/man/graph_from_atlas.Rd b/man/graph_from_atlas.Rd index a85002edc9f..0a48ec9ad14 100644 --- a/man/graph_from_atlas.Rd +++ b/man/graph_from_atlas.Rd @@ -42,6 +42,7 @@ graph_from_atlas(sample(0:1252, 1)) } \seealso{ Other deterministic constructors: +\code{\link[=from_data_frame]{from_data_frame()}}, \code{\link[=graph_from_edgelist]{graph_from_edgelist()}}, \code{\link[=graph_from_literal]{graph_from_literal()}}, \code{\link[=make_]{make_()}}, diff --git a/man/graph_from_data_frame.Rd b/man/graph_from_data_frame.Rd index f435b5f650d..3be6d13a4c3 100644 --- a/man/graph_from_data_frame.Rd +++ b/man/graph_from_data_frame.Rd @@ -3,14 +3,11 @@ \name{as_data_frame} \alias{as_data_frame} \alias{graph_from_data_frame} -\alias{from_data_frame} \title{Creating igraph graphs from data frames or vice-versa} \usage{ as_data_frame(x, what = c("edges", "vertices", "both")) graph_from_data_frame(d, directed = TRUE, ..., vertices = NULL) - -from_data_frame(...) } \arguments{ \item{x}{An igraph object.} @@ -25,7 +22,7 @@ version 0.7 this argument is coerced to a data frame with \item{directed}{Logical, whether or not to create a directed graph.} -\item{...}{Passed to \code{graph_from_data_frame()}.} +\item{...}{These dots are for future extensions and must be empty.} \item{vertices}{A data frame with vertex metadata, or \code{NULL}. See details below. Since version 0.7 this argument is coerced to a data frame @@ -130,7 +127,8 @@ as_data_frame(g, what = "edges") \seealso{ \code{\link[=graph_from_literal]{graph_from_literal()}} for another way to create graphs, \code{\link[=read.table]{read.table()}} to read in tables -from files. +from files. See \code{\link[=from_data_frame]{from_data_frame()}} to build a lazy constructor +specification for \code{\link[=make_]{make_()}} or \code{\link[=sample_]{sample_()}}. Other conversion: \code{\link[=as.matrix.igraph]{as.matrix.igraph()}}, diff --git a/man/graph_from_edgelist.Rd b/man/graph_from_edgelist.Rd index 7d24a705763..2609ca569c0 100644 --- a/man/graph_from_edgelist.Rd +++ b/man/graph_from_edgelist.Rd @@ -2,17 +2,14 @@ % Please edit documentation in R/conversion.R \name{graph_from_edgelist} \alias{graph_from_edgelist} -\alias{from_edgelist} \title{Create a graph from an edge list matrix} \usage{ graph_from_edgelist(el, ..., directed = TRUE) - -from_edgelist(...) } \arguments{ \item{el}{The edge list, a two column matrix, character or numeric.} -\item{...}{Passed to \code{graph_from_edgelist()}.} +\item{...}{These dots are for future extensions and must be empty.} \item{directed}{Whether to create a directed graph.} } @@ -39,7 +36,11 @@ graph_from_edgelist(el) graph_from_edgelist(cbind(1:10, c(2:10, 1))) } \seealso{ +\code{\link[=from_edgelist]{from_edgelist()}} to build a lazy constructor specification for +\code{\link[=make_]{make_()}} or \code{\link[=sample_]{sample_()}}. + Other deterministic constructors: +\code{\link[=from_data_frame]{from_data_frame()}}, \code{\link[=graph_from_atlas]{graph_from_atlas()}}, \code{\link[=graph_from_literal]{graph_from_literal()}}, \code{\link[=make_]{make_()}}, diff --git a/man/graph_from_literal.Rd b/man/graph_from_literal.Rd index 1bbb94926a5..b9a38487859 100644 --- a/man/graph_from_literal.Rd +++ b/man/graph_from_literal.Rd @@ -134,6 +134,7 @@ g6 } \seealso{ Other deterministic constructors: +\code{\link[=from_data_frame]{from_data_frame()}}, \code{\link[=graph_from_atlas]{graph_from_atlas()}}, \code{\link[=graph_from_edgelist]{graph_from_edgelist()}}, \code{\link[=make_]{make_()}}, diff --git a/man/igraph_opt.Rd b/man/igraph_opt.Rd new file mode 100644 index 00000000000..c2dbecd3368 --- /dev/null +++ b/man/igraph_opt.Rd @@ -0,0 +1,43 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/par.R +\name{igraph_opt} +\alias{igraph_opt} +\title{Query a single igraph parameter} +\usage{ +igraph_opt(x, ..., default = NULL) +} +\arguments{ +\item{x}{A character string holding an option name.} + +\item{...}{These dots are for future extensions and must be empty.} + +\item{default}{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.} +} +\value{ +The current value set for option \code{x}, or \code{NULL} if the option is +unset. +} +\description{ +Retrieve the current value of one igraph option set via +\code{\link[=igraph_options]{igraph_options()}}. +} +\examples{ +oldval <- igraph_opt("verbose") +igraph_options(verbose = TRUE) +layout_with_kk(make_ring(10)) +igraph_options(verbose = oldval) +} +\seealso{ +Similar to \code{\link[=getOption]{getOption()}}. See \code{\link[=igraph_options]{igraph_options()}} to set options. + +Other igraph options: +\code{\link[=igraph_options]{igraph_options()}}, +\code{\link[=with_igraph_opt]{with_igraph_opt()}} +} +\author{ +Gabor Csardi \email{csardi.gabor@gmail.com} +} +\concept{igraph options} +\keyword{graphs} diff --git a/man/igraph_options.Rd b/man/igraph_options.Rd index 8ba971f89fc..7cf8b8f7982 100644 --- a/man/igraph_options.Rd +++ b/man/igraph_options.Rd @@ -2,31 +2,18 @@ % Please edit documentation in R/par.R \name{igraph_options} \alias{igraph_options} -\alias{igraph_opt} \title{Parameters for the igraph package} \usage{ igraph_options(...) - -igraph_opt(x, ..., default = NULL) } \arguments{ \item{\dots}{A list may be given as the only argument, or any number of arguments may be in the \code{name=value} form, or no argument at all may be given. See the Value and Details sections for explanation.} - -\item{x}{A character string holding an option name.} - -\item{default}{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.} } \value{ -\code{igraph_options()} returns a list with the old values of the -updated parameters, invisibly. Without any arguments, it returns the -values of all options. - -For \code{igraph_opt()}, the current value set for option \code{x}, or -\code{NULL} if the option is unset. +A list with the old values of the updated parameters, invisibly. +Without any arguments, it returns the values of all options. } \description{ igraph has some parameters which (usually) affect the behavior of many @@ -135,10 +122,11 @@ igraph_opt("verbose") } \seealso{ -\code{igraph_options()} is similar to \code{\link[=options]{options()}} and -\code{igraph_opt()} is similar to \code{\link[=getOption]{getOption()}}. +Similar to \code{\link[=options]{options()}}. See \code{\link[=igraph_opt]{igraph_opt()}} to retrieve the +value of a single option. Other igraph options: +\code{\link[=igraph_opt]{igraph_opt()}}, \code{\link[=with_igraph_opt]{with_igraph_opt()}} } \author{ diff --git a/man/layout.auto.Rd b/man/layout.auto.Rd index ff8c13953de..0278f8f3d9b 100644 --- a/man/layout.auto.Rd +++ b/man/layout.auto.Rd @@ -11,9 +11,8 @@ layout.auto(graph, dim = 2, ...) \item{dim}{Dimensions, should be 2 or 3.} -\item{...}{For \code{layout_nicely()} the extra arguments are passed to -the real layout function. For \code{nicely()} all argument are passed to -\code{layout_nicely()}.} +\item{...}{Extra arguments are passed to the real layout function that +\code{layout_nicely()} ends up calling.} } \description{ \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} diff --git a/man/layout_.Rd b/man/layout_.Rd index 756059b5064..f5d0aa021d3 100644 --- a/man/layout_.Rd +++ b/man/layout_.Rd @@ -113,6 +113,7 @@ graph as an attribute. Other graph layouts: \code{\link[=add_layout_]{add_layout_()}}, +\code{\link[=as_bipartite]{as_bipartite()}}, \code{\link[=component_wise]{component_wise()}}, \code{\link[=layout_as_bipartite]{layout_as_bipartite()}}, \code{\link[=layout_as_star]{layout_as_star()}}, diff --git a/man/layout_as_bipartite.Rd b/man/layout_as_bipartite.Rd index c02f8d368cc..7cbe1728a25 100644 --- a/man/layout_as_bipartite.Rd +++ b/man/layout_as_bipartite.Rd @@ -2,7 +2,6 @@ % Please edit documentation in R/layout.R \name{layout_as_bipartite} \alias{layout_as_bipartite} -\alias{as_bipartite} \title{Simple two-row layout for bipartite graphs} \usage{ layout_as_bipartite( @@ -13,8 +12,6 @@ layout_as_bipartite( vgap = 1, maxiter = 100 ) - -as_bipartite(...) } \arguments{ \item{graph}{The bipartite input graph. It should have a logical @@ -25,7 +22,7 @@ given.} \code{NULL} (the default), then the \sQuote{\code{type}} vertex attribute is used.} -\item{...}{Arguments to pass to \code{layout_as_bipartite()}.} +\item{...}{These dots are for future extensions and must be empty.} \item{hgap}{Real scalar, the minimum horizontal gap between vertices in the same layer.} @@ -69,10 +66,12 @@ g \%>\% plot() } \seealso{ -\code{\link[=layout_with_sugiyama]{layout_with_sugiyama()}} +\code{\link[=layout_with_sugiyama]{layout_with_sugiyama()}}. See \code{\link[=as_bipartite]{as_bipartite()}} to build a lazy +layout specification for \code{\link[=add_layout_]{add_layout_()}}. Other graph layouts: \code{\link[=add_layout_]{add_layout_()}}, +\code{\link[=as_bipartite]{as_bipartite()}}, \code{\link[=component_wise]{component_wise()}}, \code{\link[=layout_]{layout_()}}, \code{\link[=layout_as_star]{layout_as_star()}}, diff --git a/man/layout_as_star.Rd b/man/layout_as_star.Rd index 5e488de3a91..42f5433baa3 100644 --- a/man/layout_as_star.Rd +++ b/man/layout_as_star.Rd @@ -2,17 +2,14 @@ % Please edit documentation in R/layout.R \name{layout_as_star} \alias{layout_as_star} -\alias{as_star} \title{Generate coordinates to place the vertices of a graph in a star-shape} \usage{ layout_as_star(graph, ..., center = NULL, order = NULL) - -as_star(...) } \arguments{ \item{graph}{The graph to layout.} -\item{...}{Arguments to pass to \code{layout_as_star()}.} +\item{...}{These dots are for future extensions and must be empty.} \item{center}{The ID of the vertex to put in the center. The default \code{NULL} uses the first vertex.} @@ -47,10 +44,12 @@ layout_(g, as_star()) \seealso{ \code{\link[=layout]{layout()}} and \code{\link[=layout_with_drl]{layout_with_drl()}} for other layout algorithms, \code{\link[=plot.igraph]{plot.igraph()}} and \code{\link[=tkplot]{tkplot()}} on how to -plot graphs and \code{\link[=star]{star()}} on how to create ring graphs. +plot graphs and \code{\link[=star]{star()}} on how to create ring graphs. See \code{\link[=as_star]{as_star()}} to +build a lazy layout specification for \code{\link[=add_layout_]{add_layout_()}}. Other graph layouts: \code{\link[=add_layout_]{add_layout_()}}, +\code{\link[=as_bipartite]{as_bipartite()}}, \code{\link[=component_wise]{component_wise()}}, \code{\link[=layout_]{layout_()}}, \code{\link[=layout_as_bipartite]{layout_as_bipartite()}}, diff --git a/man/layout_as_tree.Rd b/man/layout_as_tree.Rd index 8da0425eb20..39d72dd16db 100644 --- a/man/layout_as_tree.Rd +++ b/man/layout_as_tree.Rd @@ -2,7 +2,6 @@ % Please edit documentation in R/layout.R \name{layout_as_tree} \alias{layout_as_tree} -\alias{as_tree} \title{The Reingold-Tilford graph layout algorithm} \usage{ layout_as_tree( @@ -14,13 +13,11 @@ layout_as_tree( mode = c("out", "in", "all"), flip.y = TRUE ) - -as_tree(...) } \arguments{ \item{graph}{The input graph.} -\item{...}{Passed to \code{layout_as_tree()}.} +\item{...}{These dots are for future extensions and must be empty.} \item{root}{The index of the root vertex or root vertices. If this is a non-empty vector then the supplied vertex IDs are used as the roots of the @@ -87,8 +84,12 @@ Reingold, E and Tilford, J (1981). Tidier drawing of trees. \emph{IEEE Trans. on Softw. Eng.}, SE-7(2):223--228. } \seealso{ +\code{\link[=as_tree]{as_tree()}} to build a lazy layout specification for +\code{\link[=add_layout_]{add_layout_()}}. + Other graph layouts: \code{\link[=add_layout_]{add_layout_()}}, +\code{\link[=as_bipartite]{as_bipartite()}}, \code{\link[=component_wise]{component_wise()}}, \code{\link[=layout_]{layout_()}}, \code{\link[=layout_as_bipartite]{layout_as_bipartite()}}, diff --git a/man/layout_in_circle.Rd b/man/layout_in_circle.Rd index 4fda9824f9a..14ed0afac80 100644 --- a/man/layout_in_circle.Rd +++ b/man/layout_in_circle.Rd @@ -2,12 +2,9 @@ % Please edit documentation in R/layout.R \name{layout_in_circle} \alias{layout_in_circle} -\alias{in_circle} \title{Graph layout with vertices on a circle.} \usage{ layout_in_circle(graph, order = NULL) - -in_circle(...) } \arguments{ \item{graph}{The input graph.} @@ -16,8 +13,6 @@ in_circle(...) desired placement. Vertices that are not included here will be placed at (0,0). The default \code{NULL} selects all vertices, in the order of their IDs.} - -\item{...}{Passed to \code{layout_in_circle()}.} } \value{ A numeric matrix with two columns, and one row for each vertex. @@ -52,8 +47,12 @@ plot(karate, layout = coords) \dontshow{\}) # examplesIf} } \seealso{ +\code{\link[=in_circle]{in_circle()}} to build a lazy layout specification for +\code{\link[=add_layout_]{add_layout_()}}. + Other graph layouts: \code{\link[=add_layout_]{add_layout_()}}, +\code{\link[=as_bipartite]{as_bipartite()}}, \code{\link[=component_wise]{component_wise()}}, \code{\link[=layout_]{layout_()}}, \code{\link[=layout_as_bipartite]{layout_as_bipartite()}}, diff --git a/man/layout_nicely.Rd b/man/layout_nicely.Rd index 4235ff72301..0f986bf66b1 100644 --- a/man/layout_nicely.Rd +++ b/man/layout_nicely.Rd @@ -2,21 +2,17 @@ % Please edit documentation in R/layout.R \name{layout_nicely} \alias{layout_nicely} -\alias{nicely} \title{Choose an appropriate graph layout algorithm automatically} \usage{ layout_nicely(graph, dim = 2, ...) - -nicely(...) } \arguments{ \item{graph}{The input graph} \item{dim}{Dimensions, should be 2 or 3.} -\item{\dots}{For \code{layout_nicely()} the extra arguments are passed to -the real layout function. For \code{nicely()} all argument are passed to -\code{layout_nicely()}.} +\item{\dots}{Extra arguments are passed to the real layout function that +\code{layout_nicely()} ends up calling.} } \value{ A numeric matrix with two or three columns. @@ -63,10 +59,12 @@ can use \code{weights = NA} to silence the warning. } \seealso{ -\code{\link[=plot.igraph]{plot.igraph()}} +\code{\link[=plot.igraph]{plot.igraph()}}. See \code{\link[=nicely]{nicely()}} to build a lazy layout +specification for \code{\link[=add_layout_]{add_layout_()}}. Other graph layouts: \code{\link[=add_layout_]{add_layout_()}}, +\code{\link[=as_bipartite]{as_bipartite()}}, \code{\link[=component_wise]{component_wise()}}, \code{\link[=layout_]{layout_()}}, \code{\link[=layout_as_bipartite]{layout_as_bipartite()}}, diff --git a/man/layout_on_grid.Rd b/man/layout_on_grid.Rd index b36f1273d8e..845643daeab 100644 --- a/man/layout_on_grid.Rd +++ b/man/layout_on_grid.Rd @@ -2,17 +2,14 @@ % Please edit documentation in R/layout.R \name{layout_on_grid} \alias{layout_on_grid} -\alias{on_grid} \title{Simple grid layout} \usage{ layout_on_grid(graph, ..., width = 0, height = 0, dim = 2) - -on_grid(...) } \arguments{ \item{graph}{The input graph.} -\item{...}{Passed to \code{layout_on_grid()}.} +\item{...}{These dots are for future extensions and must be empty.} \item{width}{The number of vertices in a single row of the grid. If this is zero or negative, then for 2d layouts the width of the grid will be the @@ -55,10 +52,12 @@ if (interactive() && requireNamespace("rgl", quietly = TRUE)) { } } \seealso{ -\code{\link[=layout]{layout()}} for other layout generators +\code{\link[=layout]{layout()}} for other layout generators. See \code{\link[=on_grid]{on_grid()}} to build +a lazy layout specification for \code{\link[=add_layout_]{add_layout_()}}. Other graph layouts: \code{\link[=add_layout_]{add_layout_()}}, +\code{\link[=as_bipartite]{as_bipartite()}}, \code{\link[=component_wise]{component_wise()}}, \code{\link[=layout_]{layout_()}}, \code{\link[=layout_as_bipartite]{layout_as_bipartite()}}, diff --git a/man/layout_on_sphere.Rd b/man/layout_on_sphere.Rd index a1ccb68fbc1..9efff77270d 100644 --- a/man/layout_on_sphere.Rd +++ b/man/layout_on_sphere.Rd @@ -2,17 +2,12 @@ % Please edit documentation in R/layout.R \name{layout_on_sphere} \alias{layout_on_sphere} -\alias{on_sphere} \title{Graph layout with vertices on the surface of a sphere} \usage{ layout_on_sphere(graph) - -on_sphere(...) } \arguments{ \item{graph}{The input graph.} - -\item{...}{Passed to \code{layout_on_sphere()}.} } \value{ A numeric matrix with three columns, and one row for each vertex. @@ -34,8 +29,12 @@ If you want to order the vertices differently, then permute them using the } \seealso{ +\code{\link[=on_sphere]{on_sphere()}} to build a lazy layout specification for +\code{\link[=add_layout_]{add_layout_()}}. + Other graph layouts: \code{\link[=add_layout_]{add_layout_()}}, +\code{\link[=as_bipartite]{as_bipartite()}}, \code{\link[=component_wise]{component_wise()}}, \code{\link[=layout_]{layout_()}}, \code{\link[=layout_as_bipartite]{layout_as_bipartite()}}, diff --git a/man/layout_randomly.Rd b/man/layout_randomly.Rd index 8bfb119d6d7..c9d1e7c8c4f 100644 --- a/man/layout_randomly.Rd +++ b/man/layout_randomly.Rd @@ -2,17 +2,14 @@ % Please edit documentation in R/layout.R \name{layout_randomly} \alias{layout_randomly} -\alias{randomly} \title{Randomly place vertices on a plane or in 3d space} \usage{ layout_randomly(graph, ..., dim = c(2, 3)) - -randomly(...) } \arguments{ \item{graph}{The input graph.} -\item{...}{Parameters to pass to \code{layout_randomly()}.} +\item{...}{These dots are for future extensions and must be empty.} \item{dim}{Integer scalar, the dimension of the space to use. It must be 2 or 3.} @@ -34,8 +31,12 @@ layout generators. } \seealso{ +\code{\link[=randomly]{randomly()}} to build a lazy layout specification for +\code{\link[=add_layout_]{add_layout_()}}. + Other graph layouts: \code{\link[=add_layout_]{add_layout_()}}, +\code{\link[=as_bipartite]{as_bipartite()}}, \code{\link[=component_wise]{component_wise()}}, \code{\link[=layout_]{layout_()}}, \code{\link[=layout_as_bipartite]{layout_as_bipartite()}}, diff --git a/man/layout_spec.Rd b/man/layout_spec.Rd new file mode 100644 index 00000000000..df65aa03e5d --- /dev/null +++ b/man/layout_spec.Rd @@ -0,0 +1,108 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/layout.R +\name{as_bipartite} +\alias{as_bipartite} +\alias{as_star} +\alias{as_tree} +\alias{in_circle} +\alias{nicely} +\alias{on_grid} +\alias{on_sphere} +\alias{randomly} +\alias{with_dh} +\alias{with_fr} +\alias{with_gem} +\alias{with_graphopt} +\alias{with_kk} +\alias{with_lgl} +\alias{with_mds} +\alias{with_sugiyama} +\alias{with_drl} +\title{Layout specifications for \code{add_layout_()}} +\usage{ +as_bipartite(...) + +as_star(...) + +as_tree(...) + +in_circle(...) + +nicely(...) + +on_grid(...) + +on_sphere(...) + +randomly(...) + +with_dh(...) + +with_fr(...) + +with_gem(...) + +with_graphopt(...) + +with_kk(...) + +with_lgl(...) + +with_mds(...) + +with_sugiyama(...) + +with_drl(...) +} +\arguments{ +\item{...}{Forwarded to the corresponding \verb{layout_*()} function.} +} +\value{ +An object of class \code{igraph_layout_spec}. +} +\description{ +Each of these functions builds a lazy layout specification for the given +layout function, to be used with \code{\link[=add_layout_]{add_layout_()}}. The specification is +only evaluated when the layout is actually computed, so it can be combined +with layout modifiers such as \code{\link[=component_wise]{component_wise()}} or \code{\link[=normalize]{normalize()}}. + +\code{as_bipartite()}, \code{as_star()} and \code{as_tree()} wrap \code{\link[=layout_as_bipartite]{layout_as_bipartite()}}, +\code{\link[=layout_as_star]{layout_as_star()}} and \code{\link[=layout_as_tree]{layout_as_tree()}} respectively. \code{in_circle()}, +\code{nicely()}, \code{on_grid()}, \code{on_sphere()} and \code{randomly()} wrap +\code{\link[=layout_in_circle]{layout_in_circle()}}, \code{\link[=layout_nicely]{layout_nicely()}}, \code{\link[=layout_on_grid]{layout_on_grid()}}, +\code{\link[=layout_on_sphere]{layout_on_sphere()}} and \code{\link[=layout_randomly]{layout_randomly()}}. \code{with_dh()}, \code{with_fr()}, +\code{with_gem()}, \code{with_graphopt()}, \code{with_kk()}, \code{with_lgl()}, \code{with_mds()}, +\code{with_sugiyama()} and \code{with_drl()} wrap \code{\link[=layout_with_dh]{layout_with_dh()}}, +\code{\link[=layout_with_fr]{layout_with_fr()}}, \code{\link[=layout_with_gem]{layout_with_gem()}}, \code{\link[=layout_with_graphopt]{layout_with_graphopt()}}, +\code{\link[=layout_with_kk]{layout_with_kk()}}, \code{\link[=layout_with_lgl]{layout_with_lgl()}}, \code{\link[=layout_with_mds]{layout_with_mds()}}, +\code{\link[=layout_with_sugiyama]{layout_with_sugiyama()}} and \code{\link[=layout_with_drl]{layout_with_drl()}}. +} +\seealso{ +\code{\link[=add_layout_]{add_layout_()}} to apply a layout specification to a graph. + +Other graph layouts: +\code{\link[=add_layout_]{add_layout_()}}, +\code{\link[=component_wise]{component_wise()}}, +\code{\link[=layout_]{layout_()}}, +\code{\link[=layout_as_bipartite]{layout_as_bipartite()}}, +\code{\link[=layout_as_star]{layout_as_star()}}, +\code{\link[=layout_as_tree]{layout_as_tree()}}, +\code{\link[=layout_in_circle]{layout_in_circle()}}, +\code{\link[=layout_nicely]{layout_nicely()}}, +\code{\link[=layout_on_grid]{layout_on_grid()}}, +\code{\link[=layout_on_sphere]{layout_on_sphere()}}, +\code{\link[=layout_randomly]{layout_randomly()}}, +\code{\link[=layout_with_dh]{layout_with_dh()}}, +\code{\link[=layout_with_fr]{layout_with_fr()}}, +\code{\link[=layout_with_gem]{layout_with_gem()}}, +\code{\link[=layout_with_graphopt]{layout_with_graphopt()}}, +\code{\link[=layout_with_kk]{layout_with_kk()}}, +\code{\link[=layout_with_lgl]{layout_with_lgl()}}, +\code{\link[=layout_with_mds]{layout_with_mds()}}, +\code{\link[=layout_with_sugiyama]{layout_with_sugiyama()}}, +\code{\link[=merge_coords]{merge_coords()}}, +\code{\link[=norm_coords]{norm_coords()}}, +\code{\link[=normalize]{normalize()}} +} +\concept{graph layouts} +\keyword{graphs} diff --git a/man/layout_with_dh.Rd b/man/layout_with_dh.Rd index 107e5021668..1e646c677ab 100644 --- a/man/layout_with_dh.Rd +++ b/man/layout_with_dh.Rd @@ -2,7 +2,6 @@ % Please edit documentation in R/layout.R \name{layout_with_dh} \alias{layout_with_dh} -\alias{with_dh} \title{The Davidson-Harel layout algorithm} \usage{ layout_with_dh( @@ -18,13 +17,11 @@ layout_with_dh( weight.edge.crossings = NULL, weight.node.edge.dist = NULL ) - -with_dh(...) } \arguments{ \item{graph}{The graph to lay out. Edge directions are ignored.} -\item{...}{Passed to \code{layout_with_dh()}.} +\item{...}{These dots are for future extensions and must be empty.} \item{coords}{Optional starting positions for the vertices. If this argument is not \code{NULL} then it should be an appropriate matrix of starting @@ -153,10 +150,12 @@ Annealing. \emph{ACM Transactions on Graphics} 15(4), pp. 301-331, 1996. } \seealso{ \code{\link[=layout_with_fr]{layout_with_fr()}}, -\code{\link[=layout_with_kk]{layout_with_kk()}} for other layout algorithms. +\code{\link[=layout_with_kk]{layout_with_kk()}} for other layout algorithms. See \code{\link[=with_dh]{with_dh()}} to build a +lazy layout specification for \code{\link[=add_layout_]{add_layout_()}}. Other graph layouts: \code{\link[=add_layout_]{add_layout_()}}, +\code{\link[=as_bipartite]{as_bipartite()}}, \code{\link[=component_wise]{component_wise()}}, \code{\link[=layout_]{layout_()}}, \code{\link[=layout_as_bipartite]{layout_as_bipartite()}}, diff --git a/man/layout_with_drl.Rd b/man/layout_with_drl.Rd index e7441d81fa8..4bac53d7f2c 100644 --- a/man/layout_with_drl.Rd +++ b/man/layout_with_drl.Rd @@ -8,7 +8,6 @@ \alias{igraph.drl.default} \alias{igraph.drl.final} \alias{igraph.drl.refine} -\alias{with_drl} \title{The DrL graph layout generator} \usage{ layout_with_drl( @@ -20,13 +19,11 @@ layout_with_drl( weights = NULL, dim = c(2, 3) ) - -with_drl(...) } \arguments{ \item{graph}{The input graph, in can be directed or undirected.} -\item{...}{Passed to \code{layout_with_drl()}.} +\item{...}{These dots are for future extensions and must be empty.} \item{use.seed}{Logical, whether to use the coordinates given in the \code{seed} argument as a starting point.} @@ -163,7 +160,8 @@ Klavans, R., Boyack, K.W., DrL: Distributed Recursive (Graph) Layout. SAND Reports, 2008. 2936: p. 1-10. } \seealso{ -\code{\link[=layout]{layout()}} for other layout generators. +\code{\link[=layout]{layout()}} for other layout generators. See \code{\link[=with_drl]{with_drl()}} to +build a lazy layout specification for \code{\link[=add_layout_]{add_layout_()}}. } \author{ Shawn Martin (\url{https://www.cs.otago.ac.nz/homepages/smartin/}) diff --git a/man/layout_with_fr.Rd b/man/layout_with_fr.Rd index 90f32995dcd..c1d140f1714 100644 --- a/man/layout_with_fr.Rd +++ b/man/layout_with_fr.Rd @@ -2,7 +2,6 @@ % Please edit documentation in R/layout.R \name{layout_with_fr} \alias{layout_with_fr} -\alias{with_fr} \title{The Fruchterman-Reingold layout algorithm} \usage{ layout_with_fr( @@ -26,13 +25,11 @@ layout_with_fr( repulserad = deprecated(), maxiter = deprecated() ) - -with_fr(...) } \arguments{ \item{graph}{The graph to lay out. Edge directions are ignored.} -\item{...}{Passed to \code{layout_with_fr()}.} +\item{...}{These dots are for future extensions and must be empty.} \item{coords}{Optional starting positions for the vertices. If this argument is not \code{NULL} then it should be an appropriate matrix of starting @@ -131,10 +128,12 @@ Force-directed Placement. \emph{Software - Practice and Experience}, } \seealso{ \code{\link[=layout_with_drl]{layout_with_drl()}}, \code{\link[=layout_with_kk]{layout_with_kk()}} for -other layout algorithms. +other layout algorithms. See \code{\link[=with_fr]{with_fr()}} to build a lazy layout +specification for \code{\link[=add_layout_]{add_layout_()}}. Other graph layouts: \code{\link[=add_layout_]{add_layout_()}}, +\code{\link[=as_bipartite]{as_bipartite()}}, \code{\link[=component_wise]{component_wise()}}, \code{\link[=layout_]{layout_()}}, \code{\link[=layout_as_bipartite]{layout_as_bipartite()}}, diff --git a/man/layout_with_gem.Rd b/man/layout_with_gem.Rd index d0d906cc43a..f772388cd37 100644 --- a/man/layout_with_gem.Rd +++ b/man/layout_with_gem.Rd @@ -2,7 +2,6 @@ % Please edit documentation in R/layout.R \name{layout_with_gem} \alias{layout_with_gem} -\alias{with_gem} \title{The GEM layout algorithm} \usage{ layout_with_gem( @@ -14,13 +13,11 @@ layout_with_gem( temp.min = 0.1, temp.init = NULL ) - -with_gem(...) } \arguments{ \item{graph}{The input graph. Edge directions are ignored.} -\item{...}{Passed to \code{layout_with_gem()}.} +\item{...}{These dots are for future extensions and must be empty.} \item{coords}{Starting coordinates in a two or three column matrix, depending on the \code{dim} argument. @@ -69,10 +66,12 @@ LNCS 894, pp. 388-403, 1995. } \seealso{ \code{\link[=layout_with_fr]{layout_with_fr()}}, -\code{\link[=plot.igraph]{plot.igraph()}}, \code{\link[=tkplot]{tkplot()}} +\code{\link[=plot.igraph]{plot.igraph()}}, \code{\link[=tkplot]{tkplot()}}. See \code{\link[=with_gem]{with_gem()}} to build a lazy layout +specification for \code{\link[=add_layout_]{add_layout_()}}. Other graph layouts: \code{\link[=add_layout_]{add_layout_()}}, +\code{\link[=as_bipartite]{as_bipartite()}}, \code{\link[=component_wise]{component_wise()}}, \code{\link[=layout_]{layout_()}}, \code{\link[=layout_as_bipartite]{layout_as_bipartite()}}, diff --git a/man/layout_with_graphopt.Rd b/man/layout_with_graphopt.Rd index 5cdd3fb3632..063406536b1 100644 --- a/man/layout_with_graphopt.Rd +++ b/man/layout_with_graphopt.Rd @@ -2,7 +2,6 @@ % Please edit documentation in R/layout.R \name{layout_with_graphopt} \alias{layout_with_graphopt} -\alias{with_graphopt} \title{The graphopt layout algorithm} \usage{ layout_with_graphopt( @@ -16,13 +15,11 @@ layout_with_graphopt( spring.constant = 1, max.sa.movement = 5 ) - -with_graphopt(...) } \arguments{ \item{graph}{The input graph.} -\item{...}{Passed to \code{layout_with_graphopt()}.} +\item{...}{These dots are for future extensions and must be empty.} \item{start}{If given, then it should be a matrix with two columns and one line for each vertex. This matrix will be used as starting positions for the @@ -68,8 +65,12 @@ reaches an equilibrium. (There is no simulated annealing or anything like that, so a stable fixed point is not guaranteed.) } \seealso{ +\code{\link[=with_graphopt]{with_graphopt()}} to build a lazy layout specification for +\code{\link[=add_layout_]{add_layout_()}}. + Other graph layouts: \code{\link[=add_layout_]{add_layout_()}}, +\code{\link[=as_bipartite]{as_bipartite()}}, \code{\link[=component_wise]{component_wise()}}, \code{\link[=layout_]{layout_()}}, \code{\link[=layout_as_bipartite]{layout_as_bipartite()}}, diff --git a/man/layout_with_kk.Rd b/man/layout_with_kk.Rd index 7d9d6dfda7b..7465c189b61 100644 --- a/man/layout_with_kk.Rd +++ b/man/layout_with_kk.Rd @@ -2,7 +2,6 @@ % Please edit documentation in R/layout.R \name{layout_with_kk} \alias{layout_with_kk} -\alias{with_kk} \title{The Kamada-Kawai layout algorithm} \usage{ layout_with_kk( @@ -26,13 +25,11 @@ layout_with_kk( coolexp = deprecated(), start = deprecated() ) - -with_kk(...) } \arguments{ \item{graph}{The input graph. Edge directions are ignored.} -\item{...}{Passed to \code{layout_with_kk()}.} +\item{...}{These dots are for future extensions and must be empty.} \item{coords}{Starting coordinates in a two or three column matrix, depending on the \code{dim} argument. @@ -114,10 +111,12 @@ Undirected Graphs. \emph{Information Processing Letters}, 31/1, 7--15, 1989. } \seealso{ \code{\link[=layout_with_drl]{layout_with_drl()}}, \code{\link[=plot.igraph]{plot.igraph()}}, -\code{\link[=tkplot]{tkplot()}} +\code{\link[=tkplot]{tkplot()}}. See \code{\link[=with_kk]{with_kk()}} to build a lazy layout specification for +\code{\link[=add_layout_]{add_layout_()}}. Other graph layouts: \code{\link[=add_layout_]{add_layout_()}}, +\code{\link[=as_bipartite]{as_bipartite()}}, \code{\link[=component_wise]{component_wise()}}, \code{\link[=layout_]{layout_()}}, \code{\link[=layout_as_bipartite]{layout_as_bipartite()}}, diff --git a/man/layout_with_lgl.Rd b/man/layout_with_lgl.Rd index ee5fa9bfd3a..790fa1a86c8 100644 --- a/man/layout_with_lgl.Rd +++ b/man/layout_with_lgl.Rd @@ -2,7 +2,6 @@ % Please edit documentation in R/layout.R \name{layout_with_lgl} \alias{layout_with_lgl} -\alias{with_lgl} \title{Large Graph Layout} \usage{ layout_with_lgl( @@ -16,13 +15,11 @@ layout_with_lgl( cellsize = NULL, root = NULL ) - -with_lgl(...) } \arguments{ \item{graph}{The input graph} -\item{...}{Passed to \code{layout_with_lgl()}.} +\item{...}{These dots are for future extensions and must be empty.} \item{maxiter}{The maximum number of iterations to perform (150).} @@ -61,8 +58,12 @@ generator of the Large Graph Layout software } \seealso{ +\code{\link[=with_lgl]{with_lgl()}} to build a lazy layout specification for +\code{\link[=add_layout_]{add_layout_()}}. + Other graph layouts: \code{\link[=add_layout_]{add_layout_()}}, +\code{\link[=as_bipartite]{as_bipartite()}}, \code{\link[=component_wise]{component_wise()}}, \code{\link[=layout_]{layout_()}}, \code{\link[=layout_as_bipartite]{layout_as_bipartite()}}, diff --git a/man/layout_with_mds.Rd b/man/layout_with_mds.Rd index 480d0c035f1..d663612bf4f 100644 --- a/man/layout_with_mds.Rd +++ b/man/layout_with_mds.Rd @@ -2,12 +2,9 @@ % Please edit documentation in R/layout.R \name{layout_with_mds} \alias{layout_with_mds} -\alias{with_mds} \title{Graph layout by multidimensional scaling} \usage{ layout_with_mds(graph, dist = NULL, dim = 2, options = arpack_defaults()) - -with_mds(...) } \arguments{ \item{graph}{The input graph.} @@ -22,8 +19,6 @@ only possible value is 2. This is because \code{merge_coords()} only works in \item{options}{This is currently ignored, as ARPACK is not used any more for solving the eigenproblem} - -\item{...}{Passed to \code{layout_with_mds()}.} } \value{ A numeric matrix with \code{dim} columns. @@ -63,10 +58,12 @@ Cox, T. F. and Cox, M. A. A. (2001) \emph{Multidimensional Scaling}. Second edition. Chapman and Hall. } \seealso{ -\code{\link[=layout]{layout()}}, \code{\link[=plot.igraph]{plot.igraph()}} +\code{\link[=layout]{layout()}}, \code{\link[=plot.igraph]{plot.igraph()}}. See \code{\link[=with_mds]{with_mds()}} to build a lazy +layout specification for \code{\link[=add_layout_]{add_layout_()}}. Other graph layouts: \code{\link[=add_layout_]{add_layout_()}}, +\code{\link[=as_bipartite]{as_bipartite()}}, \code{\link[=component_wise]{component_wise()}}, \code{\link[=layout_]{layout_()}}, \code{\link[=layout_as_bipartite]{layout_as_bipartite()}}, diff --git a/man/layout_with_sugiyama.Rd b/man/layout_with_sugiyama.Rd index 1ee793d60d7..5def900b3a9 100644 --- a/man/layout_with_sugiyama.Rd +++ b/man/layout_with_sugiyama.Rd @@ -2,7 +2,6 @@ % Please edit documentation in R/layout.R \name{layout_with_sugiyama} \alias{layout_with_sugiyama} -\alias{with_sugiyama} \title{The Sugiyama graph layout generator} \usage{ layout_with_sugiyama( @@ -15,13 +14,11 @@ layout_with_sugiyama( weights = NULL, attributes = c("default", "all", "none") ) - -with_sugiyama(...) } \arguments{ \item{graph}{The input graph.} -\item{...}{Passed to \code{layout_with_sugiyama()}.} +\item{...}{These dots are for future extensions and must be empty.} \item{layers}{A numeric vector of the layer indices of the vertices. Layers are numbered from one. @@ -243,8 +240,12 @@ Understanding of Hierarchical Systems". IEEE Transactions on Systems, Man and Cybernetics 11(2):109-125, 1981. } \seealso{ +\code{\link[=with_sugiyama]{with_sugiyama()}} to build a lazy layout specification for +\code{\link[=add_layout_]{add_layout_()}}. + Other graph layouts: \code{\link[=add_layout_]{add_layout_()}}, +\code{\link[=as_bipartite]{as_bipartite()}}, \code{\link[=component_wise]{component_wise()}}, \code{\link[=layout_]{layout_()}}, \code{\link[=layout_as_bipartite]{layout_as_bipartite()}}, diff --git a/man/make_.Rd b/man/make_.Rd index f7f087f8ebb..c0003461e70 100644 --- a/man/make_.Rd +++ b/man/make_.Rd @@ -47,6 +47,7 @@ is_simple(ran) } \seealso{ Other deterministic constructors: +\code{\link[=from_data_frame]{from_data_frame()}}, \code{\link[=graph_from_atlas]{graph_from_atlas()}}, \code{\link[=graph_from_edgelist]{graph_from_edgelist()}}, \code{\link[=graph_from_literal]{graph_from_literal()}}, diff --git a/man/make_chordal_ring.Rd b/man/make_chordal_ring.Rd index 6a94ce5c8de..8327e5ca510 100644 --- a/man/make_chordal_ring.Rd +++ b/man/make_chordal_ring.Rd @@ -47,6 +47,7 @@ chord <- make_chordal_ring( } \seealso{ Other deterministic constructors: +\code{\link[=from_data_frame]{from_data_frame()}}, \code{\link[=graph_from_atlas]{graph_from_atlas()}}, \code{\link[=graph_from_edgelist]{graph_from_edgelist()}}, \code{\link[=graph_from_literal]{graph_from_literal()}}, diff --git a/man/make_circulant.Rd b/man/make_circulant.Rd index c67ad5e4543..df56643ae30 100644 --- a/man/make_circulant.Rd +++ b/man/make_circulant.Rd @@ -45,6 +45,7 @@ plot(g2, layout = layout_in_circle) } \seealso{ Other deterministic constructors: +\code{\link[=from_data_frame]{from_data_frame()}}, \code{\link[=graph_from_atlas]{graph_from_atlas()}}, \code{\link[=graph_from_edgelist]{graph_from_edgelist()}}, \code{\link[=graph_from_literal]{graph_from_literal()}}, diff --git a/man/make_empty_graph.Rd b/man/make_empty_graph.Rd index 02289cbd11d..fbad7f26454 100644 --- a/man/make_empty_graph.Rd +++ b/man/make_empty_graph.Rd @@ -32,6 +32,7 @@ make_empty_graph(n = 5, directed = FALSE) } \seealso{ Other deterministic constructors: +\code{\link[=from_data_frame]{from_data_frame()}}, \code{\link[=graph_from_atlas]{graph_from_atlas()}}, \code{\link[=graph_from_edgelist]{graph_from_edgelist()}}, \code{\link[=graph_from_literal]{graph_from_literal()}}, diff --git a/man/make_full_citation_graph.Rd b/man/make_full_citation_graph.Rd index 76b86a7488e..5b93aacb51c 100644 --- a/man/make_full_citation_graph.Rd +++ b/man/make_full_citation_graph.Rd @@ -33,6 +33,7 @@ print_all(make_full_citation_graph(10)) } \seealso{ Other deterministic constructors: +\code{\link[=from_data_frame]{from_data_frame()}}, \code{\link[=graph_from_atlas]{graph_from_atlas()}}, \code{\link[=graph_from_edgelist]{graph_from_edgelist()}}, \code{\link[=graph_from_literal]{graph_from_literal()}}, diff --git a/man/make_full_graph.Rd b/man/make_full_graph.Rd index 1bbbb9af785..91f70640a5e 100644 --- a/man/make_full_graph.Rd +++ b/man/make_full_graph.Rd @@ -34,6 +34,7 @@ print_all(make_full_graph(4, directed = TRUE)) } \seealso{ Other deterministic constructors: +\code{\link[=from_data_frame]{from_data_frame()}}, \code{\link[=graph_from_atlas]{graph_from_atlas()}}, \code{\link[=graph_from_edgelist]{graph_from_edgelist()}}, \code{\link[=graph_from_literal]{graph_from_literal()}}, diff --git a/man/make_full_multipartite.Rd b/man/make_full_multipartite.Rd index 6973c62b293..d20ce6ee5a2 100644 --- a/man/make_full_multipartite.Rd +++ b/man/make_full_multipartite.Rd @@ -47,6 +47,7 @@ plot(g2) } \seealso{ Other deterministic constructors: +\code{\link[=from_data_frame]{from_data_frame()}}, \code{\link[=graph_from_atlas]{graph_from_atlas()}}, \code{\link[=graph_from_edgelist]{graph_from_edgelist()}}, \code{\link[=graph_from_literal]{graph_from_literal()}}, diff --git a/man/make_graph.Rd b/man/make_graph.Rd index 2d3149a0f31..6f10fc934a5 100644 --- a/man/make_graph.Rd +++ b/man/make_graph.Rd @@ -244,6 +244,7 @@ graph <- make_graph( } \seealso{ Other deterministic constructors: +\code{\link[=from_data_frame]{from_data_frame()}}, \code{\link[=graph_from_atlas]{graph_from_atlas()}}, \code{\link[=graph_from_edgelist]{graph_from_edgelist()}}, \code{\link[=graph_from_literal]{graph_from_literal()}}, diff --git a/man/make_lattice.Rd b/man/make_lattice.Rd index 042ec5a6757..13ebde895bf 100644 --- a/man/make_lattice.Rd +++ b/man/make_lattice.Rd @@ -70,6 +70,7 @@ make_lattice(length = 5, dim = 3) } \seealso{ Other deterministic constructors: +\code{\link[=from_data_frame]{from_data_frame()}}, \code{\link[=graph_from_atlas]{graph_from_atlas()}}, \code{\link[=graph_from_edgelist]{graph_from_edgelist()}}, \code{\link[=graph_from_literal]{graph_from_literal()}}, diff --git a/man/make_ring.Rd b/man/make_ring.Rd index 7e2d87f5054..b58dd637f74 100644 --- a/man/make_ring.Rd +++ b/man/make_ring.Rd @@ -40,6 +40,7 @@ print_all(make_ring(10, directed = TRUE, mutual = TRUE)) } \seealso{ Other deterministic constructors: +\code{\link[=from_data_frame]{from_data_frame()}}, \code{\link[=graph_from_atlas]{graph_from_atlas()}}, \code{\link[=graph_from_edgelist]{graph_from_edgelist()}}, \code{\link[=graph_from_literal]{graph_from_literal()}}, diff --git a/man/make_star.Rd b/man/make_star.Rd index 059ee69bd5e..4a744cda116 100644 --- a/man/make_star.Rd +++ b/man/make_star.Rd @@ -39,6 +39,7 @@ make_star(5, mode = "undirected") } \seealso{ Other deterministic constructors: +\code{\link[=from_data_frame]{from_data_frame()}}, \code{\link[=graph_from_atlas]{graph_from_atlas()}}, \code{\link[=graph_from_edgelist]{graph_from_edgelist()}}, \code{\link[=graph_from_literal]{graph_from_literal()}}, diff --git a/man/make_tree.Rd b/man/make_tree.Rd index 180c70e9e52..6e57fec5594 100644 --- a/man/make_tree.Rd +++ b/man/make_tree.Rd @@ -2,12 +2,9 @@ % Please edit documentation in R/make.R \name{make_tree} \alias{make_tree} -\alias{tree} \title{Create tree graphs} \usage{ make_tree(n, children = 2, ..., mode = c("out", "in", "undirected")) - -tree(...) } \arguments{ \item{n}{Number of vertices.} @@ -15,7 +12,7 @@ tree(...) \item{children}{Integer scalar, the number of children of a vertex (except for leafs)} -\item{...}{Passed to \code{make_tree()} or \code{sample_tree()}.} +\item{...}{These dots are for future extensions and must be empty.} \item{mode}{Defines the direction of the edges. \code{out} indicates that the edges point from the parent to @@ -39,7 +36,11 @@ make_tree(10, 2) make_tree(10, 3, mode = "undirected") } \seealso{ +\code{\link[=tree]{tree()}} to build a lazy constructor specification for +\code{\link[=make_]{make_()}} or \code{\link[=sample_]{sample_()}}. + Other deterministic constructors: +\code{\link[=from_data_frame]{from_data_frame()}}, \code{\link[=graph_from_atlas]{graph_from_atlas()}}, \code{\link[=graph_from_edgelist]{graph_from_edgelist()}}, \code{\link[=graph_from_literal]{graph_from_literal()}}, diff --git a/man/make_turan.Rd b/man/make_turan.Rd index 4d1418d15a5..e9c36e580d2 100644 --- a/man/make_turan.Rd +++ b/man/make_turan.Rd @@ -44,6 +44,7 @@ table(V(g)$type) } \seealso{ Other deterministic constructors: +\code{\link[=from_data_frame]{from_data_frame()}}, \code{\link[=graph_from_atlas]{graph_from_atlas()}}, \code{\link[=graph_from_edgelist]{graph_from_edgelist()}}, \code{\link[=graph_from_literal]{graph_from_literal()}}, diff --git a/man/make_wheel.Rd b/man/make_wheel.Rd index 2f5cbfb3020..0df85d491a6 100644 --- a/man/make_wheel.Rd +++ b/man/make_wheel.Rd @@ -48,6 +48,7 @@ make_wheel(5, mode = "undirected") } \seealso{ Other deterministic constructors: +\code{\link[=from_data_frame]{from_data_frame()}}, \code{\link[=graph_from_atlas]{graph_from_atlas()}}, \code{\link[=graph_from_edgelist]{graph_from_edgelist()}}, \code{\link[=graph_from_literal]{graph_from_literal()}}, diff --git a/man/merge_coords.Rd b/man/merge_coords.Rd index 593289a8cc3..37d78faa984 100644 --- a/man/merge_coords.Rd +++ b/man/merge_coords.Rd @@ -73,6 +73,7 @@ plot(g, layout = lay, vertex.size = 3, labels = NA, edge.color = "black") Other graph layouts: \code{\link[=add_layout_]{add_layout_()}}, +\code{\link[=as_bipartite]{as_bipartite()}}, \code{\link[=component_wise]{component_wise()}}, \code{\link[=layout_]{layout_()}}, \code{\link[=layout_as_bipartite]{layout_as_bipartite()}}, diff --git a/man/modularity.igraph.Rd b/man/modularity.igraph.Rd index 9f2dec87fb2..5684ea9f65a 100644 --- a/man/modularity.igraph.Rd +++ b/man/modularity.igraph.Rd @@ -31,7 +31,9 @@ vector of the community structure.} \item{directed}{Whether to use the directed or undirected version of modularity. Ignored for undirected graphs.} -\item{\dots}{Additional arguments, none currently.} +\item{\dots}{For \code{modularity_matrix()}, these dots must be empty. For +\code{modularity()}, unused, present for S3 method consistency but may be +used by other methods that implement it.} } \value{ For \code{modularity()} a numeric scalar, the modularity score of the diff --git a/man/norm_coords.Rd b/man/norm_coords.Rd index 7938c1efa58..fb1f9a3dd75 100644 --- a/man/norm_coords.Rd +++ b/man/norm_coords.Rd @@ -43,6 +43,7 @@ coordinate separately to fit into the given limits. \seealso{ Other graph layouts: \code{\link[=add_layout_]{add_layout_()}}, +\code{\link[=as_bipartite]{as_bipartite()}}, \code{\link[=component_wise]{component_wise()}}, \code{\link[=layout_]{layout_()}}, \code{\link[=layout_as_bipartite]{layout_as_bipartite()}}, diff --git a/man/normalize.Rd b/man/normalize.Rd index c45f3047caf..e1ebd6a52da 100644 --- a/man/normalize.Rd +++ b/man/normalize.Rd @@ -39,6 +39,7 @@ Other layout modifiers: Other graph layouts: \code{\link[=add_layout_]{add_layout_()}}, +\code{\link[=as_bipartite]{as_bipartite()}}, \code{\link[=component_wise]{component_wise()}}, \code{\link[=layout_]{layout_()}}, \code{\link[=layout_as_bipartite]{layout_as_bipartite()}}, diff --git a/man/plotHierarchy.Rd b/man/plotHierarchy.Rd index 81fb79b0685..e3318d8ad20 100644 --- a/man/plotHierarchy.Rd +++ b/man/plotHierarchy.Rd @@ -16,7 +16,9 @@ plotHierarchy( the Reingold-Tilford layout generator.} \item{...}{Additional arguments. \code{plot_hierarchy()} and \code{\link[=plot]{plot()}} pass -them to \code{plot.igraph()}. \code{\link[=print]{print()}} and \code{\link[=summary]{summary()}} ignore them.} +them to \code{plot.igraph()}. \code{\link[=print]{print()}} and \code{\link[=summary]{summary()}} ignore them. +\code{cohesive_blocks()} and \code{export_pajek()} do not accept extra arguments; +these dots must be empty for them.} } \description{ \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} diff --git a/man/sample_degseq.Rd b/man/sample_degseq.Rd index 990585ade63..6f58a0e040d 100644 --- a/man/sample_degseq.Rd +++ b/man/sample_degseq.Rd @@ -2,7 +2,6 @@ % Please edit documentation in R/games.R \name{sample_degseq} \alias{sample_degseq} -\alias{degseq} \title{Generate random graphs with a given degree sequence} \usage{ sample_degseq( @@ -12,8 +11,6 @@ sample_degseq( method = c("configuration", "vl", "fast.heur.simple", "configuration.simple", "edge.switching.simple") ) - -degseq(..., deterministic = FALSE) } \arguments{ \item{out.deg}{Numeric vector, the sequence of degrees (for undirected @@ -24,12 +21,9 @@ should be even. For directed graphs its sum should be the same as the sum of \item{in.deg}{For directed graph, the in-degree sequence. By default this is \code{NULL} and an undirected graph is created.} -\item{...}{Passed to \code{realize_degseq()} if \sQuote{deterministic} is true, -or to \code{sample_degseq()} otherwise.} +\item{...}{These dots are for future extensions and must be empty.} \item{method}{Character, the method for generating the graph. See Details.} - -\item{deterministic}{Whether the construction should be deterministic} } \value{ The new graph object. @@ -197,7 +191,8 @@ all(degree(powerlaw_vl_graph) == powerlaw_degrees) } \seealso{ \code{\link[=simplify]{simplify()}} to get rid of the multiple and/or loops edges, -\code{\link[=realize_degseq]{realize_degseq()}} for a deterministic variant. +\code{\link[=realize_degseq]{realize_degseq()}} for a deterministic variant. See \code{\link[=degseq]{degseq()}} to build a +lazy constructor specification for \code{\link[=make_]{make_()}} or \code{\link[=sample_]{sample_()}}. Random graph models (games): \code{\link[=bipartite_gnm]{bipartite_gnm()}}, diff --git a/man/sir.Rd b/man/sir.Rd index 50cb9cc3f58..f01107a3f76 100644 --- a/man/sir.Rd +++ b/man/sir.Rd @@ -21,7 +21,9 @@ sir(graph, beta, gamma, ..., no.sim = 100) \arguments{ \item{x}{A \code{sir} object, returned by the \code{sir()} function.} -\item{\dots}{Additional arguments, ignored currently.} +\item{\dots}{For \code{sir()} and \code{time_bins()}, these dots must be empty. For +\code{median.sir()} and \code{quantile.sir()}, unused, present for S3 method +consistency.} \item{middle}{Logical, whether to return the middle of the time bins, or the boundaries.} diff --git a/man/tkplot.Rd b/man/tkplot.Rd index f601f105f74..a7f79ec88ad 100644 --- a/man/tkplot.Rd +++ b/man/tkplot.Rd @@ -41,8 +41,9 @@ tk_canvas(tkp.id) \item{canvas.width, canvas.height}{The size of the tkplot drawing area.} -\item{\dots}{Additional plotting parameters. See \link{igraph.plotting} for -the complete list.} +\item{\dots}{For \code{tkplot()}, additional plotting parameters, see +\link{igraph.plotting} for the complete list. For \code{tk_close()}, \code{tk_fit()}, +\code{tk_coords()} and \code{tk_rotate()}, these dots must be empty.} \item{tkp.id}{The ID of the tkplot window to close/reshape/etc.} diff --git a/man/tkplot.reshape.Rd b/man/tkplot.reshape.Rd index 862268ffc48..564dd470eb2 100644 --- a/man/tkplot.reshape.Rd +++ b/man/tkplot.reshape.Rd @@ -11,8 +11,9 @@ tkplot.reshape(tkp.id, newlayout, ..., params) \item{newlayout}{The new layout, see the \code{layout} parameter of tkplot.} -\item{...}{Additional plotting parameters. See \link{igraph.plotting} for -the complete list.} +\item{...}{For \code{tkplot()}, additional plotting parameters, see +\link{igraph.plotting} for the complete list. For \code{tk_close()}, \code{tk_fit()}, +\code{tk_coords()} and \code{tk_rotate()}, these dots must be empty.} \item{params}{Extra parameters in a list, to pass to the layout function.} } diff --git a/man/vertex_connectivity.Rd b/man/vertex_connectivity.Rd index e6afe4da668..08451ddbf76 100644 --- a/man/vertex_connectivity.Rd +++ b/man/vertex_connectivity.Rd @@ -22,8 +22,9 @@ can be \code{NULL}, see details below.} \item{target}{The ID of the target vertex, for \code{vertex_connectivity()} it can be \code{NULL}, see details below.} -\item{...}{Additional arguments passed to methods. Not used by \code{vertex_connectivity()} -directly but may be used by other methods that implement \code{cohesion()}.} +\item{\dots}{For \code{vertex_connectivity()}, these dots must be empty. For +\code{cohesion()}, unused, present for S3 method consistency but may be used +by other methods that implement it.} \item{checks}{Logical. Whether to check that the graph is connected and also the degree of the vertices. If the graph is not (strongly) diff --git a/man/with_igraph_opt.Rd b/man/with_igraph_opt.Rd index 95b3c075153..3625ca611aa 100644 --- a/man/with_igraph_opt.Rd +++ b/man/with_igraph_opt.Rd @@ -26,6 +26,7 @@ igraph_opt("sparsematrices") } \seealso{ Other igraph options: +\code{\link[=igraph_opt]{igraph_opt()}}, \code{\link[=igraph_options]{igraph_options()}} } \concept{igraph options}