From cb1d20824b6116a8e25a39328c5305620a3f4675 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kirill=20M=C3=BCller?= Date: Sun, 13 Sep 2026 18:19:03 +0000 Subject: [PATCH 1/3] ci: Document with a patched roxygen2 that keeps the sentence gap commonmark discards the whitespace a line break stands for, so roxygen prose written one sentence per line loses the gap between sentences in the rendered help. Only the text renderer is affected, which is what `?topic` shows. A new composite action installs roxygen2 from upstream with the R/ part of krlmlr/roxygen2@f-sentence-spacing applied on top, and runs just before the Roxygenize step. It shallow-clones upstream, fetches the branch, applies the diff restricted to R/ so conflicts in the test files cannot fail it, and aborts rather than silently installing an unpatched build. It then asserts that what it installed really carries the patch. Config/roxygen2/version becomes 8.1.0.9100. The .9100 suffix distinguishes a patched build from upstream's own .9000 development builds; if upstream moves, the x.y.z part follows it and the suffix stays. DESCRIPTION is DCF and cannot carry a comment, so the explanation lives in a Config/cynkra/roxygen2 field. This is a separate decision from the line-break reformatting below it, and is kept in its own pull request so it can be taken or left on its own. Without it, the reformatting simply renders as it does today, with one space between sentences. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01WWhverMTZZKgEpUuTK117m --- .github/workflows/R-CMD-check.yaml | 3 + .github/workflows/roxygen2-fork/action.yml | 105 +++++++++++++++++++++ DESCRIPTION | 9 +- 3 files changed, 116 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/roxygen2-fork/action.yml diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index b45308a8b4d..d1b889de704 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -173,6 +173,9 @@ jobs: with: base: ${{ inputs.ref || github.head_ref }} + - name: Install roxygen2 from the fork branch + uses: ./.github/workflows/roxygen2-fork + - name: Roxygenize the documentation id: roxygenize continue-on-error: true diff --git a/.github/workflows/roxygen2-fork/action.yml b/.github/workflows/roxygen2-fork/action.yml new file mode 100644 index 00000000000..e020c6e76d1 --- /dev/null +++ b/.github/workflows/roxygen2-fork/action.yml @@ -0,0 +1,105 @@ +name: "Action to install roxygen2 from a fork branch" +description: > + This action installs roxygen2 with only the `R/` part of a fork branch applied + on top of upstream, and stamps the result as a `.9100` build so that a + package's `Config/roxygen2/version` says which roxygen2 documented it. + +inputs: + upstream: + description: "Repository to install, in owner/repo form" + required: false + default: "r-lib/roxygen2" + fork: + description: "Repository holding the branch to apply, in owner/repo form" + required: false + default: "krlmlr/roxygen2" + branch: + description: "Branch whose `R/` changes are applied on top of upstream" + required: false + default: "f-sentence-spacing" + +runs: + using: "composite" + steps: + - name: Install roxygen2 with the fork's R changes + run: | + ## -- Install roxygen2 from a fork branch -- + set -euo pipefail + + upstream="${{ inputs.upstream }}" + fork="${{ inputs.fork }}" + branch="${{ inputs.branch }}" + + workdir="$(mktemp -d)" + trap 'rm -rf "$workdir"' EXIT + + # Upstream at its tip: this is the code that gets installed, so the + # build tracks upstream rather than a fork that may be stale. Depth 50 + # is enough to reach the branch point without fetching years of history. + git clone --depth 50 "https://github.com/${upstream}.git" "$workdir/pkg" + cd "$workdir/pkg" + echo "upstream ${upstream}@$(git rev-parse --short HEAD)" + + git fetch --depth 50 "https://github.com/${fork}.git" "$branch" + echo "fork ${fork}@${branch} $(git rev-parse --short FETCH_HEAD)" + + # Diff from the branch point, not from the tip's parent: the branch + # carries several commits and a tip-only diff would apply just the last. + if ! base="$(git merge-base HEAD FETCH_HEAD)"; then + echo "::error title=roxygen2 fork::No common ancestor within 50 commits of ${upstream} and ${fork}@${branch}." + echo "Rebase the branch on upstream, or raise the fetch depth here." + exit 1 + fi + + # Only `R/`. The branch also carries tests, NEWS and a regenerated + # `man/`, none of which this build runs, and all of which are far more + # likely to conflict as upstream moves. The R change is deliberately + # shaped to keep this patch small: one line in `R/markdown.R`, and + # everything else in a file of its own that upstream will never create, + # because a patch that adds a whole file cannot conflict. + git diff "$base" FETCH_HEAD -- R/ > "$workdir/R.patch" + + if [ ! -s "$workdir/R.patch" ]; then + echo "::error title=roxygen2 fork::${fork}@${branch} changes nothing under R/." + echo "Either the branch has landed upstream and this action should be removed," + echo "or the branch name is wrong." + exit 1 + fi + + # --3way so the patch still applies when upstream has moved around it. + # A conflict is a hard stop: installing an unpatched roxygen2 would + # regenerate every man/ file without the change, and the diff would + # look like unrelated documentation churn rather than a failed install. + if ! git apply --3way --verbose "$workdir/R.patch"; then + echo "::error title=roxygen2 fork::Could not apply ${fork}@${branch} onto ${upstream}." + echo "This is usually an ordinary merge conflict: upstream has changed the same lines." + echo "Rebase the branch on upstream and push it again." + exit 1 + fi + + # Stamp the build. roxygen2 writes its own version into a package's + # Config/roxygen2/version, so this is what makes it visible that the + # documentation was generated with the patch: upstream numbers its + # development builds x.y.z.9000, and this takes the same x.y.z with + # .9100. Derived from upstream's own version so it follows automatically + # when upstream moves. + Rscript -e ' + d <- read.dcf("DESCRIPTION") + v <- d[1, "Version"] + d[1, "Version"] <- sub("^([0-9]+[.][0-9]+[.][0-9]+).*$", "\1.9100", v) + write.dcf(d, "DESCRIPTION", keep.white = colnames(d)) + cat("stamped", v, "->", read.dcf("DESCRIPTION")[1, "Version"], "\n") + ' + + R CMD INSTALL --no-docs . + + # Fail here rather than three steps later with a puzzling man/ diff. + Rscript -e ' + v <- as.character(packageVersion("roxygen2")) + patched <- exists("mdxml_keep_sentence_spacing", envir = asNamespace("roxygen2")) + cat("roxygen2", v, "patched:", patched, "\n") + if (!grepl("[.]9100$", v) || !patched) { + stop("roxygen2 was not installed from the fork branch.", call. = FALSE) + } + ' + shell: bash diff --git a/DESCRIPTION b/DESCRIPTION index 8f902283bfe..b3d43c11742 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -93,4 +93,11 @@ Encoding: UTF-8 Roxygen: list(markdown = TRUE, roclets = c("collate", "namespace", "igraph.r2cdocs::docs_rd", "devtag::dev_roclet")) SystemRequirements: libxml2 (optional), glpk (>= 4.57, optional) -Config/roxygen2/version: 8.1.0.9000 +Config/roxygen2/version: 8.1.0.9100 +Config/cynkra/roxygen2: The .9100 suffix on Config/roxygen2/version marks a patched + roxygen2, not an upstream development build. Upstream numbers its own + development builds x.y.z.9000; the build that documents this package takes the + same x.y.z and uses .9100. It is upstream plus the sentence-spacing fix from + krlmlr/roxygen2@f-sentence-spacing, installed by + .github/workflows/roxygen2-fork. Regenerating man/ with a stock roxygen2 drops + the gap after every sentence that ends a line. From c3533b762ae4368d107ca6abbce66b9878c92ba3 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 13 Sep 2026 22:08:19 +0000 Subject: [PATCH 2/3] fix(ci): Stamp the roxygen2 version with a backreference, not an octal escape The version stamp wrote the replacement as "\1". R parses that as the octal escape for \001, not as a regex backreference, so DESCRIPTION ended up with a malformed version and R CMD INSTALL aborted with "Malformed package version". Every job that installs roxygen2 through this action failed there. The replacement is now "\\1", verified to stamp 8.1.0.9000 to 8.1.0.9100. The post-install guard asserted only the .9100 suffix, and the corrupt "\001.9100" satisfies that too, which is why the bug survived the check meant to catch it. The guard now asserts the whole x.y.z.9100 shape, and passes inherits = FALSE to exists(). Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01WWhverMTZZKgEpUuTK117m --- .github/workflows/roxygen2-fork/action.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/roxygen2-fork/action.yml b/.github/workflows/roxygen2-fork/action.yml index e020c6e76d1..eb5ea1ff01f 100644 --- a/.github/workflows/roxygen2-fork/action.yml +++ b/.github/workflows/roxygen2-fork/action.yml @@ -86,7 +86,7 @@ runs: Rscript -e ' d <- read.dcf("DESCRIPTION") v <- d[1, "Version"] - d[1, "Version"] <- sub("^([0-9]+[.][0-9]+[.][0-9]+).*$", "\1.9100", v) + d[1, "Version"] <- sub("^([0-9]+[.][0-9]+[.][0-9]+).*$", "\\1.9100", v) write.dcf(d, "DESCRIPTION", keep.white = colnames(d)) cat("stamped", v, "->", read.dcf("DESCRIPTION")[1, "Version"], "\n") ' @@ -96,9 +96,12 @@ runs: # Fail here rather than three steps later with a puzzling man/ diff. Rscript -e ' v <- as.character(packageVersion("roxygen2")) - patched <- exists("mdxml_keep_sentence_spacing", envir = asNamespace("roxygen2")) + patched <- exists("mdxml_keep_sentence_spacing", envir = asNamespace("roxygen2"), inherits = FALSE) cat("roxygen2", v, "patched:", patched, "\n") - if (!grepl("[.]9100$", v) || !patched) { + # Assert the whole shape, not just the suffix: a malformed stamp such as + # "\001.9100" also ends in .9100, which is how the escaping bug in this + # very expression went unnoticed until CI refused to install the result. + if (!grepl("^[0-9]+[.][0-9]+[.][0-9]+[.]9100$", v) || !patched) { stop("roxygen2 was not installed from the fork branch.", call. = FALSE) } ' From 118bbe440e316b45f0f3d26871fcf3a1f47fbbb0 Mon Sep 17 00:00:00 2001 From: krlmlr Date: Sun, 13 Sep 2026 22:20:05 +0000 Subject: [PATCH 3/3] chore: Auto-update from GitHub Actions Run: https://github.com/igraph/rigraph/actions/runs/34786063496 --- man/E.Rd | 16 +- man/V.Rd | 12 +- man/aaa-igraph-package.Rd | 74 ++--- man/add.edges.Rd | 4 +- man/add.vertex.shape.Rd | 14 +- man/add.vertices.Rd | 4 +- man/add_edges.Rd | 6 +- man/add_vertices.Rd | 4 +- man/adjacent.triangles.Rd | 6 +- man/adjacent_vertices.Rd | 2 +- man/aging.ba.game.Rd | 20 +- man/aging.barabasi.game.Rd | 20 +- man/aging.prefatt.game.Rd | 20 +- man/align_layout.Rd | 4 +- man/all_simple_paths.Rd | 14 +- man/alpha.centrality.Rd | 22 +- man/alpha_centrality.Rd | 24 +- man/arpack.Rd | 148 ++++----- man/articulation.points.Rd | 2 +- man/articulation_points.Rd | 10 +- man/as.directed.Rd | 6 +- man/as.igraph.Rd | 4 +- man/as.matrix.igraph.Rd | 6 +- man/as.undirected.Rd | 12 +- man/as_adj.Rd | 26 +- man/as_adj_list.Rd | 6 +- man/as_adjacency_matrix.Rd | 26 +- man/as_biadjacency_matrix.Rd | 20 +- man/as_directed.Rd | 36 +-- man/as_graphnel.Rd | 8 +- man/as_long_data_frame.Rd | 8 +- man/assortativity.Rd | 34 +-- man/assortativity.degree.Rd | 4 +- man/assortativity.nominal.Rd | 14 +- man/asymmetric.preference.game.Rd | 8 +- man/authority.score.Rd | 10 +- man/autocurve.edges.Rd | 2 +- man/automorphism_group.Rd | 20 +- man/automorphisms.Rd | 6 +- man/average.path.length.Rd | 10 +- man/ba.game.Rd | 28 +- man/barabasi.game.Rd | 28 +- man/betweenness.Rd | 24 +- man/bfs.Rd | 70 ++--- man/biconnected.components.Rd | 2 +- man/biconnected_components.Rd | 20 +- man/bipartite.projection.Rd | 18 +- man/bipartite.projection.size.Rd | 4 +- man/bipartite.random.game.Rd | 18 +- man/bipartite_mapping.Rd | 10 +- man/bipartite_projection.Rd | 26 +- man/blockGraphs.Rd | 4 +- man/bonpow.Rd | 8 +- man/c.igraph.es.Rd | 2 +- man/c.igraph.vs.Rd | 2 +- man/callaway.traits.game.Rd | 8 +- man/canonical.permutation.Rd | 6 +- man/canonical_permutation.Rd | 38 +-- man/categorical_pal.Rd | 4 +- man/centr_betw.Rd | 10 +- man/centr_betw_tmax.Rd | 6 +- man/centr_clo.Rd | 10 +- man/centr_clo_tmax.Rd | 6 +- man/centr_degree.Rd | 10 +- man/centr_degree_tmax.Rd | 6 +- man/centr_eigen.Rd | 14 +- man/centr_eigen_tmax.Rd | 8 +- man/centralization.betweenness.Rd | 2 +- man/centralization.betweenness.tmax.Rd | 6 +- man/centralization.closeness.Rd | 2 +- man/centralization.closeness.tmax.Rd | 6 +- man/centralization.degree.Rd | 2 +- man/centralization.degree.tmax.Rd | 6 +- man/centralization.evcent.Rd | 4 +- man/centralization.evcent.tmax.Rd | 8 +- man/centralize.Rd | 8 +- man/centralize.scores.Rd | 6 +- man/cited.type.game.Rd | 6 +- man/citing.cited.type.game.Rd | 6 +- man/cliques.Rd | 48 +-- man/closeness.Rd | 24 +- man/cluster.distribution.Rd | 4 +- man/cluster_edge_betweenness.Rd | 36 +-- man/cluster_fast_greedy.Rd | 12 +- man/cluster_fluid_communities.Rd | 10 +- man/cluster_infomap.Rd | 24 +- man/cluster_label_prop.Rd | 38 +-- man/cluster_leading_eigen.Rd | 52 ++-- man/cluster_leiden.Rd | 48 +-- man/cluster_louvain.Rd | 30 +- man/cluster_optimal.Rd | 20 +- man/cluster_spinglass.Rd | 74 ++--- man/cluster_walktrap.Rd | 18 +- man/clusters.Rd | 4 +- man/cocitation.Rd | 10 +- man/cohesive.blocks.Rd | 6 +- man/cohesive_blocks.Rd | 68 ++--- man/communities.Rd | 76 ++--- man/compare.Rd | 8 +- man/complementer.Rd | 2 +- man/components.Rd | 28 +- man/compose.Rd | 32 +- man/connect.neighborhood.Rd | 10 +- man/consensus_tree.Rd | 18 +- man/console.Rd | 4 +- man/constraint.Rd | 12 +- man/constructor_spec.Rd | 2 +- man/contract.Rd | 10 +- man/contract.vertices.Rd | 6 +- man/convex_hull.Rd | 4 +- man/coreness.Rd | 4 +- man/count.multiple.Rd | 2 +- man/count_automorphisms.Rd | 24 +- man/count_motifs.Rd | 6 +- man/count_reachable.Rd | 10 +- man/count_subgraph_isomorphisms.Rd | 38 +-- man/count_triangles.Rd | 10 +- man/create.communities.Rd | 4 +- man/curve_multiple.Rd | 4 +- man/cutat.Rd | 6 +- man/decompose.Rd | 6 +- man/decompose.graph.Rd | 6 +- man/degree.Rd | 16 +- man/degree.sequence.game.Rd | 8 +- man/delete.edges.Rd | 2 +- man/delete_edges.Rd | 2 +- man/dendPlot.Rd | 6 +- man/dfs.Rd | 50 ++-- man/diameter.Rd | 16 +- man/difference.Rd | 6 +- man/difference.igraph.Rd | 16 +- man/difference.igraph.es.Rd | 2 +- man/difference.igraph.vs.Rd | 2 +- man/dim_select.Rd | 6 +- man/disjoint_union.Rd | 22 +- man/distances.Rd | 122 ++++---- man/diverging_pal.Rd | 6 +- man/diversity.Rd | 8 +- man/dominator.tree.Rd | 4 +- man/dominator_tree.Rd | 28 +- man/dot-data.Rd | 6 +- man/dot-extract_constructor_and_modifiers.Rd | 4 +- man/dyad.census.Rd | 2 +- man/dyad_census.Rd | 14 +- man/each_edge.Rd | 6 +- man/eccentricity.Rd | 14 +- man/edge.Rd | 4 +- man/edge.betweenness.Rd | 8 +- man/edge.betweenness.community.Rd | 26 +- man/edge.connectivity.Rd | 10 +- man/edge.disjoint.paths.Rd | 10 +- man/edge_attr-set.Rd | 4 +- man/edge_attr.Rd | 4 +- man/edge_connectivity.Rd | 24 +- man/edge_density.Rd | 8 +- man/ego.Rd | 18 +- man/eigen_centrality.Rd | 44 +-- man/embed_adjacency_matrix.Rd | 34 +-- man/embed_laplacian_matrix.Rd | 34 +-- man/ends.Rd | 2 +- man/erdos.renyi.game.Rd | 2 +- man/establishment.game.Rd | 8 +- man/estimate_betweenness.Rd | 6 +- man/estimate_closeness.Rd | 14 +- man/estimate_edge_betweenness.Rd | 8 +- man/evcent.Rd | 20 +- man/exportPajek.Rd | 10 +- man/farthest.nodes.Rd | 8 +- man/fastgreedy.community.Rd | 12 +- man/feedback_arc_set.Rd | 14 +- man/feedback_vertex_set.Rd | 8 +- man/find_cycle.Rd | 8 +- man/fit_hrg.Rd | 28 +- man/fit_power_law.Rd | 72 ++--- man/forest.fire.game.Rd | 2 +- man/get.adjacency.Rd | 16 +- man/get.adjedgelist.Rd | 6 +- man/get.adjlist.Rd | 6 +- man/get.all.shortest.paths.Rd | 20 +- man/get.data.frame.Rd | 2 +- man/get.diameter.Rd | 8 +- man/get.edge.attribute.Rd | 4 +- man/get.edge.ids.Rd | 6 +- man/get.graph.attribute.Rd | 2 +- man/get.incidence.Rd | 8 +- man/get.shortest.paths.Rd | 50 ++-- man/get.stochastic.Rd | 6 +- man/get.vertex.attribute.Rd | 4 +- man/getIgraphOpt.Rd | 2 +- man/get_edge_ids.Rd | 14 +- man/girth.Rd | 10 +- man/global_efficiency.Rd | 24 +- man/graph.Rd | 22 +- man/graph.adhesion.Rd | 10 +- man/graph.adjacency.Rd | 30 +- man/graph.adjlist.Rd | 6 +- man/graph.automorphisms.Rd | 6 +- man/graph.bfs.Rd | 28 +- man/graph.bipartite.Rd | 12 +- man/graph.compose.Rd | 6 +- man/graph.coreness.Rd | 4 +- man/graph.data.frame.Rd | 8 +- man/graph.de.bruijn.Rd | 4 +- man/graph.density.Rd | 4 +- man/graph.dfs.Rd | 24 +- man/graph.diversity.Rd | 8 +- man/graph.eigen.Rd | 8 +- man/graph.extended.chordal.ring.Rd | 2 +- man/graph.famous.Rd | 22 +- man/graph.formula.Rd | 8 +- man/graph.full.bipartite.Rd | 4 +- man/graph.graphdb.Rd | 20 +- man/graph.incidence.Rd | 24 +- man/graph.kautz.Rd | 4 +- man/graph.knn.Rd | 18 +- man/graph.laplacian.Rd | 6 +- man/graph.lattice.Rd | 4 +- man/graph.lcf.Rd | 2 +- man/graph.maxflow.Rd | 4 +- man/graph.mincut.Rd | 2 +- man/graph.motifs.Rd | 4 +- man/graph.motifs.est.Rd | 10 +- man/graph.motifs.no.Rd | 4 +- man/graph.neighborhood.Rd | 12 +- man/graph.ring.Rd | 4 +- man/graph.strength.Rd | 10 +- man/graph.tree.Rd | 2 +- man/graph.union.Rd | 6 +- man/graph_attr-set.Rd | 2 +- man/graph_attr.Rd | 2 +- man/graph_center.Rd | 12 +- man/graph_from_adj_list.Rd | 10 +- man/graph_from_adjacency_matrix.Rd | 66 ++-- man/graph_from_atlas.Rd | 4 +- man/graph_from_biadjacency_matrix.Rd | 30 +- man/graph_from_data_frame.Rd | 40 +-- man/graph_from_edgelist.Rd | 6 +- man/graph_from_graphdb.Rd | 24 +- man/graph_from_graphnel.Rd | 8 +- man/graph_from_isomorphism_class.Rd | 4 +- man/graph_from_lcf.Rd | 6 +- man/graph_from_literal.Rd | 26 +- man/graph_id.Rd | 6 +- man/graph_version.Rd | 4 +- man/graphlet_basis.Rd | 28 +- man/graphlets.candidate.basis.Rd | 4 +- man/graphlets.project.Rd | 6 +- man/greedy_vertex_coloring.Rd | 8 +- man/groups.Rd | 10 +- man/growing.random.game.Rd | 2 +- man/handle_vertex_type_arg.Rd | 2 +- man/harmonic_centrality.Rd | 22 +- man/has_eulerian_path.Rd | 12 +- man/head_of.Rd | 2 +- man/head_print.Rd | 4 +- man/hits_scores.Rd | 24 +- man/hrg-methods.Rd | 4 +- man/hrg.Rd | 4 +- man/hrg.consensus.Rd | 2 +- man/hrg.fit.Rd | 6 +- man/hrg.predict.Rd | 6 +- man/hub.score.Rd | 10 +- man/hub_score.Rd | 10 +- man/identical_graphs.Rd | 2 +- man/igraph-attribute-combination.Rd | 68 ++--- man/igraph-dollar.Rd | 2 +- man/igraph-es-attributes.Rd | 6 +- man/igraph-es-indexing.Rd | 48 +-- man/igraph-es-indexing2.Rd | 2 +- man/igraph-minus.Rd | 16 +- man/igraph-vs-attributes.Rd | 4 +- man/igraph-vs-indexing.Rd | 40 +-- man/igraph-vs-indexing2.Rd | 2 +- man/igraph.from.graphNEL.Rd | 2 +- man/igraph.options.Rd | 2 +- man/igraph_opt.Rd | 4 +- man/igraph_options.Rd | 70 ++--- man/incident.Rd | 2 +- man/incident_edges.Rd | 2 +- man/indent_print.Rd | 2 +- man/independent.vertex.sets.Rd | 4 +- man/induced.subgraph.Rd | 6 +- man/infomap.community.Rd | 18 +- man/intersection.Rd | 6 +- man/intersection.igraph.Rd | 20 +- man/intersection.igraph.es.Rd | 2 +- man/intersection.igraph.vs.Rd | 2 +- man/invalidate_cache.Rd | 6 +- man/is.chordal.Rd | 6 +- man/is.connected.Rd | 4 +- man/is.dag.Rd | 2 +- man/is.degree.sequence.Rd | 4 +- man/is.graphical.degree.sequence.Rd | 12 +- man/is.loop.Rd | 2 +- man/is.matching.Rd | 8 +- man/is.maximal.matching.Rd | 8 +- man/is.minimal.separator.Rd | 2 +- man/is.multiple.Rd | 2 +- man/is.mutual.Rd | 2 +- man/is.separator.Rd | 2 +- man/is_acyclic.Rd | 2 +- man/is_biconnected.Rd | 2 +- man/is_bipartite.Rd | 2 +- man/is_chordal.Rd | 14 +- man/is_dag.Rd | 4 +- man/is_degseq.Rd | 12 +- man/is_forest.Rd | 12 +- man/is_graphical.Rd | 14 +- man/is_min_separator.Rd | 4 +- man/is_named.Rd | 6 +- man/is_separator.Rd | 2 +- man/is_tree.Rd | 12 +- man/is_weighted.Rd | 6 +- man/isomorphic.Rd | 38 +-- man/isomorphism_class.Rd | 6 +- man/isomorphisms.Rd | 14 +- man/ivs.Rd | 12 +- man/k_shortest_paths.Rd | 18 +- man/keeping_degseq.Rd | 2 +- man/knn.Rd | 28 +- man/label.propagation.community.Rd | 32 +- man/laplacian_matrix.Rd | 14 +- man/lastcit.game.Rd | 4 +- man/layout.bipartite.Rd | 6 +- man/layout.davidson.harel.Rd | 14 +- man/layout.drl.Rd | 20 +- man/layout.gem.Rd | 16 +- man/layout.graphopt.Rd | 20 +- man/layout.grid.Rd | 8 +- man/layout.mds.Rd | 4 +- man/layout.merge.Rd | 2 +- man/layout.star.Rd | 4 +- man/layout.sugiyama.Rd | 16 +- man/layout_.Rd | 36 +-- man/layout_as_bipartite.Rd | 10 +- man/layout_as_star.Rd | 6 +- man/layout_as_tree.Rd | 28 +- man/layout_in_circle.Rd | 4 +- man/layout_modifier.Rd | 4 +- man/layout_nicely.Rd | 16 +- man/layout_on_grid.Rd | 12 +- man/layout_on_sphere.Rd | 2 +- man/layout_randomly.Rd | 4 +- man/layout_spec.Rd | 6 +- man/layout_with_dh.Rd | 28 +- man/layout_with_drl.Rd | 76 ++--- man/layout_with_fr.Rd | 28 +- man/layout_with_gem.Rd | 18 +- man/layout_with_graphopt.Rd | 22 +- man/layout_with_kk.Rd | 24 +- man/layout_with_lgl.Rd | 12 +- man/layout_with_mds.Rd | 8 +- man/layout_with_sugiyama.Rd | 38 +-- man/leading.eigenvector.community.Rd | 20 +- man/local_scan.Rd | 30 +- man/make_.Rd | 6 +- man/make_bipartite_graph.Rd | 20 +- man/make_chordal_ring.Rd | 14 +- man/make_circulant.Rd | 2 +- man/make_clusters.Rd | 14 +- man/make_de_bruijn_graph.Rd | 8 +- man/make_from_prufer.Rd | 4 +- man/make_full_bipartite_graph.Rd | 6 +- man/make_full_citation_graph.Rd | 4 +- man/make_full_multipartite.Rd | 8 +- man/make_graph.Rd | 134 ++++----- man/make_kautz_graph.Rd | 6 +- man/make_lattice.Rd | 10 +- man/make_line_graph.Rd | 2 +- man/make_ring.Rd | 4 +- man/make_tree.Rd | 2 +- man/make_turan.Rd | 6 +- man/make_wheel.Rd | 6 +- man/match_vertices.Rd | 12 +- man/matching.Rd | 46 +-- man/max_cardinality.Rd | 12 +- man/max_flow.Rd | 30 +- man/maximal.cliques.Rd | 16 +- man/maximal.cliques.count.Rd | 10 +- man/maximum.bipartite.matching.Rd | 16 +- man/maximum.cardinality.search.Rd | 2 +- man/merge_coords.Rd | 14 +- man/min_cut.Rd | 18 +- man/min_separators.Rd | 6 +- man/min_st_separators.Rd | 6 +- man/minimal.st.separators.Rd | 2 +- man/minimum.size.separators.Rd | 2 +- man/minimum.spanning.tree.Rd | 10 +- man/mod.matrix.Rd | 6 +- man/modularity.igraph.Rd | 20 +- man/motifs.Rd | 22 +- man/mst.Rd | 18 +- man/multilevel.community.Rd | 16 +- man/neighborhood.size.Rd | 12 +- man/neighbors.Rd | 2 +- man/no.clusters.Rd | 4 +- man/normalize.Rd | 4 +- man/optimal.community.Rd | 12 +- man/page.rank.Rd | 30 +- man/page_rank.Rd | 40 +-- man/path.Rd | 2 +- man/permute.Rd | 4 +- man/permute.vertices.Rd | 2 +- man/piecewise.layout.Rd | 4 +- man/pipe.Rd | 2 +- man/plot.common.Rd | 300 +++++++++---------- man/plot.igraph.Rd | 28 +- man/plot.sir.Rd | 10 +- man/plotHierarchy.Rd | 8 +- man/plot_dendrogram.communities.Rd | 50 ++-- man/plot_dendrogram.igraphHRG.Rd | 48 +-- man/plus-.igraph.Rd | 20 +- man/power.law.fit.Rd | 24 +- man/power_centrality.Rd | 48 +-- man/predict_edges.Rd | 18 +- man/preference.game.Rd | 12 +- man/print.igraph.Rd | 40 +-- man/print.igraph.es.Rd | 4 +- man/print.igraph.vs.Rd | 4 +- man/print.igraphHRG.Rd | 12 +- man/printer_callback.Rd | 8 +- man/r_pal.Rd | 2 +- man/radius.Rd | 16 +- man/random_walk.Rd | 28 +- man/read.graph.Rd | 8 +- man/read_graph.Rd | 100 +++---- man/realize_bipartite_degseq.Rd | 14 +- man/realize_degseq.Rd | 40 +-- man/reciprocity.Rd | 12 +- man/reverse_edges.Rd | 4 +- man/rglplot.Rd | 6 +- man/running_mean.Rd | 2 +- man/sample_.Rd | 6 +- man/sample_bipartite.Rd | 20 +- man/sample_bipartite_gnm.Rd | 16 +- man/sample_chung_lu.Rd | 64 ++-- man/sample_correlated_gnp.Rd | 10 +- man/sample_correlated_gnp_pair.Rd | 4 +- man/sample_degseq.Rd | 40 +-- man/sample_dirichlet.Rd | 2 +- man/sample_dot_product.Rd | 4 +- man/sample_fitness.Rd | 26 +- man/sample_fitness_pl.Rd | 16 +- man/sample_forestfire.Rd | 12 +- man/sample_gnm.Rd | 4 +- man/sample_gnp.Rd | 6 +- man/sample_grg.Rd | 6 +- man/sample_growing.Rd | 4 +- man/sample_hierarchical_sbm.Rd | 12 +- man/sample_last_cit.Rd | 8 +- man/sample_motifs.Rd | 12 +- man/sample_pa.Rd | 46 +-- man/sample_pa_age.Rd | 40 +-- man/sample_pref.Rd | 24 +- man/sample_sbm.Rd | 10 +- man/sample_seq.Rd | 2 +- man/sample_smallworld.Rd | 10 +- man/sample_spanning_tree.Rd | 8 +- man/sample_traits_callaway.Rd | 20 +- man/sample_tree.Rd | 12 +- man/sbm.game.Rd | 8 +- man/scan_stat.Rd | 16 +- man/sequential_pal.Rd | 4 +- man/set.edge.attribute.Rd | 4 +- man/set.vertex.attribute.Rd | 4 +- man/set_edge_attr.Rd | 4 +- man/set_vertex_attr.Rd | 4 +- man/set_vertex_attrs.Rd | 2 +- man/shapes.Rd | 58 ++-- man/shortest.paths.Rd | 32 +- man/similarity.Rd | 20 +- man/similarity.dice.Rd | 2 +- man/similarity.invlogweighted.Rd | 2 +- man/similarity.jaccard.Rd | 2 +- man/simple_cycles.Rd | 26 +- man/simplify.Rd | 20 +- man/sir.Rd | 48 +-- man/spectrum.Rd | 14 +- man/spinglass.community.Rd | 56 ++-- man/split_join_distance.Rd | 6 +- man/stCuts.Rd | 2 +- man/stMincuts.Rd | 6 +- man/st_cuts.Rd | 10 +- man/st_min_cuts.Rd | 16 +- man/static.fitness.game.Rd | 6 +- man/static.power.law.game.Rd | 10 +- man/stochastic_matrix.Rd | 10 +- man/strength.Rd | 12 +- man/sub-.igraph.Rd | 60 ++-- man/sub-sub-.igraph.Rd | 20 +- man/subcomponent.Rd | 8 +- man/subgraph.Rd | 14 +- man/subgraph.centrality.Rd | 4 +- man/subgraph_centrality.Rd | 6 +- man/subgraph_isomorphic.Rd | 42 +-- man/subgraph_isomorphisms.Rd | 56 ++-- man/tail_of.Rd | 2 +- man/tkplot.Rd | 26 +- man/tkplot.reshape.Rd | 2 +- man/to_prufer.Rd | 4 +- man/topo_sort.Rd | 10 +- man/topological.sort.Rd | 6 +- man/transitive_closure.Rd | 10 +- man/transitivity.Rd | 50 ++-- man/triad.census.Rd | 2 +- man/triad_census.Rd | 18 +- man/unfold.tree.Rd | 6 +- man/unfold_tree.Rd | 10 +- man/union.Rd | 6 +- man/union.igraph.Rd | 26 +- man/union.igraph.es.Rd | 4 +- man/union.igraph.vs.Rd | 4 +- man/unique.igraph.es.Rd | 4 +- man/unique.igraph.vs.Rd | 4 +- man/upgrade_graph.Rd | 2 +- man/vertex.Rd | 2 +- man/vertex.connectivity.Rd | 10 +- man/vertex.shape.pie.Rd | 20 +- man/vertex.shapes.Rd | 2 +- man/vertex_attr-set.Rd | 4 +- man/vertex_attr.Rd | 4 +- man/vertex_connectivity.Rd | 28 +- man/voronoi_cells.Rd | 16 +- man/walktrap.community.Rd | 16 +- man/weighted_cliques.Rd | 14 +- man/which_multiple.Rd | 16 +- man/which_mutual.Rd | 2 +- man/with_edge_.Rd | 2 +- man/with_graph_.Rd | 2 +- man/with_vertex_.Rd | 2 +- man/write.graph.Rd | 4 +- man/write_graph.Rd | 76 ++--- 532 files changed, 3984 insertions(+), 3984 deletions(-) diff --git a/man/E.Rd b/man/E.Rd index 2acb5208756..66dcb8c26b0 100644 --- a/man/E.Rd +++ b/man/E.Rd @@ -12,11 +12,11 @@ E(graph, ..., P = NULL, path = NULL, directed = TRUE) \item{...}{These dots are for future extensions and must be empty.} \item{P}{A list of vertices to select edges via pairs of vertices. -The first and second vertices select the first edge, the third and fourth the second, etc.} + The first and second vertices select the first edge, the third and fourth the second, etc.} \item{path}{A list of vertices, to select edges along a path. -Note that this only works reliable for simple graphs. -If the graph has multiple edges, one of them will be chosen arbitrarily to be included in the edge sequence.} + Note that this only works reliable for simple graphs. + If the graph has multiple edges, one of them will be chosen arbitrarily to be included in the edge sequence.} \item{directed}{Whether to consider edge directions in the \code{P} argument, for directed graphs.} } @@ -34,21 +34,21 @@ An edge sequence is tied to the graph it refers to: it really denoted the specif and cannot be used together with another graph. An edge sequence is most often created by the \code{E()} function. -The result includes edges in increasing edge ID order by default (if. none of the \code{P} and \code{path} arguments are used). -An edge sequence can be indexed by a numeric vector, just like a regular R vector. -See links to other edge sequence operations below. + The result includes edges in increasing edge ID order by default (if. none of the \code{P} and \code{path} arguments are used). + An edge sequence can be indexed by a numeric vector, just like a regular R vector. + See links to other edge sequence operations below. } \section{Indexing edge sequences}{ Edge sequences mostly behave like regular vectors, but there are some additional indexing operations that are specific for them; e.g. selecting edges based on graph structure, or based on edge attributes. -See \code{\link{[.igraph.es}} for details. + See \code{\link{[.igraph.es}} for details. } \section{Querying or setting attributes}{ Edge sequences can be used to query or set attributes for the edges in the sequence. -See \code{\link[=$.igraph.es]{$.igraph.es()}} for details. + See \code{\link[=$.igraph.es]{$.igraph.es()}} for details. } \section{Related documentation in the C library}{ diff --git a/man/V.Rd b/man/V.Rd index 27bd0d72692..94401fa44cc 100644 --- a/man/V.Rd +++ b/man/V.Rd @@ -17,7 +17,7 @@ Create a vertex sequence (vs) containing all vertices of a graph. } \details{ A vertex sequence is just what the name says it is: a sequence of vertices. -Vertex sequences are usually used as igraph function arguments that refer to vertices of a graph. + Vertex sequences are usually used as igraph function arguments that refer to vertices of a graph. A vertex sequence is tied to the graph it refers to: it really denoted the specific vertices of that graph, and cannot be used together with another graph. @@ -27,21 +27,21 @@ but it has a special class attribute which makes it possible to perform graph sp like selecting a subset of the vertices based on graph structure, or vertex attributes. A vertex sequence is most often created by the \code{V()} function. -The result of this includes all vertices in increasing vertex ID order. -A vertex sequence can be indexed by a numeric vector, just like a regular R vector. -See \code{\link{[.igraph.vs}} and additional links to other vertex sequence operations below. + The result of this includes all vertices in increasing vertex ID order. + A vertex sequence can be indexed by a numeric vector, just like a regular R vector. + See \code{\link{[.igraph.vs}} and additional links to other vertex sequence operations below. } \section{Indexing vertex sequences}{ Vertex sequences mostly behave like regular vectors, but there are some additional indexing operations that are specific for them; e.g. selecting vertices based on graph structure, or based on vertex attributes. -See \code{\link{[.igraph.vs}} for details. + See \code{\link{[.igraph.vs}} for details. } \section{Querying or setting attributes}{ Vertex sequences can be used to query or set attributes for the vertices in the sequence. -See \code{\link[=$.igraph.vs]{$.igraph.vs()}} for details. + See \code{\link[=$.igraph.vs]{$.igraph.vs()}} for details. } \section{Related documentation in the C library}{ diff --git a/man/aaa-igraph-package.Rd b/man/aaa-igraph-package.Rd index 7a98cadf4c9..6d21e7bfb6f 100644 --- a/man/aaa-igraph-package.Rd +++ b/man/aaa-igraph-package.Rd @@ -17,23 +17,23 @@ with millions of vertices and edges, 3) allowing rapid prototyping via high leve \section{igraph graphs}{ igraph graphs have a class \sQuote{\code{igraph}}. -They are printed to the screen in a special format, here is an example, a ring graph + They are printed to the screen in a special format, here is an example, a ring graph created using \code{\link[=make_ring]{make_ring()}}: \preformatted{ IGRAPH U--- 10 10 -- Ring graph + attr: name (g/c), mutual (g/x), circular (g/x) } \sQuote{\code{IGRAPH}} denotes that this is an igraph graph. -Then come four bits that denote the kind of the graph: the first is \sQuote{\code{U}} for undirected and \sQuote{\code{D}} for directed graphs. -The second is \sQuote{\code{N}} for named graph (i.e. if the graph has the \sQuote{\code{name}} vertex attribute set). -The third is \sQuote{\code{W}} for weighted graphs (i.e. if the \sQuote{\code{weight}} edge attribute is set). -The fourth is \sQuote{\code{B}} for bipartite graphs (i.e. if the \sQuote{\code{type}} vertex attribute is set). + Then come four bits that denote the kind of the graph: the first is \sQuote{\code{U}} for undirected and \sQuote{\code{D}} for directed graphs. + The second is \sQuote{\code{N}} for named graph (i.e. if the graph has the \sQuote{\code{name}} vertex attribute set). + The third is \sQuote{\code{W}} for weighted graphs (i.e. if the \sQuote{\code{weight}} edge attribute is set). + The fourth is \sQuote{\code{B}} for bipartite graphs (i.e. if the \sQuote{\code{type}} vertex attribute is set). Then come two numbers, the number of vertices and the number of edges in the graph, and after a double dash, the name of the graph (the \sQuote{\code{name}} graph attribute) is printed if present. -The second line is optional and it contains all the attributes of the graph. -This graph has a \sQuote{\code{name}} graph attribute, of type character, + The second line is optional and it contains all the attributes of the graph. + This graph has a \sQuote{\code{name}} graph attribute, of type character, and two other graph attributes called \sQuote{\code{mutual}} and \sQuote{\code{circular}}, of a complex type. -A complex type is simply anything that is not numeric or character. -See the documentation of \code{\link[=print.igraph]{print.igraph()}} for details. + A complex type is simply anything that is not numeric or character. + See the documentation of \code{\link[=print.igraph]{print.igraph()}} for details. If you want to see the edges of the graph as well, then use the \code{\link[=print_all]{print_all()}} function: \preformatted{ > print_all(g) @@ -49,9 +49,9 @@ There are many functions in igraph for creating graphs, both deterministic and s stochastic graph constructors are called \sQuote{games}. To create small graphs with a given structure probably the \code{\link[=graph_from_literal]{graph_from_literal()}} function is easiest. -It uses R's formula interface, its manual page contains many examples. -Another option is \code{\link[=make_graph]{make_graph()}}, which takes numeric vertex IDs directly. -\code{\link[=graph_from_atlas]{graph_from_atlas()}} creates graph from the Graph Atlas, \code{\link[=make_graph]{make_graph()}} can create some special graphs. + It uses R's formula interface, its manual page contains many examples. + Another option is \code{\link[=make_graph]{make_graph()}}, which takes numeric vertex IDs directly. + \code{\link[=graph_from_atlas]{graph_from_atlas()}} creates graph from the Graph Atlas, \code{\link[=make_graph]{make_graph()}} can create some special graphs. To create graphs from field data, \code{\link[=graph_from_edgelist]{graph_from_edgelist()}}, \code{\link[=graph_from_data_frame]{graph_from_data_frame()}} and \code{\link[=graph_from_adjacency_matrix]{graph_from_adjacency_matrix()}} are probably the best choices. @@ -63,18 +63,18 @@ like preferential attachment (\code{\link[=sample_pa]{sample_pa()}}) and the sma \section{Vertex and edge IDs}{ Vertices and edges have numerical vertex IDs in igraph. -Vertex IDs are always consecutive and they start with one. -I.e. for a graph with \eqn{n} vertices the vertex IDs are between \eqn{1} and \eqn{n}. -If some operation changes the number of vertices in the graphs, e.g. a subgraph is created via \code{\link[=induced_subgraph]{induced_subgraph()}}, + Vertex IDs are always consecutive and they start with one. + I.e. for a graph with \eqn{n} vertices the vertex IDs are between \eqn{1} and \eqn{n}. + If some operation changes the number of vertices in the graphs, e.g. a subgraph is created via \code{\link[=induced_subgraph]{induced_subgraph()}}, then the vertices are renumbered to satisfy this criteria. The same is true for the edges as well, edge IDs are always between one and \eqn{m}, the total number of edges in the graph. It is often desirable to follow vertices along a number of graph operations, and vertex IDs don't allow this because of the renumbering. -The solution is to assign attributes to the vertices. -These are kept by all operations, if possible. -See more about attributes in the next section. + The solution is to assign attributes to the vertices. + These are kept by all operations, if possible. + See more about attributes in the next section. } \section{Attributes}{ @@ -84,39 +84,39 @@ or to the graph itself. igraph provides flexible constructs for selecting a set see \code{\link[=vertex_attr]{vertex_attr()}}, \code{\link[=V]{V()}} and \code{\link[=E]{E()}} for details. Some vertex/edge/graph attributes are treated specially. -One of them is the \sQuote{name} attribute. -This is used for printing the graph instead of the numerical IDs, if it exists. -Vertex names can also be used to specify a vector or set of vertices, in all igraph functions. -E.g. \code{\link[=degree]{degree()}} has a \code{v} argument that gives the vertices for which the degree is calculated. -This argument can be given as a character vector of vertex names. + One of them is the \sQuote{name} attribute. + This is used for printing the graph instead of the numerical IDs, if it exists. + Vertex names can also be used to specify a vector or set of vertices, in all igraph functions. + E.g. \code{\link[=degree]{degree()}} has a \code{v} argument that gives the vertices for which the degree is calculated. + This argument can be given as a character vector of vertex names. Edges can also have a \sQuote{name} attribute, and this is treated specially as well. -Just like for vertices, edges can also be selected based on their names, e.g. in the \code{\link[=delete_edges]{delete_edges()}} and other functions. + Just like for vertices, edges can also be selected based on their names, e.g. in the \code{\link[=delete_edges]{delete_edges()}} and other functions. We note here, that vertex names can also be used to select edges. -The form \sQuote{\code{from|to}}, where \sQuote{\code{from}} and \sQuote{\code{to}} are vertex names, select a single, possibly directed, + The form \sQuote{\code{from|to}}, where \sQuote{\code{from}} and \sQuote{\code{to}} are vertex names, select a single, possibly directed, edge going from \sQuote{\code{from}} to \sQuote{\code{to}}. -The two forms can also be mixed in the same edge selector. + The two forms can also be mixed in the same edge selector. Other attributes define visualization parameters, see \link{igraph.plotting} for details. Attribute values can be set to any R object, but note that storing the graph in some file formats might result the loss of complex attribute values. -All attribute values are preserved if you use \code{\link[base:save]{base::save()}} and \code{\link[base:load]{base::load()}} to store/retrieve your graphs. + All attribute values are preserved if you use \code{\link[base:save]{base::save()}} and \code{\link[base:load]{base::load()}} to store/retrieve your graphs. } \section{Visualization}{ igraph provides three different ways for visualization. -The first is the \code{\link[=plot.igraph]{plot.igraph()}} function. -(Actually you don't need to write \code{plot.igraph()}, \code{\link[=plot]{plot()}} is enough. -This function uses regular R graphics and can be used with any R device. + The first is the \code{\link[=plot.igraph]{plot.igraph()}} function. + (Actually you don't need to write \code{plot.igraph()}, \code{\link[=plot]{plot()}} is enough. + This function uses regular R graphics and can be used with any R device. The second function is \code{\link[=tkplot]{tkplot()}}, which uses a Tk GUI for basic interactive graph manipulation. -(Tk is quite resource hungry, so don't try this for very large graphs.) + (Tk is quite resource hungry, so don't try this for very large graphs.) The third way requires the \code{rgl} package and uses OpenGL. -See the \code{\link[=rglplot]{rglplot()}} function for the details. + See the \code{\link[=rglplot]{rglplot()}} function for the details. Make sure you read \link{igraph.plotting} before you start plotting your graphs. } @@ -124,16 +124,16 @@ Make sure you read \link{igraph.plotting} before you start plotting your graphs. \section{File formats}{ igraph can handle various graph file formats, usually both for reading and writing. -We suggest that you use the GraphML file format for your graphs, except if the graphs are too big. -For big graphs a simpler format is recommended. -See \code{\link[=read_graph]{read_graph()}} and \code{\link[=write_graph]{write_graph()}} for details. + We suggest that you use the GraphML file format for your graphs, except if the graphs are too big. + For big graphs a simpler format is recommended. + See \code{\link[=read_graph]{read_graph()}} and \code{\link[=write_graph]{write_graph()}} for details. } \section{Further information}{ The igraph homepage is at \url{https://igraph.org}. -See especially the documentation section. -Join the discussion forum at \url{https://igraph.discourse.group} if you have questions or comments. + See especially the documentation section. + Join the discussion forum at \url{https://igraph.discourse.group} if you have questions or comments. } \seealso{ diff --git a/man/add.edges.Rd b/man/add.edges.Rd index 75739d4b03c..6bc732406be 100644 --- a/man/add.edges.Rd +++ b/man/add.edges.Rd @@ -12,10 +12,10 @@ add.edges(graph, edges, ..., attr = list()) \item{edges}{The edges to add, a vertex sequence with even number of vertices.} \item{...}{Additional arguments, they must be named, and they will be added as edge attributes, for the newly added edges. -See also details below.} + See also details below.} \item{attr}{A named list, its elements will be added as edge attributes, for the newly added edges. -See also details below.} + See also details below.} } \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/add.vertex.shape.Rd b/man/add.vertex.shape.Rd index 61b835aa4ad..c7cb189ff89 100644 --- a/man/add.vertex.shape.Rd +++ b/man/add.vertex.shape.Rd @@ -13,19 +13,19 @@ add.vertex.shape( } \arguments{ \item{shape}{Character scalar, name of a vertex shape. -If it is \code{NULL} for \code{shapes()}, then the names of all defined vertex shapes are returned.} + If it is \code{NULL} for \code{shapes()}, then the names of all defined vertex shapes are returned.} \item{clip}{An R function object, the clipping function. -The default \code{NULL} uses \code{shape_noclip}.} + The default \code{NULL} uses \code{shape_noclip}.} \item{plot}{An R function object, the plotting function. -The default \code{NULL} uses \code{shape_noplot}.} + The default \code{NULL} uses \code{shape_noplot}.} \item{parameters}{Named list, additional plot/vertex/edge parameters. -The element named define the new parameters, and the elements themselves define their default values. -Vertex parameters should have a prefix \sQuote{\code{vertex.}}, edge parameters a prefix \sQuote{\code{edge.}}. -Other general plotting parameters should have a prefix \sQuote{\code{plot.}}. -See Details below.} + The element named define the new parameters, and the elements themselves define their default values. + Vertex parameters should have a prefix \sQuote{\code{vertex.}}, edge parameters a prefix \sQuote{\code{edge.}}. + Other general plotting parameters should have a prefix \sQuote{\code{plot.}}. + See Details below.} } \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/add.vertices.Rd b/man/add.vertices.Rd index ac6da62ff3a..468c281b673 100644 --- a/man/add.vertices.Rd +++ b/man/add.vertices.Rd @@ -12,10 +12,10 @@ add.vertices(graph, nv, ..., attr = list()) \item{nv}{The number of vertices to add.} \item{...}{Additional arguments, they must be named, and they will be added as vertex attributes, for the newly added vertices. -See also details below.} + See also details below.} \item{attr}{A named list, its elements will be added as vertex attributes, for the newly added vertices. -See also details below.} + See also details below.} } \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/add_edges.Rd b/man/add_edges.Rd index b4cee061ede..0c8909349b2 100644 --- a/man/add_edges.Rd +++ b/man/add_edges.Rd @@ -12,17 +12,17 @@ add_edges(graph, edges, ..., attr = list()) \item{edges}{The edges to add, a vertex sequence with even number of vertices.} \item{...}{Additional arguments, they must be named, and they will be added as edge attributes, for the newly added edges. -See also details below.} + See also details below.} \item{attr}{A named list, its elements will be added as edge attributes, for the newly added edges. -See also details below.} + See also details below.} } \value{ The graph, with the edges (and attributes) added. } \description{ The new edges are given as a vertex sequence, e.g. internal numeric vertex IDs, or vertex names. -The first edge points from \code{edges[1]} to \code{edges[2]}, the second from \code{edges[3]} to \code{edges[4]}, etc. + The first edge points from \code{edges[1]} to \code{edges[2]}, the second from \code{edges[3]} to \code{edges[4]}, etc. } \details{ If attributes are supplied, and they are not present in the graph, diff --git a/man/add_vertices.Rd b/man/add_vertices.Rd index fa36c43e5b2..18093743459 100644 --- a/man/add_vertices.Rd +++ b/man/add_vertices.Rd @@ -12,10 +12,10 @@ add_vertices(graph, nv, ..., attr = list()) \item{nv}{The number of vertices to add.} \item{...}{Additional arguments, they must be named, and they will be added as vertex attributes, for the newly added vertices. -See also details below.} + See also details below.} \item{attr}{A named list, its elements will be added as vertex attributes, for the newly added vertices. -See also details below.} + See also details below.} } \value{ The graph, with the vertices (and attributes) added. diff --git a/man/adjacent.triangles.Rd b/man/adjacent.triangles.Rd index b86726e0b30..896a5f343d0 100644 --- a/man/adjacent.triangles.Rd +++ b/man/adjacent.triangles.Rd @@ -8,11 +8,11 @@ adjacent.triangles(graph, vids = V(graph)) } \arguments{ \item{graph}{The input graph. -It might be directed, but edge directions are ignored.} + It might be directed, but edge directions are ignored.} \item{vids}{The vertices to query. -This might be a vector of numeric IDs, or a character vector of symbolic vertex names for named graphs. -The default \code{NULL} selects all vertices.} + This might be a vector of numeric IDs, or a character vector of symbolic vertex names for named graphs. + The default \code{NULL} selects all vertices.} } \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/adjacent_vertices.Rd b/man/adjacent_vertices.Rd index 10e5751658b..2003a5f9ab7 100644 --- a/man/adjacent_vertices.Rd +++ b/man/adjacent_vertices.Rd @@ -14,7 +14,7 @@ adjacent_vertices(graph, v, ..., mode = c("out", "in", "all", "total")) \item{...}{These dots are for future extensions and must be empty.} \item{mode}{Whether to query outgoing (\sQuote{out}), incoming (\sQuote{in}) edges, or both types (\sQuote{all}). -This is ignored for undirected graphs.} + This is ignored for undirected graphs.} } \value{ A list of vertex sequences. diff --git a/man/aging.ba.game.Rd b/man/aging.ba.game.Rd index 2f55e1e55e1..bfef94abbb2 100644 --- a/man/aging.ba.game.Rd +++ b/man/aging.ba.game.Rd @@ -30,37 +30,37 @@ aging.ba.game( see details below.} \item{m}{The number of edges each new vertex creates (except the very first vertex). -This argument is used only if both the \code{out.dist} and \code{out.seq} arguments are NULL.} + This argument is used only if both the \code{out.dist} and \code{out.seq} arguments are NULL.} \item{aging.bin}{The number of bins to use for measuring the age of vertices, see details below.} \item{out.dist}{The discrete distribution to generate the number of edges to add in each time step if \code{out.seq} is NULL. -See details below.} + See details below.} \item{out.seq}{The number of edges to add in each time step, a vector containing as many elements as the number of vertices. -See details below.} + See details below.} \item{out.pref}{Logical, whether to include edges not initiated by the vertex as a basis of preferential attachment. -See details below.} + See details below.} \item{directed}{Logical, whether to generate a directed graph. -See details below.} + See details below.} \item{zero.deg.appeal}{The degree-dependent part of the \sQuote{attractiveness} of the vertices with no adjacent edges. -See also details below.} + See also details below.} \item{zero.age.appeal}{The age-dependent part of the \sQuote{attrativeness} of the vertices with age zero. -It is usually zero, see details below.} + It is usually zero, see details below.} \item{deg.coef}{The coefficient of the degree-dependent \sQuote{attractiveness}. -See details below.} + See details below.} \item{age.coef}{The coefficient of the age-dependent part of the \sQuote{attractiveness}. -See details below.} + See details below.} \item{time.window}{Integer constant, if NULL only adjacent added in the last \code{time.windows} time steps are counted as a basis of the preferential attachment. -See also details below.} + See also details below.} } \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/aging.barabasi.game.Rd b/man/aging.barabasi.game.Rd index 949a62d3e0a..075ed30d08c 100644 --- a/man/aging.barabasi.game.Rd +++ b/man/aging.barabasi.game.Rd @@ -30,37 +30,37 @@ aging.barabasi.game( see details below.} \item{m}{The number of edges each new vertex creates (except the very first vertex). -This argument is used only if both the \code{out.dist} and \code{out.seq} arguments are NULL.} + This argument is used only if both the \code{out.dist} and \code{out.seq} arguments are NULL.} \item{aging.bin}{The number of bins to use for measuring the age of vertices, see details below.} \item{out.dist}{The discrete distribution to generate the number of edges to add in each time step if \code{out.seq} is NULL. -See details below.} + See details below.} \item{out.seq}{The number of edges to add in each time step, a vector containing as many elements as the number of vertices. -See details below.} + See details below.} \item{out.pref}{Logical, whether to include edges not initiated by the vertex as a basis of preferential attachment. -See details below.} + See details below.} \item{directed}{Logical, whether to generate a directed graph. -See details below.} + See details below.} \item{zero.deg.appeal}{The degree-dependent part of the \sQuote{attractiveness} of the vertices with no adjacent edges. -See also details below.} + See also details below.} \item{zero.age.appeal}{The age-dependent part of the \sQuote{attrativeness} of the vertices with age zero. -It is usually zero, see details below.} + It is usually zero, see details below.} \item{deg.coef}{The coefficient of the degree-dependent \sQuote{attractiveness}. -See details below.} + See details below.} \item{age.coef}{The coefficient of the age-dependent part of the \sQuote{attractiveness}. -See details below.} + See details below.} \item{time.window}{Integer constant, if NULL only adjacent added in the last \code{time.windows} time steps are counted as a basis of the preferential attachment. -See also details below.} + See also details below.} } \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/aging.prefatt.game.Rd b/man/aging.prefatt.game.Rd index e8090720a2d..0af9de3fa81 100644 --- a/man/aging.prefatt.game.Rd +++ b/man/aging.prefatt.game.Rd @@ -30,37 +30,37 @@ aging.prefatt.game( see details below.} \item{m}{The number of edges each new vertex creates (except the very first vertex). -This argument is used only if both the \code{out.dist} and \code{out.seq} arguments are NULL.} + This argument is used only if both the \code{out.dist} and \code{out.seq} arguments are NULL.} \item{aging.bin}{The number of bins to use for measuring the age of vertices, see details below.} \item{out.dist}{The discrete distribution to generate the number of edges to add in each time step if \code{out.seq} is NULL. -See details below.} + See details below.} \item{out.seq}{The number of edges to add in each time step, a vector containing as many elements as the number of vertices. -See details below.} + See details below.} \item{out.pref}{Logical, whether to include edges not initiated by the vertex as a basis of preferential attachment. -See details below.} + See details below.} \item{directed}{Logical, whether to generate a directed graph. -See details below.} + See details below.} \item{zero.deg.appeal}{The degree-dependent part of the \sQuote{attractiveness} of the vertices with no adjacent edges. -See also details below.} + See also details below.} \item{zero.age.appeal}{The age-dependent part of the \sQuote{attrativeness} of the vertices with age zero. -It is usually zero, see details below.} + It is usually zero, see details below.} \item{deg.coef}{The coefficient of the degree-dependent \sQuote{attractiveness}. -See details below.} + See details below.} \item{age.coef}{The coefficient of the age-dependent part of the \sQuote{attractiveness}. -See details below.} + See details below.} \item{time.window}{Integer constant, if NULL only adjacent added in the last \code{time.windows} time steps are counted as a basis of the preferential attachment. -See also details below.} + See also details below.} } \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/align_layout.Rd b/man/align_layout.Rd index 0a46dee5cdb..9a84b17e898 100644 --- a/man/align_layout.Rd +++ b/man/align_layout.Rd @@ -3,7 +3,7 @@ \name{align_layout} \alias{align_layout} \title{Align a vertex layout This function centers a vertex layout on the coordinate system origin and rotates the layout to achieve a visually pleasing alignment with the coordinate axes. -Doing this is particularly useful with force-directed layouts such as \code{\link[=layout_with_fr]{layout_with_fr()}}.} + Doing this is particularly useful with force-directed layouts such as \code{\link[=layout_with_fr]{layout_with_fr()}}.} \usage{ align_layout(graph, layout) } @@ -17,7 +17,7 @@ modified layout matrix } \description{ Align a vertex layout This function centers a vertex layout on the coordinate system origin and rotates the layout to achieve a visually pleasing alignment with the coordinate axes. -Doing this is particularly useful with force-directed layouts such as \code{\link[=layout_with_fr]{layout_with_fr()}}. + Doing this is particularly useful with force-directed layouts such as \code{\link[=layout_with_fr]{layout_with_fr()}}. } \section{Related documentation in the C library}{ \href{https://igraph.org/c/html/0.10.17/igraph-Layout.html#igraph_layout_align}{\code{layout_align()}} diff --git a/man/all_simple_paths.Rd b/man/all_simple_paths.Rd index d0b7cbca497..80734d68a8e 100644 --- a/man/all_simple_paths.Rd +++ b/man/all_simple_paths.Rd @@ -19,26 +19,26 @@ all_simple_paths( \item{from}{The source vertex.} \item{to}{The target vertex of vertices. -The default \code{NULL} selects all vertices.} + The default \code{NULL} selects all vertices.} \item{...}{These dots are for future extensions and must be empty.} \item{mode}{Character constant, gives whether the shortest paths to or from the given vertices should be calculated for directed graphs. -If \code{out} then the shortest paths \emph{from} the vertex, if \verb{in} then \emph{to} it will be considered. -If \code{all}, the default, then the corresponding undirected graph will be used, i.e. not directed paths are searched. -This argument is ignored for undirected graphs.} + If \code{out} then the shortest paths \emph{from} the vertex, if \verb{in} then \emph{to} it will be considered. + If \code{all}, the default, then the corresponding undirected graph will be used, i.e. not directed paths are searched. + This argument is ignored for undirected graphs.} \item{cutoff}{Maximum length of the paths that are considered. -If negative, no cutoff is used.} + If negative, no cutoff is used.} } \value{ A list of integer vectors, each integer vector is a path from the source vertex to one of the target vertices. -A path is given by its vertex IDs. + A path is given by its vertex IDs. } \description{ This function lists all simple paths from one source vertex to another vertex or vertices. -A path is simple if contains no repeated vertices. + A path is simple if contains no repeated vertices. } \details{ Note that potentially there are exponentially many paths between two vertices of a graph, diff --git a/man/alpha.centrality.Rd b/man/alpha.centrality.Rd index 838a80dca8f..5882b4dbb37 100644 --- a/man/alpha.centrality.Rd +++ b/man/alpha.centrality.Rd @@ -17,36 +17,36 @@ alpha.centrality( } \arguments{ \item{graph}{The input graph, can be directed or undirected. -In undirected graphs, edges are treated as if they were reciprocal directed ones.} + In undirected graphs, edges are treated as if they were reciprocal directed ones.} \item{nodes}{Vertex sequence, the vertices for which the alpha centrality values are returned. -The default \code{NULL} selects all vertices. -(For technical reasons they will be calculated for all vertices, anyway.)} + The default \code{NULL} selects all vertices. + (For technical reasons they will be calculated for all vertices, anyway.)} \item{alpha}{Parameter specifying the relative importance of endogenous versus exogenous factors in the determination of centrality. -See details below.} + See details below.} \item{loops}{Whether to eliminate loop edges from the graph before the calculation.} \item{exo}{The exogenous factors, in most cases this is either a constant -- the same factor for every node, or a vector giving the factor for every vertex. -Note that too long vectors will be truncated and too short vectors will be replicated to match the number of vertices.} + Note that too long vectors will be truncated and too short vectors will be replicated to match the number of vertices.} \item{weights}{One of the following: \itemize{ \item \code{NULL} (default): use the \code{weight} edge attribute if the graph has one, otherwise return a traditional (unweighted) adjacency matrix. -\item \code{NA}: explicitly unweighted, ignoring any \code{weight} edge attribute. -\item A numeric or logical vector of length \code{\link[=ecount]{ecount()}}: use these values directly as edge weights. -\item A character scalar: the name of an edge attribute whose values are used as weights. -The attribute must be numeric or logical. -} + \item \code{NA}: explicitly unweighted, ignoring any \code{weight} edge attribute. + \item A numeric or logical vector of length \code{\link[=ecount]{ecount()}}: use these values directly as edge weights. + \item A character scalar: the name of an edge attribute whose values are used as weights. + The attribute must be numeric or logical. + } If multiple edges share endpoints, the value of an arbitrarily chosen edge is included in the matrix.} \item{tol}{Tolerance for near-singularities during matrix inversion, see \code{\link[Matrix:solve]{Matrix::solve()}}.} \item{sparse}{Logical, whether to use sparse matrices for the calculation. -The \sQuote{Matrix} package is required for sparse matrix support} + The \sQuote{Matrix} package is required for sparse matrix support} } \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/alpha_centrality.Rd b/man/alpha_centrality.Rd index 6110d69668a..4bebdaeca99 100644 --- a/man/alpha_centrality.Rd +++ b/man/alpha_centrality.Rd @@ -18,38 +18,38 @@ alpha_centrality( } \arguments{ \item{graph}{The input graph, can be directed or undirected. -In undirected graphs, edges are treated as if they were reciprocal directed ones.} + In undirected graphs, edges are treated as if they were reciprocal directed ones.} \item{nodes}{Vertex sequence, the vertices for which the alpha centrality values are returned. -The default \code{NULL} selects all vertices. -(For technical reasons they will be calculated for all vertices, anyway.)} + The default \code{NULL} selects all vertices. + (For technical reasons they will be calculated for all vertices, anyway.)} \item{...}{These dots are for future extensions and must be empty.} \item{alpha}{Parameter specifying the relative importance of endogenous versus exogenous factors in the determination of centrality. -See details below.} + See details below.} \item{loops}{Whether to eliminate loop edges from the graph before the calculation.} \item{exo}{The exogenous factors, in most cases this is either a constant -- the same factor for every node, or a vector giving the factor for every vertex. -Note that too long vectors will be truncated and too short vectors will be replicated to match the number of vertices.} + Note that too long vectors will be truncated and too short vectors will be replicated to match the number of vertices.} \item{weights}{One of the following: \itemize{ \item \code{NULL} (default): use the \code{weight} edge attribute if the graph has one, otherwise return a traditional (unweighted) adjacency matrix. -\item \code{NA}: explicitly unweighted, ignoring any \code{weight} edge attribute. -\item A numeric or logical vector of length \code{\link[=ecount]{ecount()}}: use these values directly as edge weights. -\item A character scalar: the name of an edge attribute whose values are used as weights. -The attribute must be numeric or logical. -} + \item \code{NA}: explicitly unweighted, ignoring any \code{weight} edge attribute. + \item A numeric or logical vector of length \code{\link[=ecount]{ecount()}}: use these values directly as edge weights. + \item A character scalar: the name of an edge attribute whose values are used as weights. + The attribute must be numeric or logical. + } If multiple edges share endpoints, the value of an arbitrarily chosen edge is included in the matrix.} \item{tol}{Tolerance for near-singularities during matrix inversion, see \code{\link[Matrix:solve]{Matrix::solve()}}.} \item{sparse}{Logical, whether to use sparse matrices for the calculation. -The \sQuote{Matrix} package is required for sparse matrix support} + The \sQuote{Matrix} package is required for sparse matrix support} } \value{ A numeric vector contaning the centrality scores for the selected vertices. @@ -59,7 +59,7 @@ A numeric vector contaning the centrality scores for the selected vertices. } \details{ The alpha centrality measure can be considered as a generalization of eigenvector centrality to directed graphs. -It was proposed by Bonacich in 2001 (see reference below). + It was proposed by Bonacich in 2001 (see reference below). The alpha centrality of the vertices in a graph is defined as the solution of the following matrix equation: \deqn{x=\alpha A^T x+e,}{x=alpha t(A)x+e,} diff --git a/man/arpack.Rd b/man/arpack.Rd index 7b03b8744c0..e4686c9b402 100644 --- a/man/arpack.Rd +++ b/man/arpack.Rd @@ -20,40 +20,40 @@ arpack( } \arguments{ \item{func}{The function to perform the matrix-vector multiplication. -ARPACK requires to perform these by the user. -The function gets the vector \eqn{x} as the first argument, and it should return \eqn{Ax}, where \eqn{A} is the \dQuote{input matrix}. -(The input matrix is never given explicitly.) The second argument is \code{extra}.} + ARPACK requires to perform these by the user. + The function gets the vector \eqn{x} as the first argument, and it should return \eqn{Ax}, where \eqn{A} is the \dQuote{input matrix}. + (The input matrix is never given explicitly.) The second argument is \code{extra}.} \item{extra}{Extra argument to supply to \code{func}.} \item{sym}{Logical, whether the input matrix is symmetric. -Always supply \code{TRUE} here if it is, since it can speed up the computation.} + Always supply \code{TRUE} here if it is, since it can speed up the computation.} \item{options}{Options to ARPACK, a named list to overwrite some of the default option values. -See details below.} + See details below.} \item{env}{The environment in which \code{func} will be evaluated.} \item{complex}{Whether to convert the eigenvectors returned by ARPACK into R complex vectors. -By default this is not done for symmetric problems (these only have real eigenvectors/values), but only non-symmetric ones. -If you have a non-symmetric problem, but you're sure that the results will be real, then supply \code{FALSE} here.} + By default this is not done for symmetric problems (these only have real eigenvectors/values), but only non-symmetric ones. + If you have a non-symmetric problem, but you're sure that the results will be real, then supply \code{FALSE} here.} } \value{ A named list with the following members: \describe{ \item{values}{ Numeric vector, the desired eigenvalues. -} + } \item{vectors}{ Numeric matrix, the desired eigenvectors as columns. -If \code{complex=TRUE} (the default for non-symmetric problems), then the matrix is complex. -} + If \code{complex=TRUE} (the default for non-symmetric problems), then the matrix is complex. + } \item{options}{ A named list with the supplied \code{options} and some information about the performed calculation, including an ARPACK exit code. -See the details above. -} + See the details above. + } } } \description{ @@ -61,8 +61,8 @@ Interface to the ARPACK library for calculating eigenvectors of sparse matrices } \details{ ARPACK is a library for solving large scale eigenvalue problems. -The package is designed to compute a few eigenvalues and corresponding eigenvectors of a general \eqn{n} by \eqn{n} matrix \eqn{A}. -It is most appropriate for large sparse or structured matrices \eqn{A} + The package is designed to compute a few eigenvalues and corresponding eigenvectors of a general \eqn{n} by \eqn{n} matrix \eqn{A}. + It is most appropriate for large sparse or structured matrices \eqn{A} where structured means that a matrix-vector product \code{w <- Av} requires order \eqn{n} rather than the usual order \eqn{n^2} floating point operations. This function is an interface to ARPACK. igraph does not contain all ARPACK routines, @@ -70,145 +70,145 @@ only the ones dealing with symmetric and non-symmetric eigenvalue problems using The eigenvalue calculation in ARPACK (in the simplest case) involves the calculation of the \eqn{Av} product where \eqn{A} is the matrix we work with and \eqn{v} is an arbitrary vector. -The function supplied in the \code{fun} argument is expected to perform this product. -If the product can be done efficiently, e.g. if the matrix is sparse, + The function supplied in the \code{fun} argument is expected to perform this product. + If the product can be done efficiently, e.g. if the matrix is sparse, then \code{arpack()} is usually able to calculate the eigenvalues very quickly. The \code{options} argument specifies what kind of calculation to perform. -It is a list with the following members, they correspond directly to ARPACK parameters. -On input it has the following fields: + It is a list with the following members, they correspond directly to ARPACK parameters. + On input it has the following fields: \describe{ \item{bmat}{ Character constant, possible values: \sQuote{\code{I}}, standard eigenvalue problem, \eqn{Ax=\lambda x}{A*x=lambda*x}; and \sQuote{\code{G}}, generalized eigenvalue problem, \eqn{Ax=\lambda B x}{A*x=lambda B*x}. -Currently only \sQuote{\code{I}} is supported. -} + Currently only \sQuote{\code{I}} is supported. + } \item{n}{ Numeric scalar. The dimension of the eigenproblem. -You only need to set this if you call \code{\link[=arpack]{arpack()}} directly. -(I.e. not needed for \code{\link[=eigen_centrality]{eigen_centrality()}}, \code{\link[=page_rank]{page_rank()}}, etc.) + You only need to set this if you call \code{\link[=arpack]{arpack()}} directly. + (I.e. not needed for \code{\link[=eigen_centrality]{eigen_centrality()}}, \code{\link[=page_rank]{page_rank()}}, etc.) } \item{which}{ Specify which eigenvalues/vectors to compute, character constant with exactly two characters. -Possible values for symmetric input matrices: + Possible values for symmetric input matrices: \describe{ \item{"LA"}{ Compute \code{nev} largest (algebraic) eigenvalues. -} + } \item{"SA"}{ Compute \code{nev} smallest (algebraic) eigenvalues. -} + } \item{"LM"}{ Compute \code{nev} largest (in magnitude) eigenvalues. -} + } \item{"SM"}{ Compute \code{nev} smallest (in magnitude) eigenvalues. -} + } \item{"BE"}{ Compute \code{nev} eigenvalues, half from each end of the spectrum. -When \code{nev} is odd, compute one more from the high end than from the low end. -} + When \code{nev} is odd, compute one more from the high end than from the low end. + } } Possible values for non-symmetric input matrices: \describe{ \item{"LM"}{ Compute \code{nev} eigenvalues of largest magnitude. -} + } \item{"SM"}{ Compute \code{nev} eigenvalues of smallest magnitude. -} + } \item{"LR"}{ Compute \code{nev} eigenvalues of largest real part. -} + } \item{"SR"}{ Compute \code{nev} eigenvalues of smallest real part. -} + } \item{"LI"}{ Compute \code{nev} eigenvalues of largest imaginary part. -} + } \item{"SI"}{ Compute \code{nev} eigenvalues of smallest imaginary part. -} + } } This parameter is sometimes overwritten by the various functions, e.g. \code{\link[=page_rank]{page_rank()}} always sets \sQuote{\code{LM}}. -} + } \item{nev}{ Numeric scalar. The number of eigenvalues to be computed. -} + } \item{tol}{ Numeric scalar. -Stopping criterion: the relative accuracy of the Ritz value is considered acceptable + Stopping criterion: the relative accuracy of the Ritz value is considered acceptable if its error is less than \code{tol} times its estimated value. -If this is set to zero then machine precision is used. -} + If this is set to zero then machine precision is used. + } \item{ncv}{ Number of Lanczos vectors to be generated. -} + } \item{ldv}{ Numberic scalar. It should be set to zero in the current implementation. -} + } \item{ishift}{ Either zero or one. -If zero then the shifts are provided by the user via reverse communication. -If one then exact shifts with respect to the reduced tridiagonal matrix \eqn{T}. -Please always set this to one. -} + If zero then the shifts are provided by the user via reverse communication. + If one then exact shifts with respect to the reduced tridiagonal matrix \eqn{T}. + Please always set this to one. + } \item{maxiter}{ Maximum number of Arnoldi update iterations allowed. -} + } \item{nb}{ Blocksize to be used in the recurrence. Please always leave this on the default value, one. -} + } \item{mode}{ The type of the eigenproblem to be solved. -Possible values if the input matrix is symmetric: + Possible values if the input matrix is symmetric: \describe{ \item{1}{ \eqn{Ax=\lambda x}{A*x=lambda*x}, \eqn{A} is symmetric. -} + } \item{2}{ \eqn{Ax=\lambda Mx}{A*x=lambda*M*x}, \eqn{A} is symmetric, \eqn{M} is symmetric positive definite. -} + } \item{3}{ \eqn{Kx=\lambda Mx}{K*x=lambda*M*x}, \eqn{K} is symmetric, \eqn{M} is symmetric positive semi-definite. -} + } \item{4}{ \eqn{Kx=\lambda KGx}{K*x=lambda*KG*x}, \eqn{K} is symmetric positive semi-definite, \eqn{KG} is symmetric indefinite. -} + } \item{5}{ \eqn{Ax=\lambda Mx}{A*x=lambda*M*x}, \eqn{A} is symmetric, \eqn{M} is symmetric positive semi-definite. (Cayley transformed mode.) -} + } } Please note that only \code{mode==1} was tested and other values might not work properly. -Possible values if the input matrix is not symmetric: + Possible values if the input matrix is not symmetric: \describe{ \item{1}{ \eqn{Ax=\lambda x}{A*x=lambda*x}. -} + } \item{2}{ \eqn{Ax=\lambda Mx}{A*x=lambda*M*x}, \eqn{M} is symmetric positive definite. -} + } \item{3}{ \eqn{Ax=\lambda Mx}{A*x=lambda*M*x}, \eqn{M} is symmetric semi-definite. -} + } \item{4}{ \eqn{Ax=\lambda Mx}{A*x=lambda*M*x}, \eqn{M} is symmetric semi-definite. -} + } } Please note that only \code{mode==1} was tested and other values might not work properly. -} + } \item{start}{ Not used currently. Later it be used to set a starting vector. -} + } \item{sigma}{ Not used currently. -} + } \item{sigmai}{ Not use currently. -} + } } : @@ -220,35 +220,35 @@ Error flag of ARPACK. Possible values: \describe{ \item{0}{ Normal exit. -} + } \item{1}{ Maximum number of iterations taken. -} + } \item{3}{ No shifts could be applied during a cycle of the implicitly restarted Arnoldi iteration. -One possibility is to increase the size of \code{ncv} relative to \code{nev}. -} + One possibility is to increase the size of \code{ncv} relative to \code{nev}. + } } ARPACK can return more error conditions than these, but they are converted to regular igraph errors. -} + } \item{iter}{ Number of Arnoldi iterations taken. -} + } \item{nconv}{ Number of \dQuote{converged} Ritz values. -This represents the number of Ritz values that satisfy the convergence critetion. -} + This represents the number of Ritz values that satisfy the convergence critetion. + } \item{numop}{ Total number of matrix-vector multiplications. -} + } \item{numopb}{ Not used currently. -} + } \item{numreo}{ Total number of steps of re-orthogonalization. -} + } } Please see the ARPACK documentation for additional details. diff --git a/man/articulation.points.Rd b/man/articulation.points.Rd index b19d2625312..67fd9c22b44 100644 --- a/man/articulation.points.Rd +++ b/man/articulation.points.Rd @@ -8,7 +8,7 @@ articulation.points(graph) } \arguments{ \item{graph}{The input graph. -It is treated as an undirected graph, even if it is directed.} + It is treated as an undirected graph, even if it is directed.} } \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/articulation_points.Rd b/man/articulation_points.Rd index fec2f70dbcb..fbedb9108d4 100644 --- a/man/articulation_points.Rd +++ b/man/articulation_points.Rd @@ -11,20 +11,20 @@ bridges(graph) } \arguments{ \item{graph}{The input graph. -It is treated as an undirected graph, even if it is directed.} + It is treated as an undirected graph, even if it is directed.} } \value{ For \code{articulation_points()}, a numeric vector giving the vertex IDs of the articulation points of the input graph. -For \code{bridges()}, a numeric vector giving the edge IDs of the bridges of the input graph. + For \code{bridges()}, a numeric vector giving the edge IDs of the bridges of the input graph. } \description{ \code{articulation_points()} finds the articulation points (or cut vertices) } \details{ Articulation points or cut vertices are vertices whose removal increases the number of connected components in a graph. -Similarly, bridges or cut-edges are edges whose removal increases the number of connected components in a graph. -If the original graph was connected, then the removal of a single articulation point or a single bridge makes it disconnected. -If a graph contains no articulation points, then its vertex connectivity is at least + Similarly, bridges or cut-edges are edges whose removal increases the number of connected components in a graph. + If the original graph was connected, then the removal of a single articulation point or a single bridge makes it disconnected. + If a graph contains no articulation points, then its vertex connectivity is at least two. } \section{Related documentation in the C library}{ diff --git a/man/as.directed.Rd b/man/as.directed.Rd index c640691bb4c..1ab89ad6cf3 100644 --- a/man/as.directed.Rd +++ b/man/as.directed.Rd @@ -10,9 +10,9 @@ as.directed(graph, mode = c("mutual", "arbitrary", "random", "acyclic")) \item{graph}{The graph to convert.} \item{mode}{Character constant, defines the conversion algorithm. -For \code{as_directed()} it can be \code{mutual} or \code{arbitrary}. -For \code{as_undirected()} it can be \code{each}, \code{collapse} or \code{mutual}. -See details below.} + For \code{as_directed()} it can be \code{mutual} or \code{arbitrary}. + For \code{as_undirected()} it can be \code{each}, \code{collapse} or \code{mutual}. + See details below.} } \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/as.igraph.Rd b/man/as.igraph.Rd index 51afc706490..84f4769a0e2 100644 --- a/man/as.igraph.Rd +++ b/man/as.igraph.Rd @@ -11,7 +11,7 @@ as.igraph(x, ...) \item{x}{The object to convert.} \item{\dots}{Additional arguments. -None currently.} + None currently.} } \value{ All these functions return an igraph graph. @@ -21,7 +21,7 @@ These functions convert various objects to igraph graphs. } \details{ You can use \code{as.igraph()} to convert various objects to igraph graphs. -Right now the following objects are supported: \itemize{ \item codeigraphHRG + Right now the following objects are supported: \itemize{ \item codeigraphHRG These objects are created by the \code{\link[=fit_hrg]{fit_hrg()}} and \code{\link[=consensus_tree]{consensus_tree()}} functions. } } diff --git a/man/as.matrix.igraph.Rd b/man/as.matrix.igraph.Rd index 024ceeeda5b..0716f799156 100644 --- a/man/as.matrix.igraph.Rd +++ b/man/as.matrix.igraph.Rd @@ -21,11 +21,11 @@ Get adjacency or edgelist representation of the network stored as an \code{igrap } \details{ If \code{matrix.type} is \code{"edgelist"}, then a two-column numeric edge list matrix is returned. -The value of \code{attrname} is ignored. + The value of \code{attrname} is ignored. If \code{matrix.type} is \code{"adjacency"}, then a square adjacency matrix is returned. -For adjacency matrices, you can use the \code{attr} keyword argument to use the values of an edge attribute in the matrix cells. -See the documentation of \link{as_adjacency_matrix} for more details. + For adjacency matrices, you can use the \code{attr} keyword argument to use the values of an edge attribute in the matrix cells. + See the documentation of \link{as_adjacency_matrix} for more details. Other arguments passed through \code{...} are passed to either \code{\link[=as_adjacency_matrix]{as_adjacency_matrix()}} or \code{\link[=as_edgelist]{as_edgelist()}} depending on the value of \code{matrix.type}. } diff --git a/man/as.undirected.Rd b/man/as.undirected.Rd index 5eef609bdac..a2a72e2e75e 100644 --- a/man/as.undirected.Rd +++ b/man/as.undirected.Rd @@ -14,15 +14,15 @@ as.undirected( \item{graph}{The graph to convert.} \item{mode}{Character constant, defines the conversion algorithm. -For \code{as_directed()} it can be \code{mutual} or \code{arbitrary}. -For \code{as_undirected()} it can be \code{each}, \code{collapse} or \code{mutual}. -See details below.} + For \code{as_directed()} it can be \code{mutual} or \code{arbitrary}. + For \code{as_undirected()} it can be \code{each}, \code{collapse} or \code{mutual}. + See details below.} \item{edge.attr.comb}{Specifies what to do with edge attributes, if \code{mode="collapse"} or \code{mode="mutual"}. -In these cases many edges might be mapped to a single one in the new graph, and their attributes are combined. -Please see \code{\link[=attribute.combination]{attribute.combination()}} for details on this. -The default \code{NULL} uses the \code{edge.attr.comb} igraph option.} + In these cases many edges might be mapped to a single one in the new graph, and their attributes are combined. + Please see \code{\link[=attribute.combination]{attribute.combination()}} for details on this. + The default \code{NULL} uses the \code{edge.attr.comb} igraph option.} } \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/as_adj.Rd b/man/as_adj.Rd index ea8720617ad..b4a045afe91 100644 --- a/man/as_adj.Rd +++ b/man/as_adj.Rd @@ -18,34 +18,34 @@ as_adj( \item{graph}{The graph to convert.} \item{type}{Gives how to create the adjacency matrix for undirected graphs. -It is ignored for directed graphs. -Possible values: \code{upper}: the upper right triangle of the matrix is used, \code{lower}: the lower left triangle of the matrix is used. -\code{both}: the whole matrix is used, a symmetric matrix is returned.} + It is ignored for directed graphs. + Possible values: \code{upper}: the upper right triangle of the matrix is used, \code{lower}: the lower left triangle of the matrix is used. + \code{both}: the whole matrix is used, a symmetric matrix is returned.} \item{weights}{One of the following: \itemize{ \item \code{NULL} (default): use the \code{weight} edge attribute if the graph has one, otherwise return a traditional (unweighted) adjacency matrix. -\item \code{NA}: explicitly unweighted, ignoring any \code{weight} edge attribute. -\item A numeric or logical vector of length \code{\link[=ecount]{ecount()}}: use these values directly as edge weights. -\item A character scalar: the name of an edge attribute whose values are used as weights. -The attribute must be numeric or logical. -} + \item \code{NA}: explicitly unweighted, ignoring any \code{weight} edge attribute. + \item A numeric or logical vector of length \code{\link[=ecount]{ecount()}}: use these values directly as edge weights. + \item A character scalar: the name of an edge attribute whose values are used as weights. + The attribute must be numeric or logical. + } If multiple edges share endpoints, the value of an arbitrarily chosen edge is included in the matrix.} \item{attr}{\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} Use \code{weights} instead. -A character edge attribute name is forwarded to \code{weights} unchanged; \code{NULL} becomes \code{weights = NA}, + A character edge attribute name is forwarded to \code{weights} unchanged; \code{NULL} becomes \code{weights = NA}, since \code{attr = NULL} asked for a traditional unweighted matrix while \code{weights = NULL} picks the \code{weight} attribute up.} \item{edges}{\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} Logical, whether to return the edge IDs in the matrix. -For non-existant edges zero is returned.} + For non-existant edges zero is returned.} \item{names}{Logical, whether to assign row and column names to the matrix. -These are only assigned if the \code{name} vertex attribute is present in the graph.} + These are only assigned if the \code{name} vertex attribute is present in the graph.} \item{sparse}{Logical, whether to create a sparse matrix. -The \sQuote{\code{Matrix}} package must be installed for creating sparse matrices. -The default \code{NULL} uses the \code{sparsematrices} igraph option.} + The \sQuote{\code{Matrix}} package must be installed for creating sparse matrices. + The default \code{NULL} uses the \code{sparsematrices} igraph option.} } \description{ \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} We plan to remove \code{as_adj()} in favor of the more explicitly named \code{as_adjacency_matrix()} so please use \code{as_adjacency_matrix()} instead. diff --git a/man/as_adj_list.Rd b/man/as_adj_list.Rd index 602fd9b97a6..da00dbca613 100644 --- a/man/as_adj_list.Rd +++ b/man/as_adj_list.Rd @@ -26,12 +26,12 @@ as_adj_edge_list( \item{...}{These dots are for future extensions and must be empty.} \item{mode}{Character scalar, it gives what kind of adjacent edges/vertices to include in the lists. -\sQuote{\code{out}} is for outgoing edges/vertices, \sQuote{\verb{in}} is for incoming edges/vertices, \sQuote{\code{all}} is for both. -This argument is ignored for undirected graphs.} + \sQuote{\code{out}} is for outgoing edges/vertices, \sQuote{\verb{in}} is for incoming edges/vertices, \sQuote{\code{all}} is for both. + This argument is ignored for undirected graphs.} \item{loops}{Character scalar, one of \code{"ignore"} (to omit loops), \code{"twice"} (to include loop edges twice) and \code{"once"} (to include them once). -\code{"twice"} is not allowed for directed graphs and will be replaced with \code{"once"}.} + \code{"twice"} is not allowed for directed graphs and will be replaced with \code{"once"}.} \item{multiple}{Logical, set to \code{FALSE} to use only one representative of each set of parallel edges.} } diff --git a/man/as_adjacency_matrix.Rd b/man/as_adjacency_matrix.Rd index 7b7bbe04065..74127df2b2b 100644 --- a/man/as_adjacency_matrix.Rd +++ b/man/as_adjacency_matrix.Rd @@ -19,9 +19,9 @@ as_adjacency_matrix( \item{graph}{The graph to convert.} \item{type}{Gives how to create the adjacency matrix for undirected graphs. -It is ignored for directed graphs. -Possible values: \code{upper}: the upper right triangle of the matrix is used, \code{lower}: the lower left triangle of the matrix is used. -\code{both}: the whole matrix is used, a symmetric matrix is returned.} + It is ignored for directed graphs. + Possible values: \code{upper}: the upper right triangle of the matrix is used, \code{lower}: the lower left triangle of the matrix is used. + \code{both}: the whole matrix is used, a symmetric matrix is returned.} \item{...}{These dots are for future extensions and must be empty.} @@ -29,25 +29,25 @@ Possible values: \code{upper}: the upper right triangle of the matrix is used, \ \itemize{ \item \code{NULL} (default): use the \code{weight} edge attribute if the graph has one, otherwise return a traditional (unweighted) adjacency matrix. -\item \code{NA}: explicitly unweighted, ignoring any \code{weight} edge attribute. -\item A numeric or logical vector of length \code{\link[=ecount]{ecount()}}: use these values directly as edge weights. -\item A character scalar: the name of an edge attribute whose values are used as weights. -The attribute must be numeric or logical. -} + \item \code{NA}: explicitly unweighted, ignoring any \code{weight} edge attribute. + \item A numeric or logical vector of length \code{\link[=ecount]{ecount()}}: use these values directly as edge weights. + \item A character scalar: the name of an edge attribute whose values are used as weights. + The attribute must be numeric or logical. + } If multiple edges share endpoints, the value of an arbitrarily chosen edge is included in the matrix.} \item{names}{Logical, whether to assign row and column names to the matrix. -These are only assigned if the \code{name} vertex attribute is present in the graph.} + These are only assigned if the \code{name} vertex attribute is present in the graph.} \item{sparse}{Logical, whether to create a sparse matrix. -The \sQuote{\code{Matrix}} package must be installed for creating sparse matrices. -The default \code{NULL} uses the \code{sparsematrices} igraph option.} + The \sQuote{\code{Matrix}} package must be installed for creating sparse matrices. + The default \code{NULL} uses the \code{sparsematrices} igraph option.} \item{edges}{\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} Logical, whether to return the edge IDs in the matrix. -For non-existant edges zero is returned.} + For non-existant edges zero is returned.} \item{attr}{\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} Use \code{weights} instead. -A character edge attribute name is forwarded to \code{weights} unchanged; \code{NULL} becomes \code{weights = NA}, + A character edge attribute name is forwarded to \code{weights} unchanged; \code{NULL} becomes \code{weights = NA}, since \code{attr = NULL} asked for a traditional unweighted matrix while \code{weights = NULL} picks the \code{weight} attribute up.} } \value{ diff --git a/man/as_biadjacency_matrix.Rd b/man/as_biadjacency_matrix.Rd index 270ad0843bc..13d5e097d19 100644 --- a/man/as_biadjacency_matrix.Rd +++ b/man/as_biadjacency_matrix.Rd @@ -16,10 +16,10 @@ as_biadjacency_matrix( } \arguments{ \item{graph}{The input graph. -The direction of the edges is ignored in directed graphs.} + The direction of the edges is ignored in directed graphs.} \item{types}{An optional vertex type vector to use instead of the \code{type} vertex attribute. -You must supply this argument if the graph has no \code{type} vertex attribute.} + You must supply this argument if the graph has no \code{type} vertex attribute.} \item{...}{These dots are for future extensions and must be empty.} @@ -27,21 +27,21 @@ You must supply this argument if the graph has no \code{type} vertex attribute.} \itemize{ \item \code{NULL} (default): use the \code{weight} edge attribute if the graph has one, otherwise return a traditional (unweighted) adjacency matrix. -\item \code{NA}: explicitly unweighted, ignoring any \code{weight} edge attribute. -\item A numeric or logical vector of length \code{\link[=ecount]{ecount()}}: use these values directly as edge weights. -\item A character scalar: the name of an edge attribute whose values are used as weights. -The attribute must be numeric or logical. -} + \item \code{NA}: explicitly unweighted, ignoring any \code{weight} edge attribute. + \item A numeric or logical vector of length \code{\link[=ecount]{ecount()}}: use these values directly as edge weights. + \item A character scalar: the name of an edge attribute whose values are used as weights. + The attribute must be numeric or logical. + } If multiple edges share endpoints, the value of an arbitrarily chosen edge is included in the matrix.} \item{names}{Logical, if \code{TRUE} and the vertices in the graph are named (i.e. the graph has a vertex attribute called \code{name}), then vertex names will be added to the result as row and column names. -Otherwise the IDs of the vertices are used as row and column names.} + Otherwise the IDs of the vertices are used as row and column names.} \item{sparse}{Logical, if it is \code{TRUE} then a sparse matrix is created, you will need the \code{Matrix} package for this.} \item{attr}{\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} Use \code{weights} instead. -A character edge attribute name is forwarded to \code{weights} unchanged; \code{NULL} becomes \code{weights = NA}, + A character edge attribute name is forwarded to \code{weights} unchanged; \code{NULL} becomes \code{weights = NA}, since \code{attr = NULL} asked for a traditional unweighted matrix while \code{weights = NULL} picks the \code{weight} attribute up.} } \value{ @@ -49,7 +49,7 @@ A sparse or dense matrix. } \description{ This function can return a sparse or dense bipartite adjacency matrix of a bipartite network. -The bipartite adjacency matrix is an \eqn{n} times \eqn{m} matrix, \eqn{n} and \eqn{m} are the number of vertices of the two kinds. + The bipartite adjacency matrix is an \eqn{n} times \eqn{m} matrix, \eqn{n} and \eqn{m} are the number of vertices of the two kinds. } \details{ Bipartite graphs have a \code{type} vertex attribute in igraph, diff --git a/man/as_directed.Rd b/man/as_directed.Rd index d0290250524..fb8352cf39b 100644 --- a/man/as_directed.Rd +++ b/man/as_directed.Rd @@ -19,15 +19,15 @@ as_undirected( \item{...}{These dots are for future extensions and must be empty.} \item{mode}{Character constant, defines the conversion algorithm. -For \code{as_directed()} it can be \code{mutual} or \code{arbitrary}. -For \code{as_undirected()} it can be \code{each}, \code{collapse} or \code{mutual}. -See details below.} + For \code{as_directed()} it can be \code{mutual} or \code{arbitrary}. + For \code{as_undirected()} it can be \code{each}, \code{collapse} or \code{mutual}. + See details below.} \item{edge.attr.comb}{Specifies what to do with edge attributes, if \code{mode="collapse"} or \code{mode="mutual"}. -In these cases many edges might be mapped to a single one in the new graph, and their attributes are combined. -Please see \code{\link[=attribute.combination]{attribute.combination()}} for details on this. -The default \code{NULL} uses the \code{edge.attr.comb} igraph option.} + In these cases many edges might be mapped to a single one in the new graph, and their attributes are combined. + Please see \code{\link[=attribute.combination]{attribute.combination()}} for details on this. + The default \code{NULL} uses the \code{edge.attr.comb} igraph option.} } \value{ A new graph object. @@ -44,20 +44,20 @@ The number of edges in the graph stays the same, an arbitrarily directed edge is created for each undirected edge, but the direction of the edge is deterministic (i.e. it always points the same way if you call the function multiple times). -} + } \item{"mutual"}{ Two directed edges are created for each undirected edge, one in each direction. -} + } \item{"random"}{ The number of edges in the graph stays the same, and a randomly directed edge is created for each undirected edge. -You will get different results if you call the function multiple times with the same graph. -} + You will get different results if you call the function multiple times with the same graph. + } \item{"acyclic"}{ The number of edges in the graph stays the same, and a directed edge is created for each undirected edge such that the resulting graph is guaranteed to be acyclic. -This is achieved by ensuring that edges always point from a lower index vertex to a higher index. -Note that the graph may include cycles of length 1 if the original graph contained loop edges. -} + This is achieved by ensuring that edges always point from a lower index vertex to a higher index. + Note that the graph may include cycles of length 1 if the original graph contained loop edges. + } } Conversion algorithms for \code{as_undirected()}: @@ -66,17 +66,17 @@ Conversion algorithms for \code{as_undirected()}: The number of edges remains constant, an undirected edge is created for each directed one, this version might create graphs with multiple edges. -} + } \item{"collapse"}{ One undirected edge will be created for each pair of vertices which are connected with at least one directed edge, no multiple edges will be created. -} + } \item{"mutual"}{ One undirected edge will be created for each pair of mutual edges. -Non-mutual edges are ignored. -This mode might create multiple edges if there are more than one mutual edge pairs between the same pair of vertices. -} + Non-mutual edges are ignored. + This mode might create multiple edges if there are more than one mutual edge pairs between the same pair of vertices. + } } } \section{Related documentation in the C library}{ diff --git a/man/as_graphnel.Rd b/man/as_graphnel.Rd index faf1f8a35c0..a8e10f42d34 100644 --- a/man/as_graphnel.Rd +++ b/man/as_graphnel.Rd @@ -14,13 +14,13 @@ as_graphnel(graph) } \description{ The graphNEL class is defined in the \code{graph} package, it is another way to represent graphs. -These functions are provided to convert between the igraph and the graphNEL objects. + These functions are provided to convert between the igraph and the graphNEL objects. } \details{ \code{as_graphnel()} converts an igraph graph to a graphNEL graph. -It converts all graph/vertex/edge attributes. -If the igraph graph has a vertex attribute \sQuote{\code{name}}, then it will be used to assign vertex names in the graphNEL graph. -Otherwise numeric igraph vertex IDs will be used for this purpose. + It converts all graph/vertex/edge attributes. + If the igraph graph has a vertex attribute \sQuote{\code{name}}, then it will be used to assign vertex names in the graphNEL graph. + Otherwise numeric igraph vertex IDs will be used for this purpose. } \section{Related documentation in the C library}{ \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_get_edgelist}{\code{get_edgelist()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_is_directed}{\code{is_directed()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_edges}{\code{edges()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_has_multiple}{\code{has_multiple()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_get_eids}{\code{get_eids()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_ecount}{\code{ecount()}} diff --git a/man/as_long_data_frame.Rd b/man/as_long_data_frame.Rd index 142f7a2012d..c89cb8f9167 100644 --- a/man/as_long_data_frame.Rd +++ b/man/as_long_data_frame.Rd @@ -14,10 +14,10 @@ A long data frame. } \description{ A long data frame contains all metadata about both the vertices and edges of the graph. -It contains one row for each edge, and all metadata about that edge and its incident vertices are included in that row. -The names of the columns that contain the metadata of the incident vertices are prefixed with \code{from_} and \code{to_}. -The first two columns are always named \code{from} and \code{to} and they contain the numeric IDs of the incident vertices. -The rows are listed in the order of numeric vertex IDs. + It contains one row for each edge, and all metadata about that edge and its incident vertices are included in that row. + The names of the columns that contain the metadata of the incident vertices are prefixed with \code{from_} and \code{to_}. + The first two columns are always named \code{from} and \code{to} and they contain the numeric IDs of the incident vertices. + The rows are listed in the order of numeric vertex IDs. } \section{Related documentation in the C library}{ \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_get_edgelist}{\code{get_edgelist()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}} diff --git a/man/assortativity.Rd b/man/assortativity.Rd index 0714ee3f9a0..f8753dbce80 100644 --- a/man/assortativity.Rd +++ b/man/assortativity.Rd @@ -29,24 +29,24 @@ assortativity_degree(graph, ..., directed = TRUE) \item{...}{These dots are for future extensions and must be empty.} \item{values.in}{A second value vector to use for the incoming edges when calculating assortativity for a directed graph. -Supply \code{NULL} here if you want to use the same values for outgoing and incoming edges. -This argument is ignored (with a warning) if it is not \code{NULL} and undirected assortativity coefficient is being calculated.} + Supply \code{NULL} here if you want to use the same values for outgoing and incoming edges. + This argument is ignored (with a warning) if it is not \code{NULL} and undirected assortativity coefficient is being calculated.} \item{directed}{Logical, whether to consider edge directions for directed graphs. -This argument is ignored for undirected graphs. -Supply \code{TRUE} here to do the natural thing, + This argument is ignored for undirected graphs. + Supply \code{TRUE} here to do the natural thing, i.e. use directed version of the measure for directed graphs and the undirected version for undirected graphs.} \item{normalized}{Logical, whether to compute the normalized assortativity. -The non-normalized nominal assortativity is identical to modularity. -The non-normalized value-based assortativity is simply the covariance of the values at the two ends of edges.} + The non-normalized nominal assortativity is identical to modularity. + The non-normalized value-based assortativity is simply the covariance of the values at the two ends of edges.} \item{types1, types2}{\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} Deprecated aliases for \code{values} and \code{values.in}, respectively.} \item{types}{Vector giving the vertex types. -They as assumed to be integer numbers, starting with one. -Non-integer values are converted to integers with \code{\link[=as.integer]{as.integer()}}. -Character vectors are converted to integers using \code{\link[=as.factor]{as.factor()}}.} + They as assumed to be integer numbers, starting with one. + Non-integer values are converted to integers with \code{\link[=as.integer]{as.integer()}}. + Character vectors are converted to integers using \code{\link[=as.factor]{as.factor()}}.} } \value{ A single real number. @@ -57,12 +57,12 @@ and negative otherwise. } \details{ The assortativity coefficient measures the level of homophyly of the graph, based on some vertex labeling or values assigned to vertices. -If the coefficient is high, that means that connected vertices tend to have the same labels or similar assigned values. + If the coefficient is high, that means that connected vertices tend to have the same labels or similar assigned values. M.E.J. Newman defined two kinds of assortativity coefficients, the first one is for categorical labels of vertices. -\code{assortativity_nominal()} calculates this measure. -It is defined as + \code{assortativity_nominal()} calculates this measure. + It is defined as \deqn{r=\frac{\sum_i e_{ii}-\sum_i a_i b_i}{1-\sum_i a_i b_i}}{ r=(sum(e(i,i), i) - sum(a(i)b(i), i)) / (1 - sum(a(i)b(i), i))} @@ -71,8 +71,8 @@ where \eqn{e_{ij}}{e(i,j)} is the fraction of edges connecting vertices of type \eqn{a_i=\sum_j e_{ij}}{a(i)=sum(e(i,j), j)} and \eqn{b_j=\sum_i e_{ij}}{b(j)=sum(e(i,j), i)}. The second assortativity variant is based on values assigned to the vertices. -\code{assortativity()} calculates this measure. -It is defined as + \code{assortativity()} calculates this measure. + It is defined as \deqn{r=\frac1{\sigma_q^2}\sum_{jk} jk(e_{jk}-q_j q_k)}{ sum(jk(e(j,k)-q(j)q(k)), j, k) / sigma(q)^2} @@ -83,7 +83,7 @@ for undirected graphs (\eqn{q_i=\sum_j e_{ij}}{q(i)=sum(e(i,j), j)}) and as sum(jk(e(j,k)-qout(j)qin(k)), j, k) / sigma(qin) / sigma(qout) } for directed ones. -Here \eqn{q_i^o=\sum_j e_{ij}}{qout(i)=sum(e(i,j), j)}, \eqn{q_i^i=\sum_j e_{ji}}{qin(i)=sum(e(j,i), j)}, moreover, + Here \eqn{q_i^o=\sum_j e_{ij}}{qout(i)=sum(e(i,j), j)}, \eqn{q_i^i=\sum_j e_{ji}}{qin(i)=sum(e(j,i), j)}, moreover, \eqn{\sigma_q}{\sigma(q)}, \eqn{\sigma_o}{\sigma(qout)} and \eqn{\sigma_i}{\sigma(qin)} are the standard deviations of \eqn{q}, \eqn{q^o}{qout} and \eqn{q^i}{qin}, respectively. @@ -93,7 +93,7 @@ so it is possible to assign different values to the outgoing and the incoming en \code{assortativity_degree()} uses vertex degree as vertex values and calls \code{assortativity()}. Undirected graphs are effectively treated as directed ones with all-reciprocal edges. -Thus, self-loops are taken into account twice in undirected graphs. + Thus, self-loops are taken into account twice in undirected graphs. } \section{Related documentation in the C library}{ \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_assortativity}{\code{assortativity()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_assortativity_nominal}{\code{assortativity_nominal()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_assortativity_degree}{\code{assortativity_degree()}} @@ -109,7 +109,7 @@ assortativity_degree(sample_pa(10000, m = 4)) } \references{ M. E. J. Newman: Mixing patterns in networks, \emph{Phys. Rev. -E} 67, 026126 (2003) \url{https://arxiv.org/abs/cond-mat/0209450} + E} 67, 026126 (2003) \url{https://arxiv.org/abs/cond-mat/0209450} M. E. J. Newman: Assortative mixing in networks, \emph{Phys. Rev. Lett.} 89, 208701 (2002) \url{https://arxiv.org/abs/cond-mat/0205405} diff --git a/man/assortativity.degree.Rd b/man/assortativity.degree.Rd index 1bad9439091..8aca71b2d41 100644 --- a/man/assortativity.degree.Rd +++ b/man/assortativity.degree.Rd @@ -10,8 +10,8 @@ assortativity.degree(graph, directed = TRUE) \item{graph}{The input graph, it can be directed or undirected.} \item{directed}{Logical, whether to consider edge directions for directed graphs. -This argument is ignored for undirected graphs. -Supply \code{TRUE} here to do the natural thing, + This argument is ignored for undirected graphs. + Supply \code{TRUE} here to do the natural thing, i.e. use directed version of the measure for directed graphs and the undirected version for undirected graphs.} } \description{ diff --git a/man/assortativity.nominal.Rd b/man/assortativity.nominal.Rd index 06e3c7d468d..ca6476701e1 100644 --- a/man/assortativity.nominal.Rd +++ b/man/assortativity.nominal.Rd @@ -10,18 +10,18 @@ assortativity.nominal(graph, types, directed = TRUE, normalized = TRUE) \item{graph}{The input graph, it can be directed or undirected.} \item{types}{Vector giving the vertex types. -They as assumed to be integer numbers, starting with one. -Non-integer values are converted to integers with \code{\link[=as.integer]{as.integer()}}. -Character vectors are converted to integers using \code{\link[=as.factor]{as.factor()}}.} + They as assumed to be integer numbers, starting with one. + Non-integer values are converted to integers with \code{\link[=as.integer]{as.integer()}}. + Character vectors are converted to integers using \code{\link[=as.factor]{as.factor()}}.} \item{directed}{Logical, whether to consider edge directions for directed graphs. -This argument is ignored for undirected graphs. -Supply \code{TRUE} here to do the natural thing, + This argument is ignored for undirected graphs. + Supply \code{TRUE} here to do the natural thing, i.e. use directed version of the measure for directed graphs and the undirected version for undirected graphs.} \item{normalized}{Logical, whether to compute the normalized assortativity. -The non-normalized nominal assortativity is identical to modularity. -The non-normalized value-based assortativity is simply the covariance of the values at the two ends of edges.} + The non-normalized nominal assortativity is identical to modularity. + The non-normalized value-based assortativity is simply the covariance of the values at the two ends of edges.} } \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/asymmetric.preference.game.Rd b/man/asymmetric.preference.game.Rd index ec836b9a55f..2d1cc58d6c7 100644 --- a/man/asymmetric.preference.game.Rd +++ b/man/asymmetric.preference.game.Rd @@ -18,12 +18,12 @@ asymmetric.preference.game( \item{types}{The number of different vertex types.} \item{type.dist.matrix}{The joint distribution of the in- and out-vertex types. -The default \code{NULL} gives a uniform distribution.} + The default \code{NULL} gives a uniform distribution.} \item{pref.matrix}{A square matrix giving the preferences of the vertex types. -The matrix has \sQuote{types} rows and columns. -When generating an undirected graph, it must be symmetric. -The default \code{NULL} sets all preferences to one.} + The matrix has \sQuote{types} rows and columns. + When generating an undirected graph, it must be symmetric. + The default \code{NULL} sets all preferences to one.} \item{loops}{Logical, whether self-loops are allowed in the graph.} } diff --git a/man/authority.score.Rd b/man/authority.score.Rd index bb82bb5e03d..29aae6fcff6 100644 --- a/man/authority.score.Rd +++ b/man/authority.score.Rd @@ -15,15 +15,15 @@ authority.score( \item{graph}{The input graph.} \item{scale}{Logical, whether to scale the result to have a maximum score of one. -If no scaling is used then the result vector has unit length in the Euclidean norm.} + If no scaling is used then the result vector has unit length in the Euclidean norm.} \item{weights}{Optional positive weight vector for calculating weighted scores. -If the graph has a \code{weight} edge attribute, then this is used by default. -This function interprets edge weights as connection strengths. -In the random surfer model, an edge with a larger weight is more likely to be selected by the surfer.} + If the graph has a \code{weight} edge attribute, then this is used by default. + This function interprets edge weights as connection strengths. + In the random surfer model, an edge with a larger weight is more likely to be selected by the surfer.} \item{options}{A named list, to override some ARPACK options. -See \code{\link[=arpack]{arpack()}} for details.} + See \code{\link[=arpack]{arpack()}} for details.} } \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/autocurve.edges.Rd b/man/autocurve.edges.Rd index 59f11bc39d4..8af62e6b45e 100644 --- a/man/autocurve.edges.Rd +++ b/man/autocurve.edges.Rd @@ -10,7 +10,7 @@ autocurve.edges(graph, start = 0.5) \item{graph}{The input graph.} \item{start}{The curvature at the two extreme edges. -All edges will have a curvature between \code{-start} and \code{start}, spaced equally.} + All edges will have a curvature between \code{-start} and \code{start}, spaced equally.} } \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/automorphism_group.Rd b/man/automorphism_group.Rd index b4a53d0c3b0..a943a98d0b2 100644 --- a/man/automorphism_group.Rd +++ b/man/automorphism_group.Rd @@ -17,14 +17,14 @@ automorphism_group( \item{colors}{The colors of the individual vertices of the graph; only vertices having the same color are allowed to match each other in an automorphism. -When omitted, igraph uses the \code{color} attribute of the vertices, or, if there is no such vertex attribute, + When omitted, igraph uses the \code{color} attribute of the vertices, or, if there is no such vertex attribute, it simply assumes that all vertices have the same color. -Pass NULL explicitly if the graph has a \code{color} vertex attribute but you do not want to use it.} + Pass NULL explicitly if the graph has a \code{color} vertex attribute but you do not want to use it.} \item{...}{These dots are for future extensions and must be empty.} \item{sh}{The splitting heuristics for the BLISS algorithm. -Possible values are: \sQuote{\code{f}}: + Possible values are: \sQuote{\code{f}}: first non-singleton cell, \sQuote{\code{fl}}: first largest non-singleton cell, @@ -44,15 +44,15 @@ first smallest maximally non-trivially connected non-singleton cell.} \value{ When \code{details} is \code{FALSE}, a list of vertex permutations that form a generating set of the automorphism group of the input graph. -When \code{details} is \code{TRUE}, a named list with two members: + When \code{details} is \code{TRUE}, a named list with two members: \describe{ \item{generators}{ Returns the generators themselves } \item{info}{ Additional information about the BLISS internals. -See \code{\link[=count_automorphisms]{count_automorphisms()}} for more details. -} + See \code{\link[=count_automorphisms]{count_automorphisms()}} for more details. + } } } \description{ @@ -60,12 +60,12 @@ Compute the generating set of the automorphism group of a graph. } \details{ An automorphism of a graph is a permutation of its vertices which brings the graph into itself. -The automorphisms of a graph form a group and there exists a subset of this group (i.e. a set of permutations) such that every other permutation can be expressed as a combination of these permutations. -These permutations are called the generating set of the automorphism group. + The automorphisms of a graph form a group and there exists a subset of this group (i.e. a set of permutations) such that every other permutation can be expressed as a combination of these permutations. + These permutations are called the generating set of the automorphism group. This function calculates a possible generating set of the automorphism of a graph using the BLISS algorithm. -See also the BLISS homepage at \url{http://www.tcs.hut.fi/Software/bliss/index.html}. -The calculated generating set is not necessarily minimal, and it may depend on the splitting heuristics used by BLISS. + See also the BLISS homepage at \url{http://www.tcs.hut.fi/Software/bliss/index.html}. + The calculated generating set is not necessarily minimal, and it may depend on the splitting heuristics used by BLISS. } \section{Related documentation in the C library}{ \href{https://igraph.org/c/html/0.10.17/igraph-Isomorphism.html#igraph_automorphism_group}{\code{automorphism_group()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}} diff --git a/man/automorphisms.Rd b/man/automorphisms.Rd index 96573de3f3f..dbc64678c0f 100644 --- a/man/automorphisms.Rd +++ b/man/automorphisms.Rd @@ -15,12 +15,12 @@ automorphisms( \item{colors}{The colors of the individual vertices of the graph; only vertices having the same color are allowed to match each other in an automorphism. -When omitted, igraph uses the \code{color} attribute of the vertices, or, if there is no such vertex attribute, + When omitted, igraph uses the \code{color} attribute of the vertices, or, if there is no such vertex attribute, it simply assumes that all vertices have the same color. -Pass NULL explicitly if the graph has a \code{color} vertex attribute but you do not want to use it.} + Pass NULL explicitly if the graph has a \code{color} vertex attribute but you do not want to use it.} \item{sh}{The splitting heuristics for the BLISS algorithm. -Possible values are: \sQuote{\code{f}}: + Possible values are: \sQuote{\code{f}}: first non-singleton cell, \sQuote{\code{fl}}: first largest non-singleton cell, diff --git a/man/average.path.length.Rd b/man/average.path.length.Rd index adbdd4d7494..1c73dafe74d 100644 --- a/man/average.path.length.Rd +++ b/man/average.path.length.Rd @@ -16,19 +16,19 @@ average.path.length( \item{graph}{The graph to work on.} \item{weights}{Possibly a numeric vector giving edge weights. -If this is \code{NULL} and the graph has a \code{weight} edge attribute, then the attribute is used. -If this is \code{NA} then no weights are used (even if the graph has a \code{weight} attribute). -In a weighted graph, the length of a path is the sum of the weights of its constituent edges.} + If this is \code{NULL} and the graph has a \code{weight} edge attribute, then the attribute is used. + If this is \code{NA} then no weights are used (even if the graph has a \code{weight} attribute). + In a weighted graph, the length of a path is the sum of the weights of its constituent edges.} \item{directed}{Whether to consider directed paths in directed graphs, this argument is ignored for undirected graphs.} \item{unconnected}{What to do if the graph is unconnected (not strongly connected if directed paths are considered). -If TRUE, only the lengths of the existing paths are considered and averaged; if FALSE, + If TRUE, only the lengths of the existing paths are considered and averaged; if FALSE, the length of the missing paths are considered as having infinite length, making the mean distance infinite as well.} \item{details}{Whether to provide additional details in the result. -Functions accepting this argument (like \code{mean_distance()}) return additional information like the number of disconnected vertex pairs in the result + Functions accepting this argument (like \code{mean_distance()}) return additional information like the number of disconnected vertex pairs in the result when this parameter is set to \code{TRUE}.} } \description{ diff --git a/man/ba.game.Rd b/man/ba.game.Rd index e362ba0e21e..07dffcdb7dd 100644 --- a/man/ba.game.Rd +++ b/man/ba.game.Rd @@ -27,33 +27,33 @@ i.e. linear preferential attachment.} defaults to 1. This argument is only used if both \code{out.dist} and \code{out.seq} are omitted or NULL.} \item{out.dist}{Numeric vector, the distribution of the number of edges to add in each time step. -This argument is only used if the \code{out.seq} argument is omitted or NULL.} + This argument is only used if the \code{out.seq} argument is omitted or NULL.} \item{out.seq}{Numeric vector giving the number of edges to add in each time step. -Its first element is ignored as no edges are added in the first time step.} + Its first element is ignored as no edges are added in the first time step.} \item{out.pref}{Logical, if true the total degree is used for calculating the citation probability, otherwise the in-degree is used.} \item{zero.appeal}{The \sQuote{attractiveness} of the vertices with no adjacent edges. -See details below.} + See details below.} \item{directed}{Whether to create a directed graph.} \item{algorithm}{The algorithm to use for the graph generation. -\code{psumtree} uses a partial prefix-sum tree to generate the graph, + \code{psumtree} uses a partial prefix-sum tree to generate the graph, this algorithm can handle any \code{power} and \code{zero.appeal} values and never generates multiple edges. -\code{psumtree-multiple} also uses a partial prefix-sum tree, but the generation of multiple edges is allowed. -Before the 0.6 version igraph used this algorithm if \code{power} was not one, or \code{zero.appeal} was not one. -\code{bag} is the algorithm that was previously (before version 0.6) used if \code{power} was one and \code{zero.appeal} was one as well. -It works by putting the IDs of the vertices into a bag (multiset, really), exactly as many times as their (in-)degree, plus once more. -Then the required number of cited vertices are drawn from the bag, with replacement. -This method might generate multiple edges. -It only works if \code{power} and \code{zero.appeal} are equal one.} + \code{psumtree-multiple} also uses a partial prefix-sum tree, but the generation of multiple edges is allowed. + Before the 0.6 version igraph used this algorithm if \code{power} was not one, or \code{zero.appeal} was not one. + \code{bag} is the algorithm that was previously (before version 0.6) used if \code{power} was one and \code{zero.appeal} was one as well. + It works by putting the IDs of the vertices into a bag (multiset, really), exactly as many times as their (in-)degree, plus once more. + Then the required number of cited vertices are drawn from the bag, with replacement. + This method might generate multiple edges. + It only works if \code{power} and \code{zero.appeal} are equal one.} \item{start.graph}{\code{NULL} or an igraph graph. -If a graph, then the supplied graph is used as a starting graph for the preferential attachment algorithm. -The graph should have at least one vertex. -If a graph is supplied here and the \code{out.seq} argument is not \code{NULL}, then it should contain the out degrees of the new vertices only, + If a graph, then the supplied graph is used as a starting graph for the preferential attachment algorithm. + The graph should have at least one vertex. + If a graph is supplied here and the \code{out.seq} argument is not \code{NULL}, then it should contain the out degrees of the new vertices only, not the ones in the \code{start.graph}.} } \description{ diff --git a/man/barabasi.game.Rd b/man/barabasi.game.Rd index 00e70a02fe7..87022ab3abf 100644 --- a/man/barabasi.game.Rd +++ b/man/barabasi.game.Rd @@ -27,33 +27,33 @@ i.e. linear preferential attachment.} defaults to 1. This argument is only used if both \code{out.dist} and \code{out.seq} are omitted or NULL.} \item{out.dist}{Numeric vector, the distribution of the number of edges to add in each time step. -This argument is only used if the \code{out.seq} argument is omitted or NULL.} + This argument is only used if the \code{out.seq} argument is omitted or NULL.} \item{out.seq}{Numeric vector giving the number of edges to add in each time step. -Its first element is ignored as no edges are added in the first time step.} + Its first element is ignored as no edges are added in the first time step.} \item{out.pref}{Logical, if true the total degree is used for calculating the citation probability, otherwise the in-degree is used.} \item{zero.appeal}{The \sQuote{attractiveness} of the vertices with no adjacent edges. -See details below.} + See details below.} \item{directed}{Whether to create a directed graph.} \item{algorithm}{The algorithm to use for the graph generation. -\code{psumtree} uses a partial prefix-sum tree to generate the graph, + \code{psumtree} uses a partial prefix-sum tree to generate the graph, this algorithm can handle any \code{power} and \code{zero.appeal} values and never generates multiple edges. -\code{psumtree-multiple} also uses a partial prefix-sum tree, but the generation of multiple edges is allowed. -Before the 0.6 version igraph used this algorithm if \code{power} was not one, or \code{zero.appeal} was not one. -\code{bag} is the algorithm that was previously (before version 0.6) used if \code{power} was one and \code{zero.appeal} was one as well. -It works by putting the IDs of the vertices into a bag (multiset, really), exactly as many times as their (in-)degree, plus once more. -Then the required number of cited vertices are drawn from the bag, with replacement. -This method might generate multiple edges. -It only works if \code{power} and \code{zero.appeal} are equal one.} + \code{psumtree-multiple} also uses a partial prefix-sum tree, but the generation of multiple edges is allowed. + Before the 0.6 version igraph used this algorithm if \code{power} was not one, or \code{zero.appeal} was not one. + \code{bag} is the algorithm that was previously (before version 0.6) used if \code{power} was one and \code{zero.appeal} was one as well. + It works by putting the IDs of the vertices into a bag (multiset, really), exactly as many times as their (in-)degree, plus once more. + Then the required number of cited vertices are drawn from the bag, with replacement. + This method might generate multiple edges. + It only works if \code{power} and \code{zero.appeal} are equal one.} \item{start.graph}{\code{NULL} or an igraph graph. -If a graph, then the supplied graph is used as a starting graph for the preferential attachment algorithm. -The graph should have at least one vertex. -If a graph is supplied here and the \code{out.seq} argument is not \code{NULL}, then it should contain the out degrees of the new vertices only, + If a graph, then the supplied graph is used as a starting graph for the preferential attachment algorithm. + The graph should have at least one vertex. + If a graph is supplied here and the \code{out.seq} argument is not \code{NULL}, then it should contain the out degrees of the new vertices only, not the ones in the \code{start.graph}.} } \description{ diff --git a/man/betweenness.Rd b/man/betweenness.Rd index 094484f06fa..2edf719a77f 100644 --- a/man/betweenness.Rd +++ b/man/betweenness.Rd @@ -30,30 +30,30 @@ edge_betweenness( \item{graph}{The graph to analyze.} \item{v}{The vertices for which the vertex betweenness will be calculated. -The default \code{NULL} selects all vertices.} + The default \code{NULL} selects all vertices.} \item{...}{These dots are for future extensions and must be empty.} \item{directed}{Logical, whether directed paths should be considered while determining the shortest paths.} \item{weights}{Optional positive weight vector for calculating weighted betweenness. -If the graph has a \code{weight} edge attribute, then this is used by default. -Weights are used to calculate weighted shortest paths, so they are interpreted as distances.} + If the graph has a \code{weight} edge attribute, then this is used by default. + Weights are used to calculate weighted shortest paths, so they are interpreted as distances.} \item{normalized}{Logical, whether to normalize the betweenness scores. -If \code{TRUE}, + If \code{TRUE}, then the results are normalized by the number of ordered or unordered vertex pairs in directed and undirected graphs, respectively. -In an undirected graph, + In an undirected graph, \deqn{B^n=\frac{2B}{(n-1)(n-2)},}{Bnorm=2 B / ((n-1)(n-2)),} where \eqn{B^n}{Bnorm} is the normalized, \eqn{B} the raw betweenness, and \eqn{n} is the number of vertices in the graph. -Note that the same normalization factor is used even when setting a \code{cutoff} on the considered shortest path lengths, + Note that the same normalization factor is used even when setting a \code{cutoff} on the considered shortest path lengths, even though the number of vertex pairs reachable from each other may be less than \eqn{(n-1)(n-2)/2}.} \item{cutoff}{The maximum shortest path length to consider when calculating betweenness. -If negative, then there is no such limit.} + If negative, then there is no such limit.} \item{e}{The edges for which the edge betweenness will be calculated. -The default \code{NULL} selects all edges.} + The default \code{NULL} selects all edges.} } \value{ A numeric vector with the betweenness score for each vertex in \code{v} for \code{betweenness()}. @@ -80,8 +80,8 @@ while \eqn{g_{ivj}} is the number of those shortest paths which pass though vert Both functions allow you to consider only paths of length \code{cutoff} or smaller; this can be run for larger graphs, as the running time is not quadratic (if \code{cutoff} is small). -If \code{cutoff} is negative (the default), then the function calculates the exact betweenness scores. -Since igraph 1.6.0, a \code{cutoff} value of zero is treated literally, i.e. paths of length larger than zero are ignored. + If \code{cutoff} is negative (the default), then the function calculates the exact betweenness scores. + Since igraph 1.6.0, a \code{cutoff} value of zero is treated literally, i.e. paths of length larger than zero are ignored. For calculating the betweenness a similar algorithm to the one proposed by Brandes (see References) is used. } @@ -102,11 +102,11 @@ edge_betweenness(g) \references{ Freeman, L.C. (1979). Centrality in Social Networks I: Conceptual Clarification. \emph{Social Networks}, 1, 215-239. -\doi{10.1016/0378-8733(78)90021-7} + \doi{10.1016/0378-8733(78)90021-7} Ulrik Brandes, A Faster Algorithm for Betweenness Centrality. \emph{Journal of Mathematical Sociology} 25(2):163-177, 2001. -\doi{10.1080/0022250X.2001.9990249} + \doi{10.1080/0022250X.2001.9990249} } \seealso{ \code{\link[=closeness]{closeness()}}, \code{\link[=degree]{degree()}}, \code{\link[=harmonic_centrality]{harmonic_centrality()}} diff --git a/man/bfs.Rd b/man/bfs.Rd index abc62f2006c..5fd6c8f60bc 100644 --- a/man/bfs.Rd +++ b/man/bfs.Rd @@ -28,24 +28,24 @@ bfs( \item{graph}{The input graph.} \item{root}{Numeric vector, usually of length one. -The root vertex, or root vertices to start the search from. -When several roots are given, they are considered in the order they appear. -If a root vertex was already reached while searching from an earlier root, no separate search is started from it, + The root vertex, or root vertices to start the search from. + When several roots are given, they are considered in the order they appear. + If a root vertex was already reached while searching from an earlier root, no separate search is started from it, so it keeps the distance it was first found at rather than \code{0}.} \item{mode}{For directed graphs specifies the type of edges to follow. -\sQuote{out} follows outgoing, \sQuote{in} incoming edges. -\sQuote{all} ignores edge directions completely. -\sQuote{total} is a synonym for \sQuote{all}. -This argument is ignored for undirected graphs.} + \sQuote{out} follows outgoing, \sQuote{in} incoming edges. + \sQuote{all} ignores edge directions completely. + \sQuote{total} is a synonym for \sQuote{all}. + This argument is ignored for undirected graphs.} \item{...}{These dots are for future extensions and must be empty.} \item{unreachable}{Logical, whether the search should visit the vertices that are unreachable from the given root vertex (or vertices). -If \code{TRUE}, then additional searches are performed until all vertices are visited.} + If \code{TRUE}, then additional searches are performed until all vertices are visited.} \item{restricted}{\code{NULL} (=no restriction), or a vector of vertices (IDs or symbolic names). -In the latter case, the search is restricted to the given vertices.} + In the latter case, the search is restricted to the given vertices.} \item{order}{Logical, whether to return the ordering of the vertices.} @@ -60,15 +60,15 @@ In the latter case, the search is restricted to the given vertices.} \item{dist}{Logical, whether to return the distance from the root of the search tree.} \item{callback}{Callback function. -This is called whenever a vertex is visited. -The callback function should return \code{FALSE} to continue the search or \code{TRUE} to stop it. -See details below. -Default: \code{NULL}.} + This is called whenever a vertex is visited. + The callback function should return \code{FALSE} to continue the search or \code{TRUE} to stop it. + See details below. + Default: \code{NULL}.} \item{extra}{Additional argument to supply to the callback function.} \item{rho}{The environment in which the callback function is evaluated. -The default \code{NULL} uses the caller's environment.} + The default \code{NULL} uses the caller's environment.} \item{neimode}{\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} This argument is deprecated from igraph 1.3.0; use \code{mode} instead.} @@ -79,42 +79,42 @@ A named list with the following entries: \describe{ \item{root}{ Numeric vector. -The root vertex (or vertices) that was used as the starting point of the search, as supplied in the \code{root} argument. -} + The root vertex (or vertices) that was used as the starting point of the search, as supplied in the \code{root} argument. + } \item{neimode}{ Character scalar. The \code{mode} argument of the function call. -Note that for undirected graphs this is always \sQuote{all}, irrespectively of the supplied value. -} + Note that for undirected graphs this is always \sQuote{all}, irrespectively of the supplied value. + } \item{order}{ The vertex IDs, in the order in which they were visited by the search. -A vertex sequence (\code{igraph.vs}), or a numeric vector if the + A vertex sequence (\code{igraph.vs}), or a numeric vector if the \code{return.vs.es} option (see \code{\link[=igraph_options]{igraph_options()}}) is \code{FALSE}. -} + } \item{rank}{ Numeric vector. The rank for each vertex, zero for unreachable vertices. -} + } \item{parent}{ The parent of each vertex, i.e. the vertex it was discovered from. -A vertex sequence (\code{igraph.vs}), or a numeric vector if the + A vertex sequence (\code{igraph.vs}), or a numeric vector if the \code{return.vs.es} option is \code{FALSE}. -} + } \item{father}{ Like parent, kept for compatibility for now. -} + } \item{pred}{ The previously visited vertex for each vertex, or 0 if there was no such vertex. -A vertex sequence (\code{igraph.vs}), or a numeric vector if the + A vertex sequence (\code{igraph.vs}), or a numeric vector if the \code{return.vs.es} option is \code{FALSE}. -} + } \item{succ}{ The next vertex that was visited after the current one, or 0 if there was no such vertex. -A vertex sequence (\code{igraph.vs}), or a numeric vector if the + A vertex sequence (\code{igraph.vs}), or a numeric vector if the \code{return.vs.es} option is \code{FALSE}. -} + } \item{dist}{ Numeric vector, for each vertex its distance from the root of the search tree. -Unreachable vertices have a negative distance as of igraph 1.6.0, this used to be \code{NaN}. -} + Unreachable vertices have a negative distance as of igraph 1.6.0, this used to be \code{NaN}. + } } Note that \code{order}, \code{rank}, \code{parent}, \code{pred}, \code{succ} and \code{dist} might be \code{NULL} if their corresponding argument is \code{FALSE}, @@ -122,14 +122,14 @@ i.e. if their calculation is not requested. } \description{ Breadth-first search is an algorithm to traverse a graph. -We start from a root vertex and spread along every edge \dQuote{simultaneously}. + We start from a root vertex and spread along every edge \dQuote{simultaneously}. } \details{ The callback function must have the following arguments: \describe{ \item{graph}{ The input graph is passed to the callback function here. -} + } \item{data}{ A named numeric vector, with the following entries: \sQuote{vid}, the vertex that was just visited, @@ -137,14 +137,14 @@ A named numeric vector, with the following entries: \sQuote{succ}, its successor (zero if this is the last vertex), \sQuote{rank}, the rank of the current vertex, \sQuote{dist}, its distance from the root of the search tree. -} + } \item{extra}{ The extra argument. -} + } } The callback must return \code{FALSE} to continue the search or \code{TRUE} to terminate it. -See examples below on how to use the callback function. + See examples below on how to use the callback function. } \section{Related documentation in the C library}{ \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}} diff --git a/man/biconnected.components.Rd b/man/biconnected.components.Rd index c01d9268061..83891962649 100644 --- a/man/biconnected.components.Rd +++ b/man/biconnected.components.Rd @@ -8,7 +8,7 @@ biconnected.components(graph) } \arguments{ \item{graph}{The input graph. -It is treated as an undirected graph, even if it is directed.} + It is treated as an undirected graph, even if it is directed.} } \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/biconnected_components.Rd b/man/biconnected_components.Rd index ef28df2183f..a0e3d668281 100644 --- a/man/biconnected_components.Rd +++ b/man/biconnected_components.Rd @@ -8,28 +8,28 @@ biconnected_components(graph) } \arguments{ \item{graph}{The input graph. -It is treated as an undirected graph, even if it is directed.} + It is treated as an undirected graph, even if it is directed.} } \value{ A named list with three components: \describe{ \item{no}{ Numeric scalar, an integer giving the number of biconnected components in the graph. -} + } \item{tree_edges}{ The components themselves, a list of numeric vectors. -Each vector is a set of edge IDs giving the edges in a biconnected component. -These edges define a spanning tree of the component. -} + Each vector is a set of edge IDs giving the edges in a biconnected component. + These edges define a spanning tree of the component. + } \item{component_edges}{ A list of numeric vectors. It gives all edges in the components. -} + } \item{components}{ A list of numeric vectors, the vertices of the components. -} + } \item{articulation_points}{ The articulation points of the graph. See \code{\link[=articulation_points]{articulation_points()}}. -} + } } } \description{ @@ -39,9 +39,9 @@ Finding the biconnected components of a graph A graph is biconnected if the removal of any single vertex (and its adjacent edges) does not disconnect it. A biconnected component of a graph is a maximal biconnected subgraph of it. -The biconnected components of a graph can be given by the partition of its edges: + The biconnected components of a graph can be given by the partition of its edges: every edge is a member of exactly one biconnected component. -Note that this is not true for vertices: the same vertex can be part of many biconnected components. + Note that this is not true for vertices: the same vertex can be part of many biconnected components. } \section{Related documentation in the C library}{ \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_biconnected_components}{\code{biconnected_components()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_edges}{\code{edges()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_get_eids}{\code{get_eids()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_ecount}{\code{ecount()}} diff --git a/man/bipartite.projection.Rd b/man/bipartite.projection.Rd index fd5473fbe2d..dae42fdd6a8 100644 --- a/man/bipartite.projection.Rd +++ b/man/bipartite.projection.Rd @@ -15,27 +15,27 @@ bipartite.projection( } \arguments{ \item{graph}{The input graph. -It can be directed, but edge directions are ignored during the computation.} + It can be directed, but edge directions are ignored during the computation.} \item{types}{An optional vertex type vector to use instead of the \sQuote{\code{type}} vertex attribute. -You must supply this argument if the graph has no \sQuote{\code{type}} vertex attribute.} + You must supply this argument if the graph has no \sQuote{\code{type}} vertex attribute.} \item{multiplicity}{If \code{TRUE}, then igraph keeps the multiplicity of the edges as an edge attribute called \sQuote{weight}. -E.g. if there is an A-C-B and also an A-D-B triple in the bipartite graph (but no more X, such that A-X-B is also in the graph), + E.g. if there is an A-C-B and also an A-D-B triple in the bipartite graph (but no more X, such that A-X-B is also in the graph), then the multiplicity of the A-B edge in the projection will be 2.} \item{probe1}{This argument can be used to specify the order of the projections in the resulting list. -If given, then it is considered as a vertex ID (or a symbolic vertex name); + If given, then it is considered as a vertex ID (or a symbolic vertex name); the projection containing this vertex will be the first one in the result list. -This argument is ignored if only one projection is requested in argument \code{which}.} + This argument is ignored if only one projection is requested in argument \code{which}.} \item{which}{A character scalar to specify which projection(s) to calculate. -The default is to calculate both.} + The default is to calculate both.} \item{remove.type}{Logical, whether to remove the \code{type} vertex attribute from the projections. -This makes sense because these graphs are not bipartite any more. -However if you want to combine them with each other (or other bipartite graphs), then it is worth keeping this attribute. -By default it will be removed.} + This makes sense because these graphs are not bipartite any more. + However if you want to combine them with each other (or other bipartite graphs), then it is worth keeping this attribute. + By default it will be removed.} } \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/bipartite.projection.size.Rd b/man/bipartite.projection.size.Rd index 15bd86020ad..72e81c2daf9 100644 --- a/man/bipartite.projection.size.Rd +++ b/man/bipartite.projection.size.Rd @@ -8,10 +8,10 @@ bipartite.projection.size(graph, types = NULL) } \arguments{ \item{graph}{The input graph. -It can be directed, but edge directions are ignored during the computation.} + It can be directed, but edge directions are ignored during the computation.} \item{types}{An optional vertex type vector to use instead of the \sQuote{\code{type}} vertex attribute. -You must supply this argument if the graph has no \sQuote{\code{type}} vertex attribute.} + You must supply this argument if the graph has no \sQuote{\code{type}} vertex attribute.} } \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/bipartite.random.game.Rd b/man/bipartite.random.game.Rd index e9566046711..3aeaedcdb08 100644 --- a/man/bipartite.random.game.Rd +++ b/man/bipartite.random.game.Rd @@ -21,23 +21,23 @@ bipartite.random.game( \item{type}{Character scalar, the type of the graph, \sQuote{gnp} creates a \eqn{G(n,p)} graph, \sQuote{gnm} creates a \eqn{G(n,m)} graph. -See details below.} + See details below.} \item{p}{Real scalar, connection probability for \eqn{G(n,p)} graphs. -Should not be given for \eqn{G(n,m)} graphs.} + Should not be given for \eqn{G(n,m)} graphs.} \item{m}{Integer scalar, the number of edges for \eqn{G(n,m)} graphs. -Should not be given for \eqn{G(n,p)} graphs.} + Should not be given for \eqn{G(n,p)} graphs.} \item{directed}{Logical, whether to create a directed graph. -See also the \code{mode} argument.} + See also the \code{mode} argument.} \item{mode}{Character scalar, specifies how to direct the edges in directed graphs. -If it is \sQuote{out}, then directed edges point from bottom vertices to top vertices. -If it is \sQuote{in}, edges point from top vertices to bottom vertices. -\sQuote{out} and \sQuote{in} do not generate mutual edges. -If this argument is \sQuote{all}, then each edge direction is considered independently and mutual edges might be generated. -This argument is ignored for undirected graphs.} + If it is \sQuote{out}, then directed edges point from bottom vertices to top vertices. + If it is \sQuote{in}, edges point from top vertices to bottom vertices. + \sQuote{out} and \sQuote{in} do not generate mutual edges. + If this argument is \sQuote{all}, then each edge direction is considered independently and mutual edges might be generated. + This argument is ignored for undirected graphs.} } \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/bipartite_mapping.Rd b/man/bipartite_mapping.Rd index c7e1adfd0c9..af29ebcf9c7 100644 --- a/man/bipartite_mapping.Rd +++ b/man/bipartite_mapping.Rd @@ -14,11 +14,11 @@ A named list with two elements: \describe{ \item{res}{ A logical scalar, \code{TRUE} if the can be bipartite, \code{FALSE} otherwise. -} + } \item{type}{ A possible vertex type mapping, a logical vector. -If no such mapping exists, then an empty vector. -} + If no such mapping exists, then an empty vector. + } } } \description{ @@ -28,11 +28,11 @@ This function decides whether the vertices of a network can be mapped to two ver A bipartite graph in igraph has a \sQuote{\code{type}} vertex attribute giving the two vertex types. This function simply checks whether a graph \emph{could} be bipartite. -It tries to find a mapping that gives a possible division of the vertices into two classes, + It tries to find a mapping that gives a possible division of the vertices into two classes, such that no two vertices of the same class are connected by an edge. The existence of such a mapping is equivalent of having no circuits of odd length in the graph. -A graph with loop edges cannot bipartite. + A graph with loop edges cannot bipartite. Note that the mapping is not necessarily unique, e.g. if the graph has at least two components, then the vertices in the separate components can be mapped independently. diff --git a/man/bipartite_projection.Rd b/man/bipartite_projection.Rd index 1e307d4a497..0ca4e2d1a72 100644 --- a/man/bipartite_projection.Rd +++ b/man/bipartite_projection.Rd @@ -19,33 +19,33 @@ bipartite_projection_size(graph, types = NULL) } \arguments{ \item{graph}{The input graph. -It can be directed, but edge directions are ignored during the computation.} + It can be directed, but edge directions are ignored during the computation.} \item{types}{An optional vertex type vector to use instead of the \sQuote{\code{type}} vertex attribute. -You must supply this argument if the graph has no \sQuote{\code{type}} vertex attribute.} + You must supply this argument if the graph has no \sQuote{\code{type}} vertex attribute.} \item{...}{These dots are for future extensions and must be empty.} \item{multiplicity}{If \code{TRUE}, then igraph keeps the multiplicity of the edges as an edge attribute called \sQuote{weight}. -E.g. if there is an A-C-B and also an A-D-B triple in the bipartite graph (but no more X, such that A-X-B is also in the graph), + E.g. if there is an A-C-B and also an A-D-B triple in the bipartite graph (but no more X, such that A-X-B is also in the graph), then the multiplicity of the A-B edge in the projection will be 2.} \item{probe1}{This argument can be used to specify the order of the projections in the resulting list. -If given, then it is considered as a vertex ID (or a symbolic vertex name); + If given, then it is considered as a vertex ID (or a symbolic vertex name); the projection containing this vertex will be the first one in the result list. -This argument is ignored if only one projection is requested in argument \code{which}.} + This argument is ignored if only one projection is requested in argument \code{which}.} \item{which}{A character scalar to specify which projection(s) to calculate. -The default is to calculate both.} + The default is to calculate both.} \item{remove.type}{Logical, whether to remove the \code{type} vertex attribute from the projections. -This makes sense because these graphs are not bipartite any more. -However if you want to combine them with each other (or other bipartite graphs), then it is worth keeping this attribute. -By default it will be removed.} + This makes sense because these graphs are not bipartite any more. + However if you want to combine them with each other (or other bipartite graphs), then it is worth keeping this attribute. + By default it will be removed.} } \value{ A list of two undirected graphs. -See details above. + See details above. } \description{ A bipartite graph is projected into two one-mode networks @@ -56,11 +56,11 @@ this is boolean and \code{FALSE} for the vertices of the first kind and \code{TR \code{bipartite_projection_size()} calculates the number of vertices and edges in the two projections of the bipartite graphs, without calculating the projections themselves. -This is useful to check how much memory the projections would need if you have a large bipartite graph. + This is useful to check how much memory the projections would need if you have a large bipartite graph. \code{bipartite_projection()} calculates the actual projections. -You can use the \code{probe1} argument to specify the order of the projections in the result. -By default vertex type \code{FALSE} is the first and \code{TRUE} is the second. + You can use the \code{probe1} argument to specify the order of the projections in the result. + By default vertex type \code{FALSE} is the first and \code{TRUE} is the second. \code{bipartite_projection()} keeps vertex attributes. } diff --git a/man/blockGraphs.Rd b/man/blockGraphs.Rd index 137a003bb61..808bd001f2a 100644 --- a/man/blockGraphs.Rd +++ b/man/blockGraphs.Rd @@ -8,8 +8,8 @@ blockGraphs(blocks, graph) } \arguments{ \item{graph}{For \code{cohesive_blocks()} a graph object of class \code{igraph}. -It must be undirected and simple. -(See \code{\link[=is_simple]{is_simple()}}.) + It must be undirected and simple. + (See \code{\link[=is_simple]{is_simple()}}.) For \code{graphs_from_cohesive_blocks()} and \code{export_pajek()} the same graph must be supplied whose cohesive block structure is given in the \code{blocks()} argument.} } diff --git a/man/bonpow.Rd b/man/bonpow.Rd index d3e08a77e65..f2a6658c07a 100644 --- a/man/bonpow.Rd +++ b/man/bonpow.Rd @@ -18,12 +18,12 @@ bonpow( \item{graph}{the input graph.} \item{nodes}{vertex sequence indicating which vertices are to be included in the calculation. -The default \code{NULL} selects all vertices.} + The default \code{NULL} selects all vertices.} \item{loops}{Logical indicating whether or not the diagonal should be treated as valid data. -Set this true if and only + Set this true if and only if the data can contain loops. -\code{loops} is \code{FALSE} by default.} + \code{loops} is \code{FALSE} by default.} \item{exponent}{exponent (decay rate) for the Bonacich power centrality score; can be negative} @@ -32,7 +32,7 @@ if the data can contain loops. \item{tol}{tolerance for near-singularities during matrix inversion (see \code{\link[Matrix:solve]{Matrix::solve()}})} \item{sparse}{Logical, whether to use sparse matrices for the calculation. -The \sQuote{Matrix} package is required for sparse matrix support} + The \sQuote{Matrix} package is required for sparse matrix support} } \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/c.igraph.es.Rd b/man/c.igraph.es.Rd index d8150cdcca6..fc6f4f625a1 100644 --- a/man/c.igraph.es.Rd +++ b/man/c.igraph.es.Rd @@ -8,7 +8,7 @@ } \arguments{ \item{...}{The edge sequences to concatenate. -They must all refer to the same graph.} + They must all refer to the same graph.} \item{recursive}{Ignored, included for S3 compatibility with the base \code{c} function.} } diff --git a/man/c.igraph.vs.Rd b/man/c.igraph.vs.Rd index 79d3ae393e2..3cac71b0ded 100644 --- a/man/c.igraph.vs.Rd +++ b/man/c.igraph.vs.Rd @@ -8,7 +8,7 @@ } \arguments{ \item{...}{The vertex sequences to concatenate. -They must refer to the same graph.} + They must refer to the same graph.} \item{recursive}{Ignored, included for S3 compatibility with the base \code{c} function.} } diff --git a/man/callaway.traits.game.Rd b/man/callaway.traits.game.Rd index bd0c0c5b622..0862043a71f 100644 --- a/man/callaway.traits.game.Rd +++ b/man/callaway.traits.game.Rd @@ -21,12 +21,12 @@ callaway.traits.game( \item{edge.per.step}{The number of edges to add to the graph per time step.} \item{type.dist}{The distribution of the vertex types. -This is assumed to be stationary in time. -The default \code{NULL} gives a uniform distribution.} + This is assumed to be stationary in time. + The default \code{NULL} gives a uniform distribution.} \item{pref.matrix}{A matrix giving the preferences of the given vertex types. -These should be probabilities, i.e. numbers between zero and one. -The default \code{NULL} sets all preferences to one.} + These should be probabilities, i.e. numbers between zero and one. + The default \code{NULL} sets all preferences to one.} \item{directed}{Logical, whether to generate directed graphs.} } diff --git a/man/canonical.permutation.Rd b/man/canonical.permutation.Rd index b24e8d44958..b1d569a8103 100644 --- a/man/canonical.permutation.Rd +++ b/man/canonical.permutation.Rd @@ -15,12 +15,12 @@ canonical.permutation( \item{colors}{The colors of the individual vertices of the graph; only vertices having the same color are allowed to match each other in an automorphism. -When omitted, igraph uses the \code{color} attribute of the vertices, or, if there is no such vertex attribute, + When omitted, igraph uses the \code{color} attribute of the vertices, or, if there is no such vertex attribute, it simply assumes that all vertices have the same color. -Pass NULL explicitly if the graph has a \code{color} vertex attribute but you do not want to use it.} + Pass NULL explicitly if the graph has a \code{color} vertex attribute but you do not want to use it.} \item{sh}{Type of the heuristics to use for the BLISS algorithm. -See details for possible values.} + See details for possible values.} } \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/canonical_permutation.Rd b/man/canonical_permutation.Rd index 4154cb98c59..3748fc973a6 100644 --- a/man/canonical_permutation.Rd +++ b/man/canonical_permutation.Rd @@ -16,45 +16,45 @@ canonical_permutation( \item{colors}{The colors of the individual vertices of the graph; only vertices having the same color are allowed to match each other in an automorphism. -When omitted, igraph uses the \code{color} attribute of the vertices, or, if there is no such vertex attribute, + When omitted, igraph uses the \code{color} attribute of the vertices, or, if there is no such vertex attribute, it simply assumes that all vertices have the same color. -Pass NULL explicitly if the graph has a \code{color} vertex attribute but you do not want to use it.} + Pass NULL explicitly if the graph has a \code{color} vertex attribute but you do not want to use it.} \item{...}{These dots are for future extensions and must be empty.} \item{sh}{Type of the heuristics to use for the BLISS algorithm. -See details for possible values.} + See details for possible values.} } \value{ A list with the following members: \describe{ \item{labeling}{ The canonical permutation which takes the input graph into canonical form. -A numeric vector, the first element is the new label of vertex 0, the second element for vertex 1, etc. + A numeric vector, the first element is the new label of vertex 0, the second element for vertex 1, etc. } \item{info}{ Some information about the BLISS computation. A named list with the following members: \describe{ \item{"nof_nodes"}{ The number of nodes in the search tree. -} + } \item{"nof_leaf_nodes"}{ The number of leaf nodes in the search tree. -} + } \item{"nof_bad_nodes"}{ Number of bad nodes. -} + } \item{"nof_canupdates"}{ Number of canrep updates. -} + } \item{"max_level"}{ Maximum level. -} + } \item{"group_size"}{ The size of the automorphism group of the input graph, as a string. -The string representation is necessary because the group size + The string representation is necessary because the group size can easily exceed values that are exactly representable in floating point. -} + } } } } @@ -64,31 +64,31 @@ The canonical permutation brings every isomorphic graphs into the same (labeled) } \details{ \code{canonical_permutation()} computes a permutation which brings the graph into canonical form, as defined by the BLISS algorithm. -All isomorphic graphs have the same canonical form. + All isomorphic graphs have the same canonical form. See the paper below for the details about BLISS. -This and more information is available at \url{http://www.tcs.hut.fi/Software/bliss/index.html}. + This and more information is available at \url{http://www.tcs.hut.fi/Software/bliss/index.html}. The possible values for the \code{sh} argument are: \describe{ \item{"f"}{ First non-singleton cell. -} + } \item{"fl"}{ First largest non-singleton cell. -} + } \item{"fs"}{ First smallest non-singleton cell. -} + } \item{"fm"}{ First maximally non-trivially connectec non-singleton cell. -} + } \item{"flm"}{ Largest maximally non-trivially connected non-singleton cell. -} + } \item{"fsm"}{ Smallest maximally non-trivially connected non-singleton cell. -} + } } See the paper in references for details about these. } diff --git a/man/categorical_pal.Rd b/man/categorical_pal.Rd index a4342b70ac2..fb54645db1c 100644 --- a/man/categorical_pal.Rd +++ b/man/categorical_pal.Rd @@ -8,14 +8,14 @@ categorical_pal(n) } \arguments{ \item{n}{The number of colors in the palette. -We simply take the first \code{n} colors from the total 8.} + We simply take the first \code{n} colors from the total 8.} } \value{ A character vector of RGB color codes. } \description{ This is a color blind friendly palette from \url{https://jfly.uni-koeln.de/color/}. -It has 8 colors. + It has 8 colors. } \details{ This is the suggested palette for visualizations where vertex colors mark categories, e.g. community membership. diff --git a/man/centr_betw.Rd b/man/centr_betw.Rd index 092674a897c..02884f1b096 100644 --- a/man/centr_betw.Rd +++ b/man/centr_betw.Rd @@ -14,24 +14,24 @@ centr_betw(graph, ..., directed = TRUE, normalized = TRUE) \item{directed}{Logical, whether to use directed shortest paths for calculating betweenness.} \item{normalized}{Logical. -Whether to normalize the graph level centrality score by dividing by the theoretical maximum.} + Whether to normalize the graph level centrality score by dividing by the theoretical maximum.} } \value{ A named list with the following components: \describe{ \item{res}{ The node-level centrality scores. -} + } \item{centralization}{ The graph level centrality index. -} + } \item{theoretical_max}{ The maximum theoretical graph level centralization score for a graph with the given number of vertices, using the same parameters. -If the \code{normalized} argument was \code{TRUE}, + If the \code{normalized} argument was \code{TRUE}, then the result was divided by this number. -} + } } } \description{ diff --git a/man/centr_betw_tmax.Rd b/man/centr_betw_tmax.Rd index 1ed8694ac38..5a5bda358ef 100644 --- a/man/centr_betw_tmax.Rd +++ b/man/centr_betw_tmax.Rd @@ -8,15 +8,15 @@ centr_betw_tmax(graph = NULL, nodes = 0, ..., directed = TRUE) } \arguments{ \item{graph}{The input graph. -It can also be \code{NULL} if \code{nodes} and \code{directed} are both given.} + It can also be \code{NULL} if \code{nodes} and \code{directed} are both given.} \item{nodes}{The number of vertices. -This is ignored if the graph is given.} + This is ignored if the graph is given.} \item{...}{These dots are for future extensions and must be empty.} \item{directed}{Logical, whether to use directed shortest paths for calculating betweenness. -Ignored if an undirected graph was given.} + Ignored if an undirected graph was given.} } \value{ Real scalar, diff --git a/man/centr_clo.Rd b/man/centr_clo.Rd index 65fd45c3fcb..633fd348416 100644 --- a/man/centr_clo.Rd +++ b/man/centr_clo.Rd @@ -14,24 +14,24 @@ centr_clo(graph, ..., mode = c("out", "in", "all", "total"), normalized = TRUE) \item{mode}{This is the same as the \code{mode} argument of \code{closeness()}.} \item{normalized}{Logical. -Whether to normalize the graph level centrality score by dividing by the theoretical maximum.} + Whether to normalize the graph level centrality score by dividing by the theoretical maximum.} } \value{ A named list with the following components: \describe{ \item{res}{ The node-level centrality scores. -} + } \item{centralization}{ The graph level centrality index. -} + } \item{theoretical_max}{ The maximum theoretical graph level centralization score for a graph with the given number of vertices, using the same parameters. -If the \code{normalized} argument was \code{TRUE}, + If the \code{normalized} argument was \code{TRUE}, then the result was divided by this number. -} + } } } \description{ diff --git a/man/centr_clo_tmax.Rd b/man/centr_clo_tmax.Rd index 9cf262ecf6b..3c8e296c43f 100644 --- a/man/centr_clo_tmax.Rd +++ b/man/centr_clo_tmax.Rd @@ -13,15 +13,15 @@ centr_clo_tmax( } \arguments{ \item{graph}{The input graph. -It can also be \code{NULL} if \code{nodes} is given.} + It can also be \code{NULL} if \code{nodes} is given.} \item{nodes}{The number of vertices. -This is ignored if the graph is given.} + This is ignored if the graph is given.} \item{...}{These dots are for future extensions and must be empty.} \item{mode}{This is the same as the \code{mode} argument of \code{closeness()}. -Ignored if an undirected graph is given.} + Ignored if an undirected graph is given.} } \value{ Real scalar, diff --git a/man/centr_degree.Rd b/man/centr_degree.Rd index cb1f08207bc..c4b13730cb3 100644 --- a/man/centr_degree.Rd +++ b/man/centr_degree.Rd @@ -22,24 +22,24 @@ centr_degree( \item{loops}{Logical, whether to consider loops edges when calculating the degree.} \item{normalized}{Logical. -Whether to normalize the graph level centrality score by dividing by the theoretical maximum.} + Whether to normalize the graph level centrality score by dividing by the theoretical maximum.} } \value{ A named list with the following components: \describe{ \item{res}{ The node-level centrality scores. -} + } \item{centralization}{ The graph level centrality index. -} + } \item{theoretical_max}{ The maximum theoretical graph level centralization score for a graph with the given number of vertices, using the same parameters. -If the \code{normalized} argument was \code{TRUE}, + If the \code{normalized} argument was \code{TRUE}, then the result was divided by this number. -} + } } } \description{ diff --git a/man/centr_degree_tmax.Rd b/man/centr_degree_tmax.Rd index aa5c2a9088a..9d5f4f5e28b 100644 --- a/man/centr_degree_tmax.Rd +++ b/man/centr_degree_tmax.Rd @@ -13,13 +13,13 @@ centr_degree_tmax( } \arguments{ \item{graph}{The input graph. -It can also be \code{NULL} if \code{nodes} is given.} + It can also be \code{NULL} if \code{nodes} is given.} \item{nodes}{The number of vertices. -This is ignored if the graph is given.} + This is ignored if the graph is given.} \item{mode}{This is the same as the \code{mode} argument of \code{degree()}. -Ignored if \code{graph} is given and the graph is undirected.} + Ignored if \code{graph} is given and the graph is undirected.} \item{loops}{Logical, whether to consider loops edges when calculating the degree.} } diff --git a/man/centr_eigen.Rd b/man/centr_eigen.Rd index e52023e858d..9eca9556322 100644 --- a/man/centr_eigen.Rd +++ b/man/centr_eigen.Rd @@ -18,32 +18,32 @@ centr_eigen( \item{directed}{Logical, whether to use directed shortest paths for calculating eigenvector centrality.} \item{scale}{\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} Ignored. -Computing eigenvector centralization requires normalized eigenvector centrality scores.} + Computing eigenvector centralization requires normalized eigenvector centrality scores.} \item{options}{This is passed to \code{\link[=eigen_centrality]{eigen_centrality()}}, the options for the ARPACK eigensolver.} \item{normalized}{Logical. -Whether to normalize the graph level centrality score by dividing by the theoretical maximum.} + Whether to normalize the graph level centrality score by dividing by the theoretical maximum.} } \value{ A named list with the following components: \describe{ \item{vector}{ The node-level centrality scores. -} + } \item{value}{ The corresponding eigenvalue. -} + } \item{options}{ ARPACK options, see the return value of \code{\link[=eigen_centrality]{eigen_centrality()}} for details. -} + } \item{centralization}{ The graph level centrality index. -} + } \item{theoretical_max}{ The same as above, the theoretical maximum centralization score for a graph with the same number of vertices. -} + } } } \description{ diff --git a/man/centr_eigen_tmax.Rd b/man/centr_eigen_tmax.Rd index 20c465126c5..3fd07d023cd 100644 --- a/man/centr_eigen_tmax.Rd +++ b/man/centr_eigen_tmax.Rd @@ -13,16 +13,16 @@ centr_eigen_tmax( } \arguments{ \item{graph}{The input graph. -It can also be \code{NULL}, if \code{nodes} is given.} + It can also be \code{NULL}, if \code{nodes} is given.} \item{nodes}{The number of vertices. -This is ignored if the graph is given.} + This is ignored if the graph is given.} \item{directed}{Logical, whether to consider edge directions during the calculation. -Ignored in undirected graphs.} + Ignored in undirected graphs.} \item{scale}{\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} Ignored. -Computing eigenvector centralization requires normalized eigenvector centrality scores.} + Computing eigenvector centralization requires normalized eigenvector centrality scores.} } \value{ Real scalar, diff --git a/man/centralization.betweenness.Rd b/man/centralization.betweenness.Rd index c88d5eef90c..d0c39038419 100644 --- a/man/centralization.betweenness.Rd +++ b/man/centralization.betweenness.Rd @@ -12,7 +12,7 @@ centralization.betweenness(graph, directed = TRUE, normalized = TRUE) \item{directed}{Logical, whether to use directed shortest paths for calculating betweenness.} \item{normalized}{Logical. -Whether to normalize the graph level centrality score by dividing by the theoretical maximum.} + Whether to normalize the graph level centrality score by dividing by the theoretical maximum.} } \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/centralization.betweenness.tmax.Rd b/man/centralization.betweenness.tmax.Rd index e0f90b9d7f4..65b88dbcfaf 100644 --- a/man/centralization.betweenness.tmax.Rd +++ b/man/centralization.betweenness.tmax.Rd @@ -8,13 +8,13 @@ centralization.betweenness.tmax(graph = NULL, nodes = 0, directed = TRUE) } \arguments{ \item{graph}{The input graph. -It can also be \code{NULL} if \code{nodes} and \code{directed} are both given.} + It can also be \code{NULL} if \code{nodes} and \code{directed} are both given.} \item{nodes}{The number of vertices. -This is ignored if the graph is given.} + This is ignored if the graph is given.} \item{directed}{Logical, whether to use directed shortest paths for calculating betweenness. -Ignored if an undirected graph was given.} + Ignored if an undirected graph was given.} } \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/centralization.closeness.Rd b/man/centralization.closeness.Rd index d6a8be28e39..37e676fead5 100644 --- a/man/centralization.closeness.Rd +++ b/man/centralization.closeness.Rd @@ -16,7 +16,7 @@ centralization.closeness( \item{mode}{This is the same as the \code{mode} argument of \code{closeness()}.} \item{normalized}{Logical. -Whether to normalize the graph level centrality score by dividing by the theoretical maximum.} + Whether to normalize the graph level centrality score by dividing by the theoretical maximum.} } \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/centralization.closeness.tmax.Rd b/man/centralization.closeness.tmax.Rd index 76db0303235..116f506975b 100644 --- a/man/centralization.closeness.tmax.Rd +++ b/man/centralization.closeness.tmax.Rd @@ -12,13 +12,13 @@ centralization.closeness.tmax( } \arguments{ \item{graph}{The input graph. -It can also be \code{NULL} if \code{nodes} is given.} + It can also be \code{NULL} if \code{nodes} is given.} \item{nodes}{The number of vertices. -This is ignored if the graph is given.} + This is ignored if the graph is given.} \item{mode}{This is the same as the \code{mode} argument of \code{closeness()}. -Ignored if an undirected graph is given.} + Ignored if an undirected graph is given.} } \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/centralization.degree.Rd b/man/centralization.degree.Rd index c0fd91c9650..eff6a790f1b 100644 --- a/man/centralization.degree.Rd +++ b/man/centralization.degree.Rd @@ -19,7 +19,7 @@ centralization.degree( \item{loops}{Logical, whether to consider loops edges when calculating the degree.} \item{normalized}{Logical. -Whether to normalize the graph level centrality score by dividing by the theoretical maximum.} + Whether to normalize the graph level centrality score by dividing by the theoretical maximum.} } \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/centralization.degree.tmax.Rd b/man/centralization.degree.tmax.Rd index d0ff870f6d8..0fc4958bbd0 100644 --- a/man/centralization.degree.tmax.Rd +++ b/man/centralization.degree.tmax.Rd @@ -13,13 +13,13 @@ centralization.degree.tmax( } \arguments{ \item{graph}{The input graph. -It can also be \code{NULL} if \code{nodes} is given.} + It can also be \code{NULL} if \code{nodes} is given.} \item{nodes}{The number of vertices. -This is ignored if the graph is given.} + This is ignored if the graph is given.} \item{mode}{This is the same as the \code{mode} argument of \code{degree()}. -Ignored if \code{graph} is given and the graph is undirected.} + Ignored if \code{graph} is given and the graph is undirected.} \item{loops}{Logical, whether to consider loops edges when calculating the degree.} } diff --git a/man/centralization.evcent.Rd b/man/centralization.evcent.Rd index cc483e1d7ab..ad35c1562c9 100644 --- a/man/centralization.evcent.Rd +++ b/man/centralization.evcent.Rd @@ -18,12 +18,12 @@ centralization.evcent( \item{directed}{Logical, whether to use directed shortest paths for calculating eigenvector centrality.} \item{scale}{\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} Ignored. -Computing eigenvector centralization requires normalized eigenvector centrality scores.} + Computing eigenvector centralization requires normalized eigenvector centrality scores.} \item{options}{This is passed to \code{\link[=eigen_centrality]{eigen_centrality()}}, the options for the ARPACK eigensolver.} \item{normalized}{Logical. -Whether to normalize the graph level centrality score by dividing by the theoretical maximum.} + Whether to normalize the graph level centrality score by dividing by the theoretical maximum.} } \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/centralization.evcent.tmax.Rd b/man/centralization.evcent.tmax.Rd index 990299ac7e6..b9352ae2a74 100644 --- a/man/centralization.evcent.tmax.Rd +++ b/man/centralization.evcent.tmax.Rd @@ -13,16 +13,16 @@ centralization.evcent.tmax( } \arguments{ \item{graph}{The input graph. -It can also be \code{NULL}, if \code{nodes} is given.} + It can also be \code{NULL}, if \code{nodes} is given.} \item{nodes}{The number of vertices. -This is ignored if the graph is given.} + This is ignored if the graph is given.} \item{directed}{Logical, whether to consider edge directions during the calculation. -Ignored in undirected graphs.} + Ignored in undirected graphs.} \item{scale}{\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} Ignored. -Computing eigenvector centralization requires normalized eigenvector centrality scores.} + Computing eigenvector centralization requires normalized eigenvector centrality scores.} } \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/centralize.Rd b/man/centralize.Rd index abc0f27a054..b1e3f4518ff 100644 --- a/man/centralize.Rd +++ b/man/centralize.Rd @@ -13,11 +13,11 @@ centralize(scores, ..., theoretical.max = 0, normalized = TRUE) \item{...}{These dots are for future extensions and must be empty.} \item{theoretical.max}{Real scalar. -The graph-level centralization measure of the most centralized graph with the same number of vertices as the graph under study. -This is only used if the \code{normalized} argument is set to \code{TRUE}.} + The graph-level centralization measure of the most centralized graph with the same number of vertices as the graph under study. + This is only used if the \code{normalized} argument is set to \code{TRUE}.} \item{normalized}{Logical. -Whether to normalize the graph level centrality score by dividing by the supplied theoretical maximum.} + Whether to normalize the graph level centrality score by dividing by the supplied theoretical maximum.} } \value{ A real scalar, the centralization of the graph from which \code{scores} were derived. @@ -27,7 +27,7 @@ Centralization is a method for creating a graph level centralization measure fro } \details{ Centralization is a general method for calculating a graph-level centrality score based on node-level centrality measure. -The formula for this is + The formula for this is \deqn{C(G)=\sum_v (\max_w c_w - c_v),}{ C(G)=sum(max(c(w), w) - c(v), v),} where \eqn{c_v}{c(v)} is the centrality of vertex \eqn{v}. diff --git a/man/centralize.scores.Rd b/man/centralize.scores.Rd index ec0d1057608..60f19b8533e 100644 --- a/man/centralize.scores.Rd +++ b/man/centralize.scores.Rd @@ -10,11 +10,11 @@ centralize.scores(scores, theoretical.max = 0, normalized = TRUE) \item{scores}{The vertex level centrality scores.} \item{theoretical.max}{Real scalar. -The graph-level centralization measure of the most centralized graph with the same number of vertices as the graph under study. -This is only used if the \code{normalized} argument is set to \code{TRUE}.} + The graph-level centralization measure of the most centralized graph with the same number of vertices as the graph under study. + This is only used if the \code{normalized} argument is set to \code{TRUE}.} \item{normalized}{Logical. -Whether to normalize the graph level centrality score by dividing by the supplied theoretical maximum.} + Whether to normalize the graph level centrality score by dividing by the supplied theoretical maximum.} } \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/cited.type.game.Rd b/man/cited.type.game.Rd index 49558a99037..bd1753f981b 100644 --- a/man/cited.type.game.Rd +++ b/man/cited.type.game.Rd @@ -19,11 +19,11 @@ cited.type.game( \item{edges}{Number of edges per step.} \item{types}{Vector of length \sQuote{\code{n}}, the types of the vertices. -Types are numbered from zero. -The default \code{NULL} gives all vertices type zero.} + Types are numbered from zero. + The default \code{NULL} gives all vertices type zero.} \item{pref}{Vector (\code{sample_last_cit()} and \code{sample_cit_types()} or matrix (\code{sample_cit_cit_types()}) giving the (unnormalized) citation probabilities for the different vertex types. -The default \code{NULL} uses \code{(1:(agebins + 1))^-3} for \code{sample_last_cit()} and all-one probabilities for the other two.} + The default \code{NULL} uses \code{(1:(agebins + 1))^-3} for \code{sample_last_cit()} and all-one probabilities for the other two.} \item{directed}{Logical, whether to generate directed networks.} diff --git a/man/citing.cited.type.game.Rd b/man/citing.cited.type.game.Rd index 3022d860166..6178372c619 100644 --- a/man/citing.cited.type.game.Rd +++ b/man/citing.cited.type.game.Rd @@ -19,11 +19,11 @@ citing.cited.type.game( \item{edges}{Number of edges per step.} \item{types}{Vector of length \sQuote{\code{n}}, the types of the vertices. -Types are numbered from zero. -The default \code{NULL} gives all vertices type zero.} + Types are numbered from zero. + The default \code{NULL} gives all vertices type zero.} \item{pref}{Vector (\code{sample_last_cit()} and \code{sample_cit_types()} or matrix (\code{sample_cit_cit_types()}) giving the (unnormalized) citation probabilities for the different vertex types. -The default \code{NULL} uses \code{(1:(agebins + 1))^-3} for \code{sample_last_cit()} and all-one probabilities for the other two.} + The default \code{NULL} uses \code{(1:(agebins + 1))^-3} for \code{sample_last_cit()} and all-one probabilities for the other two.} \item{directed}{Logical, whether to generate directed networks.} diff --git a/man/cliques.Rd b/man/cliques.Rd index 048c759d5e5..1801497a581 100644 --- a/man/cliques.Rd +++ b/man/cliques.Rd @@ -42,36 +42,36 @@ is_clique(graph, candidate, ..., directed = FALSE) \item{graph}{The input graph.} \item{min}{Numeric constant, lower limit on the size of the cliques to find. -\code{NULL} means no limit, i.e. it is the same as 0.} + \code{NULL} means no limit, i.e. it is the same as 0.} \item{max}{Numeric constant, upper limit on the size of the cliques to find. -\code{NULL} means no limit.} + \code{NULL} means no limit.} \item{...}{These dots are for future extensions and must be empty.} \item{callback}{Optional function to call for each clique found. -If provided, the function should accept one argument: \code{clique} (integer vector of vertex IDs in the clique, 1-based indexing). -The function should return \code{FALSE} to continue the search or \code{TRUE} to stop it. -If \code{NULL} (the default), all cliques are collected and returned as a list. + If provided, the function should accept one argument: \code{clique} (integer vector of vertex IDs in the clique, 1-based indexing). + The function should return \code{FALSE} to continue the search or \code{TRUE} to stop it. + If \code{NULL} (the default), all cliques are collected and returned as a list. \strong{Important limitation:} Callback functions must NOT call any igraph functions (including simple queries like \code{vcount()} or \code{ecount()}). -Doing so will cause R to crash due to reentrancy issues. -Extract any needed graph information before calling the function with a callback, + Doing so will cause R to crash due to reentrancy issues. + Extract any needed graph information before calling the function with a callback, or use collector mode (the default) and process results afterward.} \item{subset}{If not \code{NULL}, then it must be a vector of vertex IDs, numeric or symbolic if the graph is named. -The algorithm is run from these vertices only, so only a subset of all maximal cliques is returned. -See the Eppstein paper for details. -This argument makes it possible to easily parallelize the finding of maximal cliques.} + The algorithm is run from these vertices only, so only a subset of all maximal cliques is returned. + See the Eppstein paper for details. + This argument makes it possible to easily parallelize the finding of maximal cliques.} \item{file}{If not \code{NULL}, then it must be a file name, i.e. a character scalar. -The output of the algorithm is written to this file. -(If it exists, then it will be overwritten.) -Each clique will be a separate line in the file, given with the numeric IDs of its vertices, separated by whitespace.} + The output of the algorithm is written to this file. + (If it exists, then it will be overwritten.) + Each clique will be a separate line in the file, given with the numeric IDs of its vertices, separated by whitespace.} \item{vertex.weights}{Vertex weight vector. -If the graph has a \code{weight} vertex attribute, then this is used by default. -If the graph does not have a \code{weight} vertex attribute and this argument is \code{NULL}, + If the graph has a \code{weight} vertex attribute, then this is used by default. + If the graph does not have a \code{weight} vertex attribute and this argument is \code{NULL}, then every vertex is assumed to have a weight of 1. Note that the current implementation of the weighted clique finder supports positive integer weights only.} \item{maximal}{Specifies whether to look for all weighted cliques (\code{FALSE}) or only the maximal ones (\code{TRUE}).} @@ -82,14 +82,14 @@ then every vertex is assumed to have a weight of 1. Note that the current implem } \value{ \code{cliques()} returns a list containing numeric vectors of vertex IDs if \code{callback} is \code{NULL}. -Each list element is a clique, i.e. a vertex sequence of class \link[=V]{igraph.vs}. -If \code{callback} is provided, returns \code{NULL} invisibly. + Each list element is a clique, i.e. a vertex sequence of class \link[=V]{igraph.vs}. + If \code{callback} is provided, returns \code{NULL} invisibly. \code{largest_cliques()} and \code{clique_num()} return a list containing numeric vectors of vertex IDs. -Each list element is a clique, i.e. a vertex sequence of class \link[=V]{igraph.vs}. + Each list element is a clique, i.e. a vertex sequence of class \link[=V]{igraph.vs}. \code{max_cliques()} returns \code{NULL}, invisibly, if its \code{file} argument is not \code{NULL}. -The output is written to the specified file in this case. + The output is written to the specified file in this case. \code{clique_num()} and \code{count_max_cliques()} return an integer scalar. @@ -100,20 +100,20 @@ Trailing zeros are currently truncated, but this might change in future versions } \description{ These functions find all, the largest or all the maximal cliques in an undirected graph. -The size of the largest clique can also be calculated. + The size of the largest clique can also be calculated. Tests if all pairs within a set of vertices are adjacent, i.e. whether they form a clique. -An empty set and singleton set are considered to be a clique. + An empty set and singleton set are considered to be a clique. } \details{ \code{cliques()} find all complete subgraphs in the input graph, obeying the size limitations given in the \code{min} and \code{max} arguments. \code{largest_cliques()} finds all largest cliques in the input graph. -A clique is largest if there is no other clique including more vertices. + A clique is largest if there is no other clique including more vertices. \code{max_cliques()} finds all maximal cliques in the input graph. -A clique is maximal if it cannot be extended to a larger clique. -The largest cliques are always maximal, but a maximal clique is not necessarily the largest. + A clique is maximal if it cannot be extended to a larger clique. + The largest cliques are always maximal, but a maximal clique is not necessarily the largest. \code{count_max_cliques()} counts the maximal cliques. diff --git a/man/closeness.Rd b/man/closeness.Rd index e7b96a71592..7252206d66d 100644 --- a/man/closeness.Rd +++ b/man/closeness.Rd @@ -19,23 +19,23 @@ closeness( \item{graph}{The graph to analyze.} \item{vids}{The vertices for which closeness will be calculated. -The default \code{NULL} selects all vertices.} + The default \code{NULL} selects all vertices.} \item{...}{These dots are for future extensions and must be empty.} \item{mode}{Character string, defined the types of the paths used for measuring the distance in directed graphs. -\dQuote{in} measures the paths \emph{to} a vertex, \dQuote{out} measures paths \emph{from} a vertex, \emph{all} uses undirected paths. -This argument is ignored for undirected graphs.} + \dQuote{in} measures the paths \emph{to} a vertex, \dQuote{out} measures paths \emph{from} a vertex, \emph{all} uses undirected paths. + This argument is ignored for undirected graphs.} \item{weights}{Optional positive weight vector for calculating weighted closeness. -If the graph has a \code{weight} edge attribute, then this is used by default. -Weights are used for calculating weighted shortest paths, so they are interpreted as distances.} + If the graph has a \code{weight} edge attribute, then this is used by default. + Weights are used for calculating weighted shortest paths, so they are interpreted as distances.} \item{normalized}{Logical, whether to calculate the normalized closeness, i.e. the inverse average distance to all reachable vertices. -The non-normalized closeness is the inverse of the sum of distances to all reachable vertices.} + The non-normalized closeness is the inverse of the sum of distances to all reachable vertices.} \item{cutoff}{The maximum path length to consider when calculating the closeness. -If zero or negative then there is no such limit.} + If zero or negative then there is no such limit.} } \value{ Numeric vector with the closeness values of all the vertices in \code{v}. @@ -49,15 +49,15 @@ The closeness centrality of a vertex is defined as the inverse of the sum of dis \deqn{\frac{1}{\sum_{i\ne v} d_{vi}}}{1/sum( d(v,i), i != v)} If there is no (directed) path between vertex \code{v} and \code{i}, then \code{i} is omitted from the calculation. -If no other vertices are reachable from \code{v}, then its closeness is returned as NaN. + If no other vertices are reachable from \code{v}, then its closeness is returned as NaN. \code{cutoff} or smaller. -This can be run for larger graphs, as the running time is not quadratic (if \code{cutoff} is small). -If \code{cutoff} is negative (which is the default), then the function calculates the exact closeness scores. -Since igraph 1.6.0, a \code{cutoff} value of zero is treated literally, i.e. path with a length greater than zero are ignored. + This can be run for larger graphs, as the running time is not quadratic (if \code{cutoff} is small). + If \code{cutoff} is negative (which is the default), then the function calculates the exact closeness scores. + Since igraph 1.6.0, a \code{cutoff} value of zero is treated literally, i.e. path with a length greater than zero are ignored. Closeness centrality is meaningful only for connected graphs. -In disconnected graphs, consider using the harmonic centrality with \code{\link[=harmonic_centrality]{harmonic_centrality()}} + In disconnected graphs, consider using the harmonic centrality with \code{\link[=harmonic_centrality]{harmonic_centrality()}} } \section{Related documentation in the C library}{ \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_closeness_cutoff}{\code{closeness_cutoff()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_edges}{\code{edges()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_get_eids}{\code{get_eids()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_ecount}{\code{ecount()}} diff --git a/man/cluster.distribution.Rd b/man/cluster.distribution.Rd index f3be0a1645b..dce61055e01 100644 --- a/man/cluster.distribution.Rd +++ b/man/cluster.distribution.Rd @@ -12,10 +12,10 @@ cluster.distribution(graph, cumulative = FALSE, mul.size = FALSE, ...) \item{cumulative}{Logical, if TRUE the cumulative distirubution (relative frequency) is calculated.} \item{mul.size}{Logical. -If TRUE the relative frequencies will be multiplied by the cluster sizes.} + If TRUE the relative frequencies will be multiplied by the cluster sizes.} \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.} + 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/cluster_edge_betweenness.Rd b/man/cluster_edge_betweenness.Rd index d16b9050303..6bc9297e6ac 100644 --- a/man/cluster_edge_betweenness.Rd +++ b/man/cluster_edge_betweenness.Rd @@ -22,28 +22,28 @@ cluster_edge_betweenness( \item{...}{These dots are for future extensions and must be empty.} \item{weights}{The weights of the edges. -It must be a positive numeric vector, \code{NULL} or \code{NA}. -If it is \code{NULL} and the input graph has a \sQuote{weight} edge attribute, then that attribute will be used. -If \code{NULL} and no such attribute is present, then the edges will have equal weights. -Set this to \code{NA} if the graph was a \sQuote{weight} edge attribute, but you don't want to use it for community detection. -Edge weights are used to calculate weighted edge betweenness. -This means that edges are interpreted as distances, not as connection strengths.} + It must be a positive numeric vector, \code{NULL} or \code{NA}. + If it is \code{NULL} and the input graph has a \sQuote{weight} edge attribute, then that attribute will be used. + If \code{NULL} and no such attribute is present, then the edges will have equal weights. + Set this to \code{NA} if the graph was a \sQuote{weight} edge attribute, but you don't want to use it for community detection. + Edge weights are used to calculate weighted edge betweenness. + This means that edges are interpreted as distances, not as connection strengths.} \item{directed}{Logical, whether to calculate directed edge betweenness for directed graphs. -It is ignored for undirected graphs.} + It is ignored for undirected graphs.} \item{edge.betweenness}{Logical, whether to return the edge betweenness of the edges at the time of their removal.} \item{merges}{Logical, whether to return the merge matrix representing the hierarchical community structure of the network. -This argument is called \code{merges}, even if the community structure algorithm itself is divisive and not agglomerative: + This argument is called \code{merges}, even if the community structure algorithm itself is divisive and not agglomerative: it builds the tree from top to bottom. -There is one line for each merge (i.e. split) in matrix, the first line is the first merge (last split). -The communities are identified by integer number starting from one. -Community IDs smaller than or equal to \eqn{N}, the number of vertices in the graph, belong to singleton communities, + There is one line for each merge (i.e. split) in matrix, the first line is the first merge (last split). + The communities are identified by integer number starting from one. + Community IDs smaller than or equal to \eqn{N}, the number of vertices in the graph, belong to singleton communities, i.e. individual vertices. -Before the first merge we have \eqn{N} communities numbered from one to \eqn{N}. -The first merge, the first line of the matrix creates community \eqn{N+1}, the second merge creates community \eqn{N+2}, etc.} + Before the first merge we have \eqn{N} communities numbered from one to \eqn{N}. + The first merge, the first line of the matrix creates community \eqn{N+1}, the second merge creates community \eqn{N+2}, etc.} \item{bridges}{Logical, whether to return a list the edge removals which actually splitted a component of the graph.} @@ -57,18 +57,18 @@ considering all possibly community structures along the edge-betweenness based e } \description{ Community structure detection based on the betweenness of the edges in the network. -This method is also known as the Girvan-Newman algorithm. + This method is also known as the Girvan-Newman algorithm. } \details{ The idea behind this method is that the betweenness of the edges connecting two communities is typically high, as many of the shortest paths between vertices in separate communities pass through them. -The algorithm successively removes edges with the highest betweenness, recalculating betweenness values after each removal. -This way eventually the network splits into two components, then one of these components splits again, and so on, + The algorithm successively removes edges with the highest betweenness, recalculating betweenness values after each removal. + This way eventually the network splits into two components, then one of these components splits again, and so on, until all edges are removed. -The resulting hierarhical partitioning of the vertices can be encoded as a dendrogram. + The resulting hierarhical partitioning of the vertices can be encoded as a dendrogram. \code{cluster_edge_betweenness()} returns various information collected through the run of the algorithm. -Specifically, \code{removed.edges} contains the edge IDs in order of the edges' removal; + Specifically, \code{removed.edges} contains the edge IDs in order of the edges' removal; \code{edge.betweenness} contains the betweenness of each of these at the time of their removal; and \code{bridges} contains the IDs of edges whose removal caused a split. } diff --git a/man/cluster_fast_greedy.Rd b/man/cluster_fast_greedy.Rd index 2794dd942c7..0a458c9d621 100644 --- a/man/cluster_fast_greedy.Rd +++ b/man/cluster_fast_greedy.Rd @@ -15,7 +15,7 @@ cluster_fast_greedy( } \arguments{ \item{graph}{The input graph. -It must be undirected and must not have multi-edges.} + It must be undirected and must not have multi-edges.} \item{...}{These dots are for future extensions and must be empty.} @@ -27,11 +27,11 @@ It must be undirected and must not have multi-edges.} considering all possible community structures along the merges.} \item{weights}{The weights of the edges. -It must be a positive numeric vector, \code{NULL} or \code{NA}. -If it is \code{NULL} and the input graph has a \sQuote{weight} edge attribute, then that attribute will be used. -If \code{NULL} and no such attribute is present, then the edges will have equal weights. -Set this to \code{NA} if the graph was a \sQuote{weight} edge attribute, but you don't want to use it for community detection. -A larger edge weight means a stronger connection for this function.} + It must be a positive numeric vector, \code{NULL} or \code{NA}. + If it is \code{NULL} and the input graph has a \sQuote{weight} edge attribute, then that attribute will be used. + If \code{NULL} and no such attribute is present, then the edges will have equal weights. + Set this to \code{NA} if the graph was a \sQuote{weight} edge attribute, but you don't want to use it for community detection. + A larger edge weight means a stronger connection for this function.} } \value{ \code{cluster_fast_greedy()} returns a \code{\link[=communities]{communities()}} object, please see the \code{\link[=communities]{communities()}} manual page for details. diff --git a/man/cluster_fluid_communities.Rd b/man/cluster_fluid_communities.Rd index dce8a319917..5e4c25d04e0 100644 --- a/man/cluster_fluid_communities.Rd +++ b/man/cluster_fluid_communities.Rd @@ -8,13 +8,13 @@ cluster_fluid_communities(graph, no.of.communities) } \arguments{ \item{graph}{The input graph. -The graph must be simple and connected. -Empty graphs are not supported as well as single vertex graphs. -Edge directions are ignored. -Weights are not considered.} + The graph must be simple and connected. + Empty graphs are not supported as well as single vertex graphs. + Edge directions are ignored. + Weights are not considered.} \item{no.of.communities}{The number of communities to be found. -Must be greater than 0 and fewer than number of vertices in the graph.} + Must be greater than 0 and fewer than number of vertices in the graph.} } \value{ \code{cluster_fluid_communities()} returns a \code{\link[=communities]{communities()}} object, please see the \code{\link[=communities]{communities()}} manual page for details. diff --git a/man/cluster_infomap.Rd b/man/cluster_infomap.Rd index c313b9fe68f..a38e9008898 100644 --- a/man/cluster_infomap.Rd +++ b/man/cluster_infomap.Rd @@ -15,21 +15,21 @@ cluster_infomap( } \arguments{ \item{graph}{The input graph. -Edge directions will be taken into account.} + Edge directions will be taken into account.} \item{...}{These dots are for future extensions and must be empty.} \item{e.weights}{Numeric vector of edge weights. -The length must match the number of edges in the graph. -By default (\code{NULL}) the \sQuote{\code{weight}} edge attribute is used as weights. -If it is not present, then all edges are considered to have the same weight. -Larger edge weights correspond to stronger connections.} + The length must match the number of edges in the graph. + By default (\code{NULL}) the \sQuote{\code{weight}} edge attribute is used as weights. + If it is not present, then all edges are considered to have the same weight. + Larger edge weights correspond to stronger connections.} \item{v.weights}{Numeric vector of vertex weights. -The length must match the number of vertices in the graph. -By default (\code{NULL}) the \sQuote{\code{weight}} vertex attribute is used as weights. -If it is not present, then all vertices are considered to have the same weight. -A larger vertex weight means a larger probability that the random surfer jumps to that vertex.} + The length must match the number of vertices in the graph. + By default (\code{NULL}) the \sQuote{\code{weight}} vertex attribute is used as weights. + If it is not present, then all vertices are considered to have the same weight. + A larger vertex weight means a larger probability that the random surfer jumps to that vertex.} \item{nb.trials}{The number of attempts to partition the network (can be any integer value equal or larger than 1).} @@ -41,7 +41,7 @@ please see the \code{\link[=communities]{communities()}} manual page for details } \description{ Find community structure that minimizes the expected description length of a random walker trajectory. -If the graph is directed, edge directions will be taken into account. + If the graph is directed, edge directions will be taken into account. } \details{ Please see the details of this method in the references given below. @@ -67,7 +67,7 @@ information flow reveal community structure in complex networks, \emph{PNAS} A more detailed paper: M. Rosvall, D. Axelsson, and C. T. Bergstrom, The map equation, \emph{Eur. Phys. J. Special Topics} 178, 13 (2009). -\doi{10.1140/epjst/e2010-01179-1}, \url{https://arxiv.org/abs/0906.1405}. + \doi{10.1140/epjst/e2010-01179-1}, \url{https://arxiv.org/abs/0906.1405}. } \seealso{ Other community finding methods and \code{\link[=communities]{communities()}}. @@ -96,7 +96,7 @@ Community detection: \author{ Martin Rosvall wrote the original C++ code. This was ported to be more igraph-like by Emmanuel Navarro. -The R interface and some cosmetics was done by Gabor Csardi \email{csardi.gabor@gmail.com}. + The R interface and some cosmetics was done by Gabor Csardi \email{csardi.gabor@gmail.com}. } \concept{community} \keyword{graphs} diff --git a/man/cluster_label_prop.Rd b/man/cluster_label_prop.Rd index 14bcb821511..2d1cec278a2 100644 --- a/man/cluster_label_prop.Rd +++ b/man/cluster_label_prop.Rd @@ -15,46 +15,46 @@ cluster_label_prop( } \arguments{ \item{graph}{The input graph. -Note that the algorithm was originally defined for undirected graphs. -You are advised to set \sQuote{mode} to \code{all} if you pass a directed graph here to treat it as undirected.} + Note that the algorithm was originally defined for undirected graphs. + You are advised to set \sQuote{mode} to \code{all} if you pass a directed graph here to treat it as undirected.} \item{weights}{The weights of the edges. -It must be a positive numeric vector, \code{NULL} or \code{NA}. -If it is \code{NULL} and the input graph has a \sQuote{weight} edge attribute, then that attribute will be used. -If \code{NULL} and no such attribute is present, then the edges will have equal weights. -Set this to \code{NA} if the graph was a \sQuote{weight} edge attribute, but you don't want to use it for community detection. -A larger edge weight means a stronger connection for this function.} + It must be a positive numeric vector, \code{NULL} or \code{NA}. + If it is \code{NULL} and the input graph has a \sQuote{weight} edge attribute, then that attribute will be used. + If \code{NULL} and no such attribute is present, then the edges will have equal weights. + Set this to \code{NA} if the graph was a \sQuote{weight} edge attribute, but you don't want to use it for community detection. + A larger edge weight means a stronger connection for this function.} \item{...}{These dots are for future extensions and must be empty.} \item{mode}{Logical, whether to consider edge directions for the label propagation, and if so, in which direction the labels should propagate. -Ignored for undirected graphs. -"all" means to ignore edge directions (even in directed graphs). -"out" means to propagate labels along the natural direction of the edges. -"in" means to propagate labels backwards (i.e. from head to tail).} + Ignored for undirected graphs. + "all" means to ignore edge directions (even in directed graphs). + "out" means to propagate labels along the natural direction of the edges. + "in" means to propagate labels backwards (i.e. from head to tail).} \item{initial}{The initial state. -If \code{NULL}, every vertex will have a different label at the beginning. -Otherwise it must be a vector with an entry for each vertex. -Non-negative values denote different labels, negative entries denote vertices without labels.} + If \code{NULL}, every vertex will have a different label at the beginning. + Otherwise it must be a vector with an entry for each vertex. + Non-negative values denote different labels, negative entries denote vertices without labels.} \item{fixed}{Logical vector denoting which labels are fixed. -Of course this makes sense only if you provided an initial state, otherwise this element will be ignored. -Also note that vertices without labels cannot be fixed.} + Of course this makes sense only if you provided an initial state, otherwise this element will be ignored. + Also note that vertices without labels cannot be fixed.} } \value{ \code{cluster_label_prop()} returns a \code{\link[=communities]{communities()}} object, please see the \code{\link[=communities]{communities()}} manual page for details. } \description{ This is a fast, nearly linear time algorithm for detecting community structure in networks. -In works by labeling the vertices with unique labels and then updating the labels by majority voting in the neighborhood of the vertex. + In works by labeling the vertices with unique labels and then updating the labels by majority voting in the neighborhood of the vertex. } \details{ This function implements the community detection method described in: Raghavan, U.N. and Albert, R. and Kumara, S.: Near linear time algorithm to detect community structures in large-scale networks. -Phys Rev E 76, 036106. (2007). -This version extends the original method by the ability to take edge weights into consideration and also by allowing some labels to be fixed. + Phys Rev E 76, 036106. (2007). + This version extends the original method by the ability to take edge weights into consideration and also by allowing some labels to be fixed. From the abstract of the paper: \dQuote{In our algorithm every node is initialized with a unique label and at every step each node adopts the label diff --git a/man/cluster_leading_eigen.Rd b/man/cluster_leading_eigen.Rd index 62ecffba98b..1e784c387b3 100644 --- a/man/cluster_leading_eigen.Rd +++ b/man/cluster_leading_eigen.Rd @@ -17,26 +17,26 @@ cluster_leading_eigen( } \arguments{ \item{graph}{The input graph. -Should be undirected as the method needs a symmetric matrix.} + Should be undirected as the method needs a symmetric matrix.} \item{steps}{The number of steps to take, this is actually the number of tries to make a step. -It is not a particularly useful parameter.} + It is not a particularly useful parameter.} \item{weights}{The weights of the edges. -It must be a positive numeric vector, \code{NULL} or \code{NA}. -If it is \code{NULL} and the input graph has a \sQuote{weight} edge attribute, then that attribute will be used. -If \code{NULL} and no such attribute is present, then the edges will have equal weights. -Set this to \code{NA} if the graph was a \sQuote{weight} edge attribute, but you don't want to use it for community detection. -A larger edge weight means a stronger connection for this function.} + It must be a positive numeric vector, \code{NULL} or \code{NA}. + If it is \code{NULL} and the input graph has a \sQuote{weight} edge attribute, then that attribute will be used. + If \code{NULL} and no such attribute is present, then the edges will have equal weights. + Set this to \code{NA} if the graph was a \sQuote{weight} edge attribute, but you don't want to use it for community detection. + A larger edge weight means a stronger connection for this function.} \item{start}{\code{NULL}, or a numeric membership vector, giving the start configuration of the algorithm.} \item{options}{A named list to override some ARPACK options.} \item{callback}{Callback function. -This is called after each iteration, after calculating the leading eigenvector of the modularity matrix. -See details below. -Default: \code{NULL}.} + This is called after each iteration, after calculating the leading eigenvector of the modularity matrix. + See details below. + Default: \code{NULL}.} \item{extra}{Additional argument to supply to the callback function.} @@ -48,18 +48,18 @@ Default: \code{NULL}.} \item{membership}{ The membership vector at the end of the algorithm, when no more splits are possible. -} + } \item{merges}{ The merges matrix starting from the state described by the \code{membership} member. -This is a two-column matrix and each line describes a merge of two communities, + This is a two-column matrix and each line describes a merge of two communities, the first line is the first merge and it creates community \sQuote{\code{N}}, \code{N} is the number of initial communities in the graph, the second line creates community \code{N+1}, etc. } \item{options}{ Information about the underlying ARPACK computation, see \code{\link[=arpack]{arpack()}} for details. -} + } } } \description{ @@ -72,44 +72,44 @@ eigenvector} method developed by Mark Newman, see the reference below. The heart of the method is the definition of the modularity matrix, \code{B}, which is \code{B=A-P}, \code{A} being the adjacency matrix of the (undirected) network, and \code{P} contains the probability that certain edges are present according to the \sQuote{configuration model}. -In other words, + In other words, a \code{P[i,j]} element of \code{P} is the probability that there is an edge between vertices \code{i} and \code{j} in a random network in which the degrees of all vertices are the same as in the input graph. The leading eigenvector method works by calculating the eigenvector of the modularity matrix for the largest positive eigenvalue and then separating vertices into two community based on the sign of the corresponding element in the eigenvector. -If all elements in the eigenvector are of the same sign that means that the network has no underlying comuunity structure. -Check Newman's paper to understand why this is a good method for detecting community structure. + If all elements in the eigenvector are of the same sign that means that the network has no underlying comuunity structure. + Check Newman's paper to understand why this is a good method for detecting community structure. } \section{Callback functions}{ The \code{callback} argument can be used to supply a function that is called after each eigenvector calculation. -The following arguments are supplied to this function: + The following arguments are supplied to this function: \describe{ \item{membership}{ The actual membership vector, with zero-based indexing. -} + } \item{community}{ The community that the algorithm just tried to split, community numbering starts with zero here. -} + } \item{value}{ The eigenvalue belonging to the leading eigenvector the algorithm just found. -} + } \item{vector}{ The leading eigenvector the algorithm just found. -} + } \item{multiplier}{ An R function that can be used to multiple the actual modularity matrix with an arbitrary vector. -Supply the vector as an argument to perform this multiplication. -This function can be used with ARPACK. -} + Supply the vector as an argument to perform this multiplication. + This function can be used with ARPACK. + } \item{extra}{ The \code{extra} argument that was passed to \code{cluster_leading_eigen()}. -} + } } The callback function should return a scalar number. -If this number is non-zero, then the clustering is terminated. + If this number is non-zero, then the clustering is terminated. } \section{Related documentation in the C library}{ diff --git a/man/cluster_leiden.Rd b/man/cluster_leiden.Rd index 3c71294751f..e7d361b27be 100644 --- a/man/cluster_leiden.Rd +++ b/man/cluster_leiden.Rd @@ -20,60 +20,60 @@ cluster_leiden( } \arguments{ \item{graph}{The input graph. -It must be undirected.} + It must be undirected.} \item{objective_function}{Whether to use the Constant Potts Model (CPM) or modularity. -Must be either \code{"CPM"} or \code{"modularity"}.} + Must be either \code{"CPM"} or \code{"modularity"}.} \item{...}{These dots are for future extensions and must be empty.} \item{weights}{The weights of the edges. -It must be a positive numeric vector, \code{NULL} or \code{NA}. -If it is \code{NULL} and the input graph has a \sQuote{weight} edge attribute, then that attribute will be used. -If \code{NULL} and no such attribute is present, then the edges will have equal weights. -Set this to \code{NA} if the graph was a \sQuote{weight} edge attribute, but you don't want to use it for community detection. -A larger edge weight means a stronger connection for this function.} + It must be a positive numeric vector, \code{NULL} or \code{NA}. + If it is \code{NULL} and the input graph has a \sQuote{weight} edge attribute, then that attribute will be used. + If \code{NULL} and no such attribute is present, then the edges will have equal weights. + Set this to \code{NA} if the graph was a \sQuote{weight} edge attribute, but you don't want to use it for community detection. + A larger edge weight means a stronger connection for this function.} \item{resolution}{The resolution parameter to use. -Higher resolutions lead to more smaller communities, while lower resolutions lead to fewer larger communities.} + Higher resolutions lead to more smaller communities, while lower resolutions lead to fewer larger communities.} \item{resolution_parameter}{\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#superseded}{\figure{lifecycle-superseded.svg}{options: alt='[Superseded]'}}}{\strong{[Superseded]}} Use \code{resolution} instead.} \item{beta}{Parameter affecting the randomness in the Leiden algorithm. -This affects only the refinement step of the algorithm.} + This affects only the refinement step of the algorithm.} \item{initial_membership}{If provided, the Leiden algorithm will try to improve this provided membership. -If no argument is provided, the aglorithm simply starts from the singleton partition.} + If no argument is provided, the aglorithm simply starts from the singleton partition.} \item{n_iterations}{the number of iterations to iterate the Leiden algorithm. -Each iteration may improve the partition further.} + Each iteration may improve the partition further.} \item{vertex_weights}{the vertex weights used in the Leiden algorithm. -If this is not provided, it will be automatically determined on the basis of the \code{objective_function}. -Please see the details of this function how to interpret the vertex weights.} + If this is not provided, it will be automatically determined on the basis of the \code{objective_function}. + Please see the details of this function how to interpret the vertex weights.} } \value{ \code{cluster_leiden()} returns a \code{\link[=communities]{communities()}} object, please see the \code{\link[=communities]{communities()}} manual page for details. } \description{ The Leiden algorithm is similar to the Louvain algorithm, \code{\link[=cluster_louvain]{cluster_louvain()}}, but it is faster and yields higher quality solutions. -It can optimize both modularity and the Constant Potts Model, + It can optimize both modularity and the Constant Potts Model, which does not suffer from the resolution-limit (see preprint \url{https://arxiv.org/abs/1104.3083}). } \details{ The Leiden algorithm consists of three phases: (1) local moving of nodes, (2) refinement of the partition and (3) aggregation of the network based on the refined partition, using the non-refined partition to create an initial partition for the aggregate network. -In the local move procedure in the Leiden algorithm, only nodes whose neighborhood has changed are visited. -The refinement is done by restarting from a singleton partition within each cluster and gradually merging the subclusters. -When aggregating, a single cluster may then be represented by several nodes (which are the subclusters identified in the refinement). + In the local move procedure in the Leiden algorithm, only nodes whose neighborhood has changed are visited. + The refinement is done by restarting from a singleton partition within each cluster and gradually merging the subclusters. + When aggregating, a single cluster may then be represented by several nodes (which are the subclusters identified in the refinement). The Leiden algorithm provides several guarantees. -The Leiden algorithm is typically iterated: the output of one iteration is used as the input for the next iteration. -At each iteration all clusters are guaranteed to be connected and well-separated. -After an iteration in which nothing has changed, all nodes and some parts are guaranteed to be locally optimally assigned. -Finally, asymptotically, all subsets of all clusters are guaranteed to be locally optimally assigned. -For more details, please see Traag, Waltman & van Eck (2019). + The Leiden algorithm is typically iterated: the output of one iteration is used as the input for the next iteration. + At each iteration all clusters are guaranteed to be connected and well-separated. + After an iteration in which nothing has changed, all nodes and some parts are guaranteed to be locally optimally assigned. + Finally, asymptotically, all subsets of all clusters are guaranteed to be locally optimally assigned. + For more details, please see Traag, Waltman & van Eck (2019). The objective function being optimized is @@ -83,13 +83,13 @@ where \eqn{m}{m} is the total edge weight, \eqn{A_{ij}}{A_ij} is the weight of e \eqn{\gamma}{gamma} is the so-called resolution parameter, \eqn{n_i} is the node weight of node \eqn{i}, \eqn{\sigma_i}{s_i} is the cluster of node \eqn{i} and \eqn{\delta(x, y) = 1}{d(x, y) = 1} if and only if \eqn{x = y} and \eqn{0} otherwise. -By setting \eqn{n_i = k_i}, the degree of node \eqn{i}, and dividing \eqn{\gamma}{gamma} by \eqn{2m}, + By setting \eqn{n_i = k_i}, the degree of node \eqn{i}, and dividing \eqn{\gamma}{gamma} by \eqn{2m}, you effectively obtain an expression for modularity. Hence, the standard modularity will be optimized when you supply the degrees as \code{vertex_weights} and by supplying as a resolution parameter \eqn{\frac{1}{2m}}{1/(2m)}, with \eqn{m} the number of edges. -If you do not specify any \code{vertex_weights}, + If you do not specify any \code{vertex_weights}, the correct vertex weights and scaling of \eqn{\gamma}{gamma} is determined automatically by the \code{objective_function} argument. } \section{Related documentation in the C library}{ diff --git a/man/cluster_louvain.Rd b/man/cluster_louvain.Rd index d4de4e25171..e414abc8bfb 100644 --- a/man/cluster_louvain.Rd +++ b/man/cluster_louvain.Rd @@ -8,27 +8,27 @@ cluster_louvain(graph, ..., weights = NULL, resolution = 1) } \arguments{ \item{graph}{The input graph. -It must be undirected.} + It must be undirected.} \item{...}{These dots are for future extensions and must be empty.} \item{weights}{The weights of the edges. -It must be a positive numeric vector, \code{NULL} or \code{NA}. -If it is \code{NULL} and the input graph has a \sQuote{weight} edge attribute, then that attribute will be used. -If \code{NULL} and no such attribute is present, then the edges will have equal weights. -Set this to \code{NA} if the graph was a \sQuote{weight} edge attribute, but you don't want to use it for community detection. -A larger edge weight means a stronger connection for this function.} + It must be a positive numeric vector, \code{NULL} or \code{NA}. + If it is \code{NULL} and the input graph has a \sQuote{weight} edge attribute, then that attribute will be used. + If \code{NULL} and no such attribute is present, then the edges will have equal weights. + Set this to \code{NA} if the graph was a \sQuote{weight} edge attribute, but you don't want to use it for community detection. + A larger edge weight means a stronger connection for this function.} \item{resolution}{Optional resolution parameter that allows the user to adjust the resolution parameter of the modularity function that the algorithm uses internally. -Lower values typically yield fewer, larger clusters. -The original definition of modularity is recovered when the resolution parameter is set to 1.} + Lower values typically yield fewer, larger clusters. + The original definition of modularity is recovered when the resolution parameter is set to 1.} } \value{ \code{cluster_louvain()} returns a \code{\link[=communities]{communities()}} object, please see the \code{\link[=communities]{communities()}} manual page for details. } \description{ This function implements the multi-level modularity optimization algorithm for finding community structure, see references below. -It is based on the modularity measure and a hierarchical approach. + It is based on the modularity measure and a hierarchical approach. } \details{ This function implements the multi-level modularity optimization algorithm for finding community structure, see VD Blondel, @@ -36,13 +36,13 @@ J-L Guillaume, R Lambiotte and E Lefebvre: Fast unfolding of community hierarchi \url{https://arxiv.org/abs/0803.0476} for the details. It is based on the modularity measure and a hierarchical approach. -Initially, each vertex is assigned to a community on its own. -In every step, vertices are re-assigned to communities in a local, greedy way: + Initially, each vertex is assigned to a community on its own. + In every step, vertices are re-assigned to communities in a local, greedy way: each vertex is moved to the community with which it achieves the highest contribution to modularity. -When no vertices can be reassigned, each community is considered a vertex on its own, + When no vertices can be reassigned, each community is considered a vertex on its own, and the process starts again with the merged communities. -The process stops when there is only a single vertex left or when the modularity cannot be increased any more in a step. -Since igraph 1.3, vertices are processed in a random order. + The process stops when there is only a single vertex left or when the modularity cannot be increased any more in a step. + Since igraph 1.3, vertices are processed in a random order. This function was contributed by Tom Gregorovic. } @@ -61,7 +61,7 @@ cluster_louvain(g) \references{ Vincent D. Blondel, Jean-Loup Guillaume, Renaud Lambiotte, Etienne Lefebvre: Fast unfolding of communities in large networks. J. Stat. -Mech. (2008) P10008 + Mech. (2008) P10008 } \seealso{ See \code{\link[=communities]{communities()}} for extracting the membership, diff --git a/man/cluster_optimal.Rd b/man/cluster_optimal.Rd index 7c9105ab0b9..19c3ba1e96a 100644 --- a/man/cluster_optimal.Rd +++ b/man/cluster_optimal.Rd @@ -8,16 +8,16 @@ cluster_optimal(graph, ..., weights = NULL) } \arguments{ \item{graph}{The input graph. -It may be undirected or directed.} + It may be undirected or directed.} \item{...}{These dots are for future extensions and must be empty.} \item{weights}{The weights of the edges. -It must be a positive numeric vector, \code{NULL} or \code{NA}. -If it is \code{NULL} and the input graph has a \sQuote{weight} edge attribute, then that attribute will be used. -If \code{NULL} and no such attribute is present, then the edges will have equal weights. -Set this to \code{NA} if the graph was a \sQuote{weight} edge attribute, but you don't want to use it for community detection. -A larger edge weight means a stronger connection for this function.} + It must be a positive numeric vector, \code{NULL} or \code{NA}. + If it is \code{NULL} and the input graph has a \sQuote{weight} edge attribute, then that attribute will be used. + If \code{NULL} and no such attribute is present, then the edges will have equal weights. + Set this to \code{NA} if the graph was a \sQuote{weight} edge attribute, but you don't want to use it for community detection. + A larger edge weight means a stronger connection for this function.} } \value{ \code{cluster_optimal()} returns a \code{\link[=communities]{communities()}} object, @@ -31,11 +31,11 @@ This function calculates the optimal community structure for a graph, in terms o The calculation is done by transforming the modularity maximization into an integer programming problem, and then calling the GLPK library to solve that. -Please the reference below for details. + Please the reference below for details. Note that modularity optimization is an NP-complete problem, and all known algorithms for it have exponential time complexity. -This means that you probably don't want to run this function on larger graphs. -Graphs with up to fifty vertices should be fine, graphs with a couple of hundred vertices might be possible. + This means that you probably don't want to run this function on larger graphs. + Graphs with up to fifty vertices should be fine, graphs with a couple of hundred vertices might be possible. } \section{Examples}{ @@ -72,7 +72,7 @@ Martin Hoefer, Zoran Nikoloski, Dorothea Wagner: On Modularity Clustering, } \seealso{ \code{\link[=communities]{communities()}} for the documentation of the result, \code{\link[=modularity]{modularity()}}. -See also \code{\link[=cluster_fast_greedy]{cluster_fast_greedy()}} for a fast greedy optimizer. + See also \code{\link[=cluster_fast_greedy]{cluster_fast_greedy()}} for a fast greedy optimizer. Community detection: \code{\link[=as_membership]{as_membership()}}, diff --git a/man/cluster_spinglass.Rd b/man/cluster_spinglass.Rd index a16e102d25e..06cfe7b63de 100644 --- a/man/cluster_spinglass.Rd +++ b/man/cluster_spinglass.Rd @@ -22,61 +22,61 @@ cluster_spinglass( } \arguments{ \item{graph}{The input graph. -Edge directions are ignored in directed graphs.} + Edge directions are ignored in directed graphs.} \item{...}{These dots are for future extensions and must be empty.} \item{weights}{The weights of the edges. -It must be a positive numeric vector, \code{NULL} or \code{NA}. -If it is \code{NULL} and the input graph has a \sQuote{weight} edge attribute, then that attribute will be used. -If \code{NULL} and no such attribute is present, then the edges will have equal weights. -Set this to \code{NA} if the graph was a \sQuote{weight} edge attribute, but you don't want to use it for community detection. -A larger edge weight means a stronger connection for this function.} + It must be a positive numeric vector, \code{NULL} or \code{NA}. + If it is \code{NULL} and the input graph has a \sQuote{weight} edge attribute, then that attribute will be used. + If \code{NULL} and no such attribute is present, then the edges will have equal weights. + Set this to \code{NA} if the graph was a \sQuote{weight} edge attribute, but you don't want to use it for community detection. + A larger edge weight means a stronger connection for this function.} \item{vertex}{This parameter can be used to calculate the community of a given vertex without calculating all communities. -Note that if this argument is present then some other arguments are ignored.} + Note that if this argument is present then some other arguments are ignored.} \item{spins}{Integer constant, the number of spins to use. -This is the upper limit for the number of communities. -It is not a problem to supply a (reasonably) big number here, in which case some spin states will be unpopulated.} + This is the upper limit for the number of communities. + It is not a problem to supply a (reasonably) big number here, in which case some spin states will be unpopulated.} \item{parupdate}{Logical, whether to update the spins of the vertices in parallel (synchronously) or not. -This argument is ignored if the second form of the function is used (i.e. the \sQuote{\code{vertex}} argument is present). -It is also not implemented in the \dQuote{neg} implementation.} + This argument is ignored if the second form of the function is used (i.e. the \sQuote{\code{vertex}} argument is present). + It is also not implemented in the \dQuote{neg} implementation.} \item{start.temp}{Real constant, the start temperature. -This argument is ignored if the second form of the function is used (i.e. the \sQuote{\code{vertex}} argument is present).} + This argument is ignored if the second form of the function is used (i.e. the \sQuote{\code{vertex}} argument is present).} \item{stop.temp}{Real constant, the stop temperature. -The simulation terminates if the temperature lowers below this level. -This argument is ignored if the second form of the function is used (i.e. the \sQuote{\code{vertex}} argument is present).} + The simulation terminates if the temperature lowers below this level. + This argument is ignored if the second form of the function is used (i.e. the \sQuote{\code{vertex}} argument is present).} \item{cool.fact}{Cooling factor for the simulated annealing. -This argument is ignored + This argument is ignored if the second form of the function is used (i.e. the \sQuote{\code{vertex}} argument is present).} \item{update.rule}{Character constant giving the \sQuote{null-model} of the simulation. -Possible values: \dQuote{simple} and \dQuote{config}. -\dQuote{simple} uses a random graph with the same number of edges as the baseline probability and \dQuote{config} uses a random graph with the same vertex degrees as the input graph.} + Possible values: \dQuote{simple} and \dQuote{config}. + \dQuote{simple} uses a random graph with the same number of edges as the baseline probability and \dQuote{config} uses a random graph with the same vertex degrees as the input graph.} \item{gamma}{Real constant, the gamma argument of the algorithm. -This specifies the balance between the importance of present and non-present edges in a community. -Roughly, a comunity is a set of vertices having many edges inside the community and few edges outside the community. -The default 1.0 value makes existing and non-existing links equally important. -Smaller values make the existing links, greater values the missing links more important.} + This specifies the balance between the importance of present and non-present edges in a community. + Roughly, a comunity is a set of vertices having many edges inside the community and few edges outside the community. + The default 1.0 value makes existing and non-existing links equally important. + Smaller values make the existing links, greater values the missing links more important.} \item{implementation}{Character scalar. -Currently igraph contains two implementations for the Spin-glass community finding algorithm. -The faster original implementation is the default. -The other implementation, that takes into account negative weights, can be chosen by supplying \sQuote{neg} here.} + Currently igraph contains two implementations for the Spin-glass community finding algorithm. + The faster original implementation is the default. + The other implementation, that takes into account negative weights, can be chosen by supplying \sQuote{neg} here.} \item{gamma.minus}{Real constant, the gamma.minus parameter of the algorithm. -This specifies the balance between the importance of present and non-present negative weighted edges in a community. -Smaller values of gamma.minus, leads to communities with lesser negative intra-connectivity. -If this argument is set to zero, the algorithm reduces to a graph coloring algorithm, + This specifies the balance between the importance of present and non-present negative weighted edges in a community. + Smaller values of gamma.minus, leads to communities with lesser negative intra-connectivity. + If this argument is set to zero, the algorithm reduces to a graph coloring algorithm, using the number of spins as the number of colors. -This argument is ignored if the \sQuote{orig} implementation is chosen.} + This argument is ignored if the \sQuote{orig} implementation is chosen.} } \value{ If the \code{vertex} argument is not given, @@ -86,19 +86,19 @@ If the \code{vertex} argument is present, i.e. the second form is used then a na \describe{ \item{community}{ Numeric vector giving the IDs of the vertices in the same community as \code{vertex}. -} + } \item{cohesion}{ The cohesion score of the result, see references. -} + } \item{adhesion}{ The adhesion score of the result, see references. -} + } \item{inner.links}{ The number of edges within the community of \code{vertex}. -} + } \item{outer.links}{ The number of edges between the community of \code{vertex} and the rest of the graph. -} + } } } \description{ @@ -106,19 +106,19 @@ This function tries to find communities in graphs via a spin-glass model and sim } \details{ This function tries to find communities in a graph. -A community is a set of nodes with many edges inside the community and few edges between outside it (i.e. between the community itself and the rest of the graph.) + A community is a set of nodes with many edges inside the community and few edges between outside it (i.e. between the community itself and the rest of the graph.) This idea is reversed for edges having a negative weight, i.e. few negative edges inside a community and many negative edges between communities. -Note that only the \sQuote{neg} implementation supports negative edge weights. + Note that only the \sQuote{neg} implementation supports negative edge weights. The \code{spinglass.cummunity} function can solve two problems related to community detection. -If the \code{vertex} argument is not given (or it is \code{NULL}), then the regular community detection problem is solved (approximately), + If the \code{vertex} argument is not given (or it is \code{NULL}), then the regular community detection problem is solved (approximately), i.e. partitioning the vertices into communities, by optimizing the an energy function. If the \code{vertex} argument is given and it is not \code{NULL}, then it must be a vertex ID, and the same energy function is used to find the community of the the given vertex. -See also the examples below. + See also the examples below. } \section{Related documentation in the C library}{ \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_edges}{\code{edges()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_get_eids}{\code{get_eids()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_ecount}{\code{ecount()}} diff --git a/man/cluster_walktrap.Rd b/man/cluster_walktrap.Rd index 08f39f7fb82..8909bc39cbe 100644 --- a/man/cluster_walktrap.Rd +++ b/man/cluster_walktrap.Rd @@ -16,24 +16,24 @@ cluster_walktrap( } \arguments{ \item{graph}{The input graph. -Edge directions are ignored in directed graphs.} + Edge directions are ignored in directed graphs.} \item{...}{These dots are for future extensions and must be empty.} \item{weights}{The weights of the edges. -It must be a positive numeric vector, \code{NULL} or \code{NA}. -If it is \code{NULL} and the input graph has a \sQuote{weight} edge attribute, then that attribute will be used. -If \code{NULL} and no such attribute is present, then the edges will have equal weights. -Set this to \code{NA} if the graph was a \sQuote{weight} edge attribute, but you don't want to use it for community detection. -Larger edge weights increase the probability that an edge is selected by the random walker. -In other words, larger edge weights correspond to stronger connections.} + It must be a positive numeric vector, \code{NULL} or \code{NA}. + If it is \code{NULL} and the input graph has a \sQuote{weight} edge attribute, then that attribute will be used. + If \code{NULL} and no such attribute is present, then the edges will have equal weights. + Set this to \code{NA} if the graph was a \sQuote{weight} edge attribute, but you don't want to use it for community detection. + Larger edge weights increase the probability that an edge is selected by the random walker. + In other words, larger edge weights correspond to stronger connections.} \item{steps}{The length of the random walks to perform.} \item{merges}{Logical, whether to include the merge matrix in the result.} \item{modularity}{Logical, whether to include the vector of the modularity scores in the result. -If the \code{membership} argument is true, then it will always be calculated.} + If the \code{membership} argument is true, then it will always be calculated.} \item{membership}{Logical, whether to calculate the membership vector for the split corresponding to the highest modularity value.} } @@ -42,7 +42,7 @@ If the \code{membership} argument is true, then it will always be calculated.} } \description{ This function tries to find densely connected subgraphs, also called communities in a graph via random walks. -The idea is that short random walks tend to stay in the same community. + The idea is that short random walks tend to stay in the same community. } \details{ This function is the implementation of the Walktrap community finding algorithm, see Pascal Pons, Matthieu Latapy: diff --git a/man/clusters.Rd b/man/clusters.Rd index ea63c6d3d4e..8e32355222c 100644 --- a/man/clusters.Rd +++ b/man/clusters.Rd @@ -10,9 +10,9 @@ clusters(graph, mode = c("weak", "strong")) \item{graph}{The graph to analyze.} \item{mode}{Character string, either \dQuote{weak} or \dQuote{strong}. -For directed graphs \dQuote{weak} implies weakly, + For directed graphs \dQuote{weak} implies weakly, \dQuote{strong} strongly connected components to search. -It is ignored for undirected graphs.} + It is ignored for undirected graphs.} } \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/cocitation.Rd b/man/cocitation.Rd index 07eb621dec7..892120f5d6b 100644 --- a/man/cocitation.Rd +++ b/man/cocitation.Rd @@ -14,16 +14,16 @@ bibcoupling(graph, v = NULL) \item{v}{Vertex sequence or numeric vector, the vertex IDs for which the cocitation or bibliographic coupling values we want to calculate. -The default \code{NULL} selects all vertices.} + The default \code{NULL} selects all vertices.} } \value{ A numeric matrix with \code{length(v)} lines and \code{vcount(graph)} columns. -Element \verb{(i,j)} contains the cocitation or bibliographic coupling for vertices \code{v[i]} and \code{j}. + Element \verb{(i,j)} contains the cocitation or bibliographic coupling for vertices \code{v[i]} and \code{j}. } \description{ Two vertices are cocited if there is another vertex citing both of them. -\code{cocitation()} simply counts how many types two vertices are cocited. -The bibliographic coupling of two vertices is the number of other vertices they both cite, \code{bibcoupling()} calculates this. + \code{cocitation()} simply counts how many types two vertices are cocited. + The bibliographic coupling of two vertices is the number of other vertices they both cite, \code{bibcoupling()} calculates this. } \details{ \code{cocitation()} calculates the cocitation counts for the vertices in the \code{v} argument and all vertices in the graph. @@ -31,7 +31,7 @@ The bibliographic coupling of two vertices is the number of other vertices they \code{bibcoupling()} calculates the bibliographic coupling for vertices in \code{v} and all vertices in the graph. Calculating the cocitation or bibliographic coupling for only one vertex costs the same amount of computation as for all vertices. -This might change in the future. + This might change in the future. } \section{Related documentation in the C library}{ \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_cocitation}{\code{cocitation()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_bibcoupling}{\code{bibcoupling()}} diff --git a/man/cohesive.blocks.Rd b/man/cohesive.blocks.Rd index a3337b8f586..f5b4bc9cda1 100644 --- a/man/cohesive.blocks.Rd +++ b/man/cohesive.blocks.Rd @@ -8,13 +8,13 @@ cohesive.blocks(graph, labels = TRUE) } \arguments{ \item{graph}{For \code{cohesive_blocks()} a graph object of class \code{igraph}. -It must be undirected and simple. -(See \code{\link[=is_simple]{is_simple()}}.) + It must be undirected and simple. + (See \code{\link[=is_simple]{is_simple()}}.) For \code{graphs_from_cohesive_blocks()} and \code{export_pajek()} the same graph must be supplied whose cohesive block structure is given in the \code{blocks()} argument.} \item{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.} + These labels can be then used when reporting and plotting the cohesive blocks.} } \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 2d84835ef4a..dc5e579df56 100644 --- a/man/cohesive_blocks.Rd +++ b/man/cohesive_blocks.Rd @@ -52,53 +52,53 @@ max_cohesion(blocks) } \arguments{ \item{graph}{For \code{cohesive_blocks()} a graph object of class \code{igraph}. -It must be undirected and simple. -(See \code{\link[=is_simple]{is_simple()}}.) + It must be undirected and simple. + (See \code{\link[=is_simple]{is_simple()}}.) For \code{graphs_from_cohesive_blocks()} and \code{export_pajek()} the same graph must be 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. -\code{cohesive_blocks()} and \code{export_pajek()} do not accept extra arguments; these dots must be empty for them.} + \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. + \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 cohesive blocks.} + These labels can be then used when reporting and plotting the cohesive blocks.} \item{blocks, x, object}{A \code{cohesiveBlocks} object, created with the \code{cohesive_blocks()} function.} \item{y}{The graph whose cohesive blocks are supplied in the \code{x} argument.} \item{colbar}{Color bar for the vertex colors. -Its length should be at least \eqn{m+1}, where \eqn{m} is the maximum cohesion in the graph. -Alternatively, the vertex colors can also be directly specified via the \code{col} argument.} + Its length should be at least \eqn{m+1}, where \eqn{m} is the maximum cohesion in the graph. + Alternatively, the vertex colors can also be directly specified via the \code{col} argument.} \item{col}{A vector of vertex colors, in any of the usual formats. -(Symbolic color names (e.g. \sQuote{red}, \sQuote{blue}, etc.) , RGB colors (e.g. \sQuote{#FF9900FF}), + (Symbolic color names (e.g. \sQuote{red}, \sQuote{blue}, etc.) , RGB colors (e.g. \sQuote{#FF9900FF}), integer numbers referring to the current palette. -By default the given \code{colbar} is used and vertices with the same maximal cohesion will have the same color.} + By default the given \code{colbar} is used and vertices with the same maximal cohesion will have the same color.} \item{mark.groups}{A list of vertex sets to mark on the plot by circling them. -By default all cohesive blocks are marked, except the one corresponding to the all vertices.} + By default all cohesive blocks are marked, except the one corresponding to the all vertices.} \item{layout}{The layout of a plot, it is simply passed on to \code{plot.igraph()}, see the possible formats there. -The default \code{NULL} uses the Reingold-Tilford layout generator.} + The default \code{NULL} uses the Reingold-Tilford layout generator.} \item{file}{Defines the file (or connection) the Pajek file is written to. If the \code{project.file} argument is \code{TRUE}, then it can be a filename (with extension), a file object, or in general any king of connection object. -The file/connection will be opened if it wasn't already. + The file/connection will be opened if it wasn't already. If the \code{project.file} argument is \code{FALSE}, then several files are created and \code{file} must be a character scalar containing the base name of the files, without extension. -(But it can contain the path to the files.) + (But it can contain the path to the files.) See also details below.} \item{project.file}{Logical, whether to create a single Pajek project file containing all the data, or to create separated files for each item. -See details below.} + See details below.} } \value{ \code{cohesive_blocks()} returns a \code{cohesiveBlocks} object. @@ -112,7 +112,7 @@ See details below.} \code{hierarchy()} returns an igraph graph, the representation of the cohesive block hierarchy. \code{parent()} returns a numeric vector giving the parent block of each cohesive block, in the block hierarchy. -The block at the root of the hierarchy has no parent and \code{0} is returned for it. + The block at the root of the hierarchy has no parent and \code{0} is returned for it. \code{plot_hierarchy()}, \code{\link[=plot]{plot()}} and \code{export_pajek()} return \code{NULL}, invisibly. @@ -129,31 +129,31 @@ Calculates cohesive blocks for objects of class \code{igraph}. } \details{ Cohesive blocking is a method of determining hierarchical subsets of graph vertices based on their structural cohesion (or vertex connectivity). -For a given graph \eqn{G}, + For a given graph \eqn{G}, a subset of its vertices \eqn{S\subset V(G)}{S} is said to be maximally \eqn{k}-cohesive if there is no superset of \eqn{S} with vertex connectivity greater than or equal to \eqn{k}. -Cohesive blocking is a process through which, given a \eqn{k}-cohesive set of vertices, + Cohesive blocking is a process through which, given a \eqn{k}-cohesive set of vertices, maximally \eqn{l}-cohesive subsets are recursively identified with \eqn{l>k}. -Thus a hierarchy of vertex subsets is found, with the entire graph \eqn{G} at its root. + Thus a hierarchy of vertex subsets is found, with the entire graph \eqn{G} at its root. The function \code{cohesive_blocks()} implements cohesive blocking. -It returns a \code{cohesiveBlocks} object. -\code{cohesiveBlocks} should be handled as an opaque class, i.e. its internal structure should not be accessed directly, + It returns a \code{cohesiveBlocks} object. + \code{cohesiveBlocks} should be handled as an opaque class, i.e. its internal structure should not be accessed directly, but through the functions listed here. The function \code{length} can be used on \code{cohesiveBlocks} objects and it gives the number of blocks. The function \code{blocks()} returns the actual blocks stored in the \code{cohesiveBlocks} object. -They are returned in a list of numeric vectors, each containing vertex IDs. + They are returned in a list of numeric vectors, each containing vertex IDs. The function \code{graphs_from_cohesive_blocks()} is similar, but returns the blocks as (induced) subgraphs of the input graph. -The various (graph, vertex and edge) attributes are kept in the subgraph. + The various (graph, vertex and edge) attributes are kept in the subgraph. The function \code{cohesion()} returns a numeric vector, the cohesion of the different blocks. -The order of the blocks is the same as for the \code{blocks()} and \code{graphs_from_cohesive_blocks()} functions. + The order of the blocks is the same as for the \code{blocks()} and \code{graphs_from_cohesive_blocks()} functions. The block hierarchy can be queried using the \code{hierarchy()} function. -It returns an igraph graph, + It returns an igraph graph, its vertex IDs are ordered according the order of the blocks in the \code{blocks()} and \code{graphs_from_cohesive_blocks()}, \code{cohesion()}, etc. functions. @@ -163,13 +163,13 @@ for the root vertex it gives 0. \code{plot_hierarchy()} plots the hierarchy tree of the cohesive blocks on the active graphics device, by calling \code{igraph.plot}. The \code{export_pajek()} function can be used to export the graph and its cohesive blocks in Pajek format. -It can either export a single Pajek project file with all the information, or a set of files, depending on its \code{project.file} argument. -If \code{project.file} is \code{TRUE}, then the following information is written to the file (or connection) given in the \code{file} argument: + It can either export a single Pajek project file with all the information, or a set of files, depending on its \code{project.file} argument. + If \code{project.file} is \code{TRUE}, then the following information is written to the file (or connection) given in the \code{file} argument: (1) the input graph, together with its attributes, see \code{\link[=write_graph]{write_graph()}} for details; (2) the hierarchy graph; and (3) one binary partition for each cohesive block. -If \code{project.file} is \code{FALSE}, + If \code{project.file} is \code{FALSE}, then the \code{file} argument must be a character scalar and it is used as the base name for the generated files. -If \code{file} is \sQuote{basename}, then the following files are created: (1) \sQuote{basename.net} for the original graph; + If \code{file} is \sQuote{basename}, then the following files are created: (1) \sQuote{basename.net} for the original graph; (2) \sQuote{basename_hierarchy.net} for the hierarchy graph; (3) \sQuote{basename_block_x.net} for each cohesive block, where \sQuote{x} is the number of the block, starting with one. @@ -179,7 +179,7 @@ The generic function \code{\link[=summary]{summary()}} works on \code{cohesiveBl The generic function \code{\link[=print]{print()}} is also defined on \code{cohesiveBlocks} objects and it is invoked automatically if the name of the \code{cohesiveBlocks} object is typed in. -It produces an output like this: + It produces an output like this: \preformatted{ Cohesive block structure: B-1 c 1, n 23 '- B-2 c 2, n 14 oooooooo.. .o......oo ooo @@ -187,10 +187,10 @@ B-1 c 1, n 23 '- B-3 c 2, n 10 ......o.oo o.oooooo.. ... '- B-5 c 3, n 4 ......o.oo o......... ... } The left part shows the block structure, in this case for five blocks. -The first block always corresponds to the whole graph, even if its cohesion is zero. -Then cohesion of the block and the number of vertices in the block are shown. -The last part is only printed if the display is wide enough and shows the vertices in the blocks, ordered by vertex IDs. -\sQuote{o} means that the vertex is included, a dot means that it is not, and the vertices are shown in groups of ten. + The first block always corresponds to the whole graph, even if its cohesion is zero. + Then cohesion of the block and the number of vertices in the block are shown. + The last part is only printed if the display is wide enough and shows the vertices in the blocks, ordered by vertex IDs. + \sQuote{o} means that the vertex is included, a dot means that it is not, and the vertices are shown in groups of ten. The generic function \code{\link[=plot]{plot()}} plots the graph, showing one or more cohesive blocks in it. } diff --git a/man/communities.Rd b/man/communities.Rd index 304decc02f2..149d01d076b 100644 --- a/man/communities.Rd +++ b/man/communities.Rd @@ -62,8 +62,8 @@ communities(x) \item{communities, x, object}{A \code{communities} object, the result of an igraph community detection function.} \item{\dots}{Additional arguments. -\code{plot.communities} passes these to \code{\link[=plot.igraph]{plot.igraph()}}. -The other functions silently ignore them.} + \code{plot.communities} passes these to \code{\link[=plot.igraph]{plot.igraph()}}. + The other functions silently ignore them.} \item{graph}{An igraph graph object, corresponding to \code{communities}.} @@ -73,38 +73,38 @@ see \code{\link[=plot.hclust]{plot.hclust()}}.} \item{use.modularity}{Logical, whether to use the modularity values to define the height of the branches.} \item{no}{Integer scalar, the desired number of communities. -If too low or two high, then an error message is given. -Exactly one of \code{no} and \code{steps} must be supplied.} + If too low or two high, then an error message is given. + Exactly one of \code{no} and \code{steps} must be supplied.} \item{steps}{The number of merge operations to perform to produce the communities. -Exactly one of \code{no} and \code{steps} must be supplied.} + Exactly one of \code{no} and \code{steps} must be supplied.} \item{y}{An igraph graph object, corresponding to the communities in \code{x}.} \item{col}{A vector of colors, in any format that is accepted by the regular R plotting methods. -This vector gives the colors of the vertices explicitly.} + This vector gives the colors of the vertices explicitly.} \item{mark.groups}{A list of numeric vectors. -The communities can be highlighted using colored polygons. -The groups for which the polygons are drawn are given here. -The default is to use the groups given by the communities. -Supply \code{NULL} here if you do not want to highlight any groups.} + The communities can be highlighted using colored polygons. + The groups for which the polygons are drawn are given here. + The default is to use the groups given by the communities. + Supply \code{NULL} here if you do not want to highlight any groups.} \item{edge.color}{The colors of the edges. -By default the edges within communities are colored green and other edges are red.} + By default the edges within communities are colored green and other edges are red.} \item{membership}{Numeric vector, one value for each vertex, the membership vector of the community structure. -Might also be \code{NULL} if the community structure is given in another way, e.g. by a merge matrix.} + Might also be \code{NULL} if the community structure is given in another way, e.g. by a merge matrix.} \item{algorithm}{Name of the algorithm that produced the community structure (character scalar). -Default: \code{NULL}, meaning an unknown algorithm.} + Default: \code{NULL}, meaning an unknown algorithm.} \item{merges}{Merge matrix of the hierarchical community structure. -See \code{merges()} below for more information on its format. -Default: \code{NULL}.} + See \code{merges()} below for more information on its format. + Default: \code{NULL}.} \item{modularity}{Numeric scalar or vector, the modularity value of the community structure. -It can also be \code{NULL}, if the modularity of the (best) split is not available.} + It can also be \code{NULL}, if the modularity of the (best) split is not available.} } \value{ \code{\link[=print]{print()}} returns the \code{communities} object itself, @@ -138,15 +138,15 @@ invisibly. } \description{ igraph community detection functions return their results as an object from the \code{communities} class. -This manual page describes the operations of this class. + This manual page describes the operations of this class. } \details{ Community structure detection algorithms try to find dense subgraphs in directed or undirected graphs, by optimizing some criteria, and usually using heuristics. igraph implements a number of community detection methods (see them below), all of which return an object of the class \code{communities}. -Because the community structure detection algorithms are different, \code{communities} objects do not always have the same structure. -Nevertheless, they have some common operations, these are documented here. + Because the community structure detection algorithms are different, \code{communities} objects do not always have the same structure. + Nevertheless, they have some common operations, these are documented here. The \code{\link[=print]{print()}} generic function is defined for \code{communities}, it prints a short summary. @@ -155,41 +155,41 @@ The \code{length} generic function call be called on \code{communities} and retu The \code{sizes()} function returns the community sizes, in the order of their IDs. \code{membership()} gives the division of the vertices, into communities. -It returns a numeric vector, one value for each vertex, the ID of its community. -Community IDs start from one. -Note that some algorithms calculate the complete (or incomplete) hierarchical structure of the communities, + It returns a numeric vector, one value for each vertex, the ID of its community. + Community IDs start from one. + Note that some algorithms calculate the complete (or incomplete) hierarchical structure of the communities, and not just a single partitioning. -For these algorithms typically the membership for the highest modularity value is returned, + For these algorithms typically the membership for the highest modularity value is returned, but see also the manual pages of the individual algorithms. \code{communities()} is also the name of a function, that returns a list of communities, each identified by their vertices. -The vertices will have symbolic names if the \code{add.vertex.names} igraph option is set, and the graph itself was named. -Otherwise numeric vertex IDs are used. + The vertices will have symbolic names if the \code{add.vertex.names} igraph option is set, and the graph itself was named. + Otherwise numeric vertex IDs are used. \code{modularity()} gives the modularity score of the partitioning. -(See \code{\link[=modularity.igraph]{modularity.igraph()}} for details. -For algorithms that do not result a single partitioning, the highest modularity value is returned. + (See \code{\link[=modularity.igraph]{modularity.igraph()}} for details. + For algorithms that do not result a single partitioning, the highest modularity value is returned. \code{algorithm()} gives the name of the algorithm that was used to calculate the community structure. \code{crossing()} returns a logical vector, with one value for each edge, ordered according to the edge IDs. -The value is \code{TRUE} iff the edge connects two different communities, according to the (best) membership vector, + The value is \code{TRUE} iff the edge connects two different communities, according to the (best) membership vector, as returned by \code{membership()}. \code{is_hierarchical()} checks whether a hierarchical algorithm was used to find the community structure. -Some functions only make sense for hierarchical methods (e.g. \code{merges()}, \code{cut_at()} and \code{\link[=as.dendrogram]{as.dendrogram()}}). + Some functions only make sense for hierarchical methods (e.g. \code{merges()}, \code{cut_at()} and \code{\link[=as.dendrogram]{as.dendrogram()}}). \code{merges()} returns the merge matrix for hierarchical methods. -An error message is given, if a non-hierarchical method was used to find the community structure. -You can check this by calling \code{is_hierarchical()} on the \code{communities} object. + An error message is given, if a non-hierarchical method was used to find the community structure. + You can check this by calling \code{is_hierarchical()} on the \code{communities} object. \code{cut_at()} cuts the merge tree of a hierarchical community finding method, at the desired place and returns a membership vector. -The desired place can be expressed as the desired number of communities or as the number of merge steps to make. -The function gives an error message, if called with a non-hierarchical method. + The desired place can be expressed as the desired number of communities or as the number of merge steps to make. + The function gives an error message, if called with a non-hierarchical method. \code{\link[=as.dendrogram]{as.dendrogram()}} converts a hierarchical community structure to a \code{dendrogram} object. -It only works for hierarchical methods, and gives an error message to others. -See \code{\link[stats:dendrogram]{stats::dendrogram()}} for details. + It only works for hierarchical methods, and gives an error message to others. + See \code{\link[stats:dendrogram]{stats::dendrogram()}} for details. \code{\link[stats:as.hclust]{stats::as.hclust()}} is similar to \code{\link[=as.dendrogram]{as.dendrogram()}}, but converts a hierarchical community structure to a \code{hclust} object. @@ -201,9 +201,9 @@ and returns a character vector that gives the steps performed by the algorithm w \code{code_len()} is defined for the InfoMAP method (\code{\link[=cluster_infomap]{cluster_infomap()}} and returns the code length of the partition. It is possibly to call the \code{\link[=plot]{plot()}} function on \code{communities} objects. -This will plot the graph (and uses \code{\link[=plot.igraph]{plot.igraph()}} internally), with the communities shown. -By default it colores the vertices according to their communities, and also marks the vertex groups corresponding to the communities. -It passes additional arguments to \code{\link[=plot.igraph]{plot.igraph()}}, please see that and also \link{igraph.plotting} on how to change the plot. + This will plot the graph (and uses \code{\link[=plot.igraph]{plot.igraph()}} internally), with the communities shown. + By default it colores the vertices according to their communities, and also marks the vertex groups corresponding to the communities. + It passes additional arguments to \code{\link[=plot.igraph]{plot.igraph()}}, please see that and also \link{igraph.plotting} on how to change the plot. } \section{Related documentation in the C library}{ \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_get_edgelist}{\code{get_edgelist()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Community.html#igraph_le_community_to_membership}{\code{le_community_to_membership()}} diff --git a/man/compare.Rd b/man/compare.Rd index e3489205538..1024417e36e 100644 --- a/man/compare.Rd +++ b/man/compare.Rd @@ -15,13 +15,13 @@ compare( \arguments{ \item{comm1}{A \code{\link[=communities]{communities()}} object containing a community structure; or a numeric vector, the membership vector of the first community structure. -The membership vector should contain the community ID of each vertex, the numbering of the communities starts with one.} + The membership vector should contain the community ID of each vertex, the numbering of the communities starts with one.} \item{comm2}{A \code{\link[=communities]{communities()}} object containing a community structure; or a numeric vector, the membership vector of the second community structure, in the same format as for the previous argument.} \item{method}{Character scalar, the comparison method to use. -Possible values: \sQuote{vi} is the variation of information (VI) metric of Meila (2003), + Possible values: \sQuote{vi} is the variation of information (VI) metric of Meila (2003), \sQuote{nmi} is the normalized mutual information measure proposed by Danon et al. (2005), \sQuote{split.join} is the split-join distance of can Dongen (2000), \sQuote{rand} is the Rand index of Rand (1971), \sQuote{adjusted.rand} is the adjusted Rand index by Hubert and Arabie (1985).} @@ -47,7 +47,7 @@ compare(membership(sg), membership(le)) } \references{ Meila M: Comparing clusterings by the variation of information. -In: Scholkopf B, Warmuth MK (eds.). \emph{Learning Theory and Kernel + In: Scholkopf B, Warmuth MK (eds.). \emph{Learning Theory and Kernel Machines: 16th Annual Conference on Computational Learning Theory and 7th Kernel Workshop}, COLT/Kernel 2003, Washington, DC, USA. Lecture Notes in Computer Science, vol. 2777, Springer, 2003. ISBN: 978-3-540-40720-1. @@ -60,7 +60,7 @@ experiments. Technical Report INS-R0012, National Research Institute for Mathematics and Computer Science in the Netherlands, Amsterdam, May 2000. Rand WM: Objective criteria for the evaluation of clustering methods. -\emph{J Am Stat Assoc} 66(336):846-850, 1971. + \emph{J Am Stat Assoc} 66(336):846-850, 1971. Hubert L and Arabie P: Comparing partitions. \emph{Journal of Classification} 2:193-218, 1985. diff --git a/man/complementer.Rd b/man/complementer.Rd index 266d34aa9f8..cfd3a42fe84 100644 --- a/man/complementer.Rd +++ b/man/complementer.Rd @@ -21,7 +21,7 @@ A complementer graph contains all edges that were not present in the input graph } \details{ \code{complementer()} creates the complementer of a graph. -Only edges which are \emph{not} present in the original graph will be included in the new graph. + Only edges which are \emph{not} present in the original graph will be included in the new graph. \code{complementer()} keeps graph and vertex attriubutes, edge attributes are lost. } diff --git a/man/components.Rd b/man/components.Rd index 0f7c89e2130..d5ce854694c 100644 --- a/man/components.Rd +++ b/man/components.Rd @@ -24,15 +24,15 @@ count_components(graph, ..., mode = c("weak", "strong")) \item{cumulative}{Logical, if TRUE the cumulative distirubution (relative frequency) is calculated.} \item{mul.size}{Logical. -If TRUE the relative frequencies will be multiplied by the cluster sizes.} + If TRUE the relative frequencies will be multiplied by the cluster sizes.} \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.} + 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, + For directed graphs \dQuote{weak} implies weakly, \dQuote{strong} strongly connected components to search. -It is ignored for undirected graphs.} + It is ignored for undirected graphs.} } \value{ For \code{is_connected()} a Logical. @@ -41,20 +41,20 @@ For \code{components()} a named list with three components: \describe{ \item{membership}{ numeric vector giving the cluster ID to which each vertex belongs. -} + } \item{csize}{ numeric vector giving the sizes of the clusters. -} + } \item{no}{ numeric constant, the number of clusters. -} + } } For \code{count_components()} an integer constant is returned. For \code{component_distribution()} a numeric vector with the relative frequencies. -The length of the vector is the size of the largest component plus one. -Note that (for currently unknown reasons) the first element of the vector is the number of clusters of size zero, + The length of the vector is the size of the largest component plus one. + Note that (for currently unknown reasons) the first element of the vector is the number of clusters of size zero, so this is always zero. For \code{largest_component()} the largest connected component of the graph. @@ -64,7 +64,7 @@ Calculate the maximal (weakly or strongly) connected components of a graph } \details{ \code{is_connected()} decides whether the graph is weakly or strongly connected. -The null graph is considered disconnected. + The null graph is considered disconnected. \code{components()} finds the maximal (weakly or strongly) connected components of a graph. @@ -73,12 +73,12 @@ The null graph is considered disconnected. \code{component_distribution()} creates a histogram for the maximal connected component sizes. \code{largest_component()} returns the largest connected component of a graph. -For directed graphs, optionally the largest weakly or strongly connected component. -In case of a tie, the first component by vertex ID order is returned. -Vertex IDs from the original graph are not retained in the returned graph. + For directed graphs, optionally the largest weakly or strongly connected component. + In case of a tie, the first component by vertex ID order is returned. + Vertex IDs from the original graph are not retained in the returned graph. The weakly connected components are found by a simple breadth-first search. -The strongly connected components are implemented by two consecutive depth-first searches. + The strongly connected components are implemented by two consecutive depth-first searches. } \section{Related documentation in the C library}{ \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_connected_components}{\code{connected_components()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Operators.html#igraph_induced_subgraph}{\code{induced_subgraph()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_is_connected}{\code{is_connected()}} diff --git a/man/compose.Rd b/man/compose.Rd index 16f9e967bef..23348149515 100644 --- a/man/compose.Rd +++ b/man/compose.Rd @@ -23,14 +23,14 @@ compose( \item{...}{These dots are for future extensions and must be empty.} \item{byname}{A Logical, or the character scalar \code{auto}. -Whether to perform the operation based on symbolic vertex names. -If it is \code{auto}, that means \code{TRUE} if both graphs are named and \code{FALSE} otherwise. -A warning is generated if \code{auto} and one graph, but not both graphs are named.} + Whether to perform the operation based on symbolic vertex names. + If it is \code{auto}, that means \code{TRUE} if both graphs are named and \code{FALSE} otherwise. + A warning is generated if \code{auto} and one graph, but not both graphs are named.} \item{graph.attr.comb, vertex.attr.comb, edge.attr.comb}{Specification for combining clashing graph, vertex and edge attributes. -\code{vertex.attr.comb} and \code{edge.attr.comb} default to \code{"rename"}; + \code{vertex.attr.comb} and \code{edge.attr.comb} default to \code{"rename"}; \code{graph.attr.comb} defaults to the \code{graph.attr.comb} igraph option (\code{"rename"} unless changed via \code{\link[=igraph_options]{igraph_options()}}). -See \link{igraph-attribute-combination} for the available combiners.} + See \link{igraph-attribute-combination} for the available combiners.} } \value{ A new graph object. @@ -40,37 +40,37 @@ Relational composition of two graph. } \details{ \code{compose()} creates the relational composition of two graphs. -The new graph will contain an (a,b) edge only if there is a vertex c, + The new graph will contain an (a,b) edge only if there is a vertex c, such that edge (a,c) is included in the first graph and (c,b) is included in the second graph. -The corresponding operator is \verb{\%c\%}. + The corresponding operator is \verb{\%c\%}. The function gives an error if one of the input graphs is directed and the other is undirected. If the \code{byname} argument is \code{TRUE} (or \code{auto} and the graphs are all named), then the operation is performed based on symbolic vertex names. -Otherwise numeric vertex IDs are used. + Otherwise numeric vertex IDs are used. \code{compose()} keeps the attributes of both graphs. -All graph, vertex and edge attributes are copied to the result. -By default, if an attribute is present in both graphs and would result in a name clash, that attribute is renamed by adding suffixes: + All graph, vertex and edge attributes are copied to the result. + By default, if an attribute is present in both graphs and would result in a name clash, that attribute is renamed by adding suffixes: \verb{_1}, \verb{_2}. -Pass \code{graph.attr.comb}, \code{vertex.attr.comb} or \code{edge.attr.comb} to combine clashing attributes instead; + Pass \code{graph.attr.comb}, \code{vertex.attr.comb} or \code{edge.attr.comb} to combine clashing attributes instead; see \link{igraph-attribute-combination} for the available combiners. The \code{name} vertex attribute is treated specially if the operation is performed based on symbolic vertex names. -In this case \code{name} must be present in both graphs, and it is not renamed in the result graph. + In this case \code{name} must be present in both graphs, and it is not renamed in the result graph. Note that an edge in the result graph corresponds to two edges in the input, one in the first graph, one in the second. -This mapping is not injective and several edges in the result might correspond to the same edge in the first (and/or the second) graph. -The edge attributes in the result graph are updated accordingly. + This mapping is not injective and several edges in the result might correspond to the same edge in the first (and/or the second) graph. + The edge attributes in the result graph are updated accordingly. Also note that the function may generate multigraphs, if there are more than one way to find edges (a,b) in g1 and (b,c) in g2 for an edge (a,c) in the result. -See \code{\link[=simplify]{simplify()}} if you want to get rid of the multiple edges. + See \code{\link[=simplify]{simplify()}} if you want to get rid of the multiple edges. The function may create loop edges, if edges (a,b) and (b,a) are present in g1 and g2, respectively, then (a,a) is included in the result. -See \code{\link[=simplify]{simplify()}} if you want to get rid of the self-loops. + See \code{\link[=simplify]{simplify()}} if you want to get rid of the self-loops. } \section{Related documentation in the C library}{ \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Isomorphism.html#igraph_permute_vertices}{\code{permute_vertices()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_get_eids}{\code{get_eids()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_edges}{\code{edges()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_ecount}{\code{ecount()}} diff --git a/man/connect.neighborhood.Rd b/man/connect.neighborhood.Rd index 86397bbc1fd..2a316b20fa0 100644 --- a/man/connect.neighborhood.Rd +++ b/man/connect.neighborhood.Rd @@ -10,14 +10,14 @@ connect.neighborhood(graph, order, mode = c("all", "out", "in", "total")) \item{graph}{The input graph.} \item{order}{Integer giving the order of the neighborhood. -Negative values indicate an infinite order.} + Negative values indicate an infinite order.} \item{mode}{Character constant, it specifies how to use the direction of the edges if a directed graph is analyzed. -For \sQuote{out} only the outgoing edges are followed, + For \sQuote{out} only the outgoing edges are followed, so all vertices reachable from the source vertex in at most \code{order} steps are counted. -For \sQuote{"in"} all vertices from which the source vertex is reachable in at most \code{order} steps are counted. -\sQuote{"all"} ignores the direction of the edges. -This argument is ignored for undirected graphs.} + For \sQuote{"in"} all vertices from which the source vertex is reachable in at most \code{order} steps are counted. + \sQuote{"all"} ignores the direction of the edges. + This argument is ignored for undirected graphs.} } \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/consensus_tree.Rd b/man/consensus_tree.Rd index f9abb94cb68..5277a56ecac 100644 --- a/man/consensus_tree.Rd +++ b/man/consensus_tree.Rd @@ -10,7 +10,7 @@ consensus_tree(graph, hrg = NULL, ..., start = FALSE, num.samples = 10000) \item{graph}{The graph the models were fitted to.} \item{hrg}{A hierarchical random graph model, in the form of an \code{igraphHRG} object. -\code{consensus_tree()} allows this to be \code{NULL} as well, then a HRG is fitted to the graph first, from a random starting point.} + \code{consensus_tree()} allows this to be \code{NULL} as well, then a HRG is fitted to the graph first, from a random starting point.} \item{...}{These dots are for future extensions and must be empty.} @@ -20,26 +20,26 @@ consensus_tree(graph, hrg = NULL, ..., start = FALSE, num.samples = 10000) } \value{ \code{consensus_tree()} returns a list of two objects. -The first is an \code{igraphHRGConsensus} object, the second is an \code{igraphHRG} object. -The \code{igraphHRGConsensus} object has the following members: + The first is an \code{igraphHRGConsensus} object, the second is an \code{igraphHRG} object. + The \code{igraphHRGConsensus} object has the following members: \describe{ \item{parents}{ For each vertex, the ID of its parent vertex is stored, or zero, if the vertex is the root vertex in the tree. -The first n vertex IDs (from 0) refer to the original vertices of the graph, + The first n vertex IDs (from 0) refer to the original vertices of the graph, the other IDs refer to vertex groups. -} + } \item{weights}{ Numeric vector, counts the number of times a given tree split occurred in the generated network samples, for each internal vertices. -The order is the same as in the \code{parents} vector. -} + The order is the same as in the \code{parents} vector. + } } } \description{ \code{consensus_tree()} creates a consensus tree from several fitted hierarchical random graph models, using phylogeny methods. -If the \code{hrg()} argument is given and \code{start} is set to \code{TRUE}, then it starts sampling from the given HRG. -Otherwise it optimizes the HRG log-likelihood first, and then samples starting from the optimum. + If the \code{hrg()} argument is given and \code{start} is set to \code{TRUE}, then it starts sampling from the given HRG. + Otherwise it optimizes the HRG log-likelihood first, and then samples starting from the optimum. } \section{Related documentation in the C library}{ \href{https://igraph.org/c/html/0.10.17/igraph-HRG.html#igraph_hrg_consensus}{\code{hrg_consensus()}} diff --git a/man/console.Rd b/man/console.Rd index 88d20e8b4f6..63749bf2583 100644 --- a/man/console.Rd +++ b/man/console.Rd @@ -14,10 +14,10 @@ The igraph console is a GUI window that shows what the currently running igraph } \details{ The console can be started by calling the \code{console()} function. -Then it stays open, until the user closes it. + Then it stays open, until the user closes it. Another way to start it to set the \code{verbose} igraph option to \dQuote{tkconsole} via \code{igraph_options()}. -Then the console (re)opens each time an igraph function supporting it starts; to close it, set the \code{verbose} option to another value. + Then the console (re)opens each time an igraph function supporting it starts; to close it, set the \code{verbose} option to another value. The console is written in Tcl/Tk and required the \code{tcltk} package. } diff --git a/man/constraint.Rd b/man/constraint.Rd index fa170af55ee..d74b65b6ac4 100644 --- a/man/constraint.Rd +++ b/man/constraint.Rd @@ -10,13 +10,13 @@ constraint(graph, nodes = NULL, ..., weights = NULL) \item{graph}{A graph object, the input graph.} \item{nodes}{The vertices for which the constraint will be calculated. -The default \code{NULL} selects all vertices.} + The default \code{NULL} selects all vertices.} \item{...}{These dots are for future extensions and must be empty.} \item{weights}{The weights of the edges. -If this is \code{NULL} and there is a \code{weight} edge attribute this is used. -If there is no such edge attribute all edges will have the same weight.} + If this is \code{NULL} and there is a \code{weight} edge attribute this is used. + If there is no such edge attribute all edges will have the same weight.} } \value{ A numeric vector of constraint scores @@ -26,7 +26,7 @@ Given a graph, \code{constraint()} calculates Burt's constraint for each vertex. } \details{ Burt's constraint is higher if ego has less, or mutually stronger related (i.e. more redundant) contacts. -Burt's measure of constraint, \eqn{C_i}{C[i]}, of vertex \eqn{i}'s ego network \eqn{V_i}{V[i]}, + Burt's measure of constraint, \eqn{C_i}{C[i]}, of vertex \eqn{i}'s ego network \eqn{V_i}{V[i]}, is defined for directed and valued graphs, \deqn{C_i=\sum_{j \in V_i \setminus \{i\}} (p_{ij}+\sum_{q \in V_i \setminus \{i,j\}} p_{iq} p_{qj})^2}{ @@ -38,7 +38,7 @@ for a graph of order (i.e. number of vertices) \eqn{N}, where proportional tie s p[i,j]=(a[i,j]+a[j,i]) / sum(a[i,k]+a[k,i], k in V[i], k != i), } \eqn{a_{ij}}{a[i,j]} are elements of \eqn{A} and the latter being the graph adjacency matrix. -For isolated vertices, constraint is undefined. + For isolated vertices, constraint is undefined. } \section{Related documentation in the C library}{ \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_constraint}{\code{constraint()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_edges}{\code{edges()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_get_eids}{\code{get_eids()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_ecount}{\code{ecount()}} @@ -52,7 +52,7 @@ constraint(g) } \references{ Burt, R.S. (2004). Structural holes and good ideas. -\emph{American Journal of Sociology} 110, 349-399. + \emph{American Journal of Sociology} 110, 349-399. } \seealso{ Other structural.properties: diff --git a/man/constructor_spec.Rd b/man/constructor_spec.Rd index 4e00ecf9d16..c3d20a03ba3 100644 --- a/man/constructor_spec.Rd +++ b/man/constructor_spec.Rd @@ -28,7 +28,7 @@ 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[=graph_]{graph_()}}, \code{\link[=make_]{make_()}} or \code{\link[=sample_]{sample_()}}. -The specification is only evaluated when the graph is actually constructed, + 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()}}, diff --git a/man/contract.Rd b/man/contract.Rd index 94de9e6d6ef..14bf0554712 100644 --- a/man/contract.Rd +++ b/man/contract.Rd @@ -10,22 +10,22 @@ contract(graph, mapping, vertex.attr.comb = NULL) \item{graph}{The input graph, it can be directed or undirected.} \item{mapping}{A numeric vector that specifies the mapping. -Its elements correspond to the vertices, and for each element the ID in the new graph is given.} + Its elements correspond to the vertices, and for each element the ID in the new graph is given.} \item{vertex.attr.comb}{Specifies how to combine the vertex attributes in the new graph. -Please see \code{\link[=attribute.combination]{attribute.combination()}} for details. -The default \code{NULL} uses the \code{vertex.attr.comb} igraph option.} + Please see \code{\link[=attribute.combination]{attribute.combination()}} for details. + The default \code{NULL} uses the \code{vertex.attr.comb} igraph option.} } \value{ A new graph object. } \description{ This function creates a new graph, by merging several vertices into one. -The vertices in the new graph correspond to sets of vertices in the input graph. + The vertices in the new graph correspond to sets of vertices in the input graph. } \details{ The attributes of the graph are kept. -Graph and edge attributes are unchanged, vertex attributes are combined, according to the \code{vertex.attr.comb} parameter. + Graph and edge attributes are unchanged, vertex attributes are combined, according to the \code{vertex.attr.comb} parameter. } \section{Related documentation in the C library}{ \href{https://igraph.org/c/html/0.10.17/igraph-Operators.html#igraph_contract_vertices}{\code{contract_vertices()}} diff --git a/man/contract.vertices.Rd b/man/contract.vertices.Rd index 02bccd682be..a711966f44d 100644 --- a/man/contract.vertices.Rd +++ b/man/contract.vertices.Rd @@ -14,11 +14,11 @@ contract.vertices( \item{graph}{The input graph, it can be directed or undirected.} \item{mapping}{A numeric vector that specifies the mapping. -Its elements correspond to the vertices, and for each element the ID in the new graph is given.} + Its elements correspond to the vertices, and for each element the ID in the new graph is given.} \item{vertex.attr.comb}{Specifies how to combine the vertex attributes in the new graph. -Please see \code{\link[=attribute.combination]{attribute.combination()}} for details. -The default \code{NULL} uses the \code{vertex.attr.comb} igraph option.} + Please see \code{\link[=attribute.combination]{attribute.combination()}} for details. + The default \code{NULL} uses the \code{vertex.attr.comb} igraph option.} } \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/convex_hull.Rd b/man/convex_hull.Rd index 8ad48b5957a..9503fd01ae5 100644 --- a/man/convex_hull.Rd +++ b/man/convex_hull.Rd @@ -14,10 +14,10 @@ A named list with components: \describe{ \item{resverts}{ The indices of the input vertices that constritute the convex hull. -} + } \item{rescoords}{ The coordinates of the corners of the convex hull. -} + } } } \description{ diff --git a/man/coreness.Rd b/man/coreness.Rd index 642a5e414a0..d6c1f846f14 100644 --- a/man/coreness.Rd +++ b/man/coreness.Rd @@ -12,9 +12,9 @@ coreness(graph, ..., mode = c("all", "out", "in")) \item{...}{These dots are for future extensions and must be empty.} \item{mode}{The type of the core in directed graphs. -Character constant, possible values: \verb{in}: in-cores are computed, \code{out}: out-cores are computed, \code{all}: + Character constant, possible values: \verb{in}: in-cores are computed, \code{out}: out-cores are computed, \code{all}: the corresponding undirected graph is considered. -This argument is ignored for undirected graphs.} + This argument is ignored for undirected graphs.} } \value{ Numeric vector of integer numbers giving the coreness of each vertex. diff --git a/man/count.multiple.Rd b/man/count.multiple.Rd index 3e75e580a3d..09433760b34 100644 --- a/man/count.multiple.Rd +++ b/man/count.multiple.Rd @@ -10,7 +10,7 @@ count.multiple(graph, eids = E(graph)) \item{graph}{The input graph.} \item{eids}{The edges to which the query is restricted. -The default \code{NULL} selects all edges.} + The default \code{NULL} selects all edges.} } \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/count_automorphisms.Rd b/man/count_automorphisms.Rd index 91286fdb977..1a60fd6de4e 100644 --- a/man/count_automorphisms.Rd +++ b/man/count_automorphisms.Rd @@ -16,14 +16,14 @@ count_automorphisms( \item{colors}{The colors of the individual vertices of the graph; only vertices having the same color are allowed to match each other in an automorphism. -When omitted, igraph uses the \code{color} attribute of the vertices, or, if there is no such vertex attribute, + When omitted, igraph uses the \code{color} attribute of the vertices, or, if there is no such vertex attribute, it simply assumes that all vertices have the same color. -Pass NULL explicitly if the graph has a \code{color} vertex attribute but you do not want to use it.} + Pass NULL explicitly if the graph has a \code{color} vertex attribute but you do not want to use it.} \item{...}{These dots are for future extensions and must be empty.} \item{sh}{The splitting heuristics for the BLISS algorithm. -Possible values are: \sQuote{\code{f}}: + Possible values are: \sQuote{\code{f}}: first non-singleton cell, \sQuote{\code{fl}}: first largest non-singleton cell, @@ -43,23 +43,23 @@ A named list with the following members: \describe{ \item{group_size}{ The size of the automorphism group of the input graph, as a string. -This number is exact if igraph was compiled with the GMP library, and approximate otherwise. -} + This number is exact if igraph was compiled with the GMP library, and approximate otherwise. + } \item{nof_nodes}{ The number of nodes in the search tree. -} + } \item{nof_leaf_nodes}{ The number of leaf nodes in the search tree. -} + } \item{nof_bad_nodes}{ Number of bad nodes. -} + } \item{nof_canupdates}{ Number of canrep updates. -} + } \item{max_level}{ Maximum level. -} + } } } \description{ @@ -69,8 +69,8 @@ Calculate the number of automorphisms of a graph, i.e. the number of isomorphism An automorphism of a graph is a permutation of its vertices which brings the graph into itself. This function calculates the number of automorphism of a graph using the BLISS algorithm. -See also the BLISS homepage at \url{http://www.tcs.hut.fi/Software/bliss/index.html}. -If you need the automorphisms themselves, use \code{\link[=automorphism_group]{automorphism_group()}} to obtain a compact representation of the automorphism group. + See also the BLISS homepage at \url{http://www.tcs.hut.fi/Software/bliss/index.html}. + If you need the automorphisms themselves, use \code{\link[=automorphism_group]{automorphism_group()}} to obtain a compact representation of the automorphism group. } \section{Related documentation in the C library}{ \href{https://igraph.org/c/html/0.10.17/igraph-Isomorphism.html#igraph_count_automorphisms}{\code{count_automorphisms()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}} diff --git a/man/count_motifs.Rd b/man/count_motifs.Rd index 4173b2a5e71..5eba7e015da 100644 --- a/man/count_motifs.Rd +++ b/man/count_motifs.Rd @@ -14,15 +14,15 @@ count_motifs(graph, size = 3, ..., cut.prob = NULL) \item{...}{These dots are for future extensions and must be empty.} \item{cut.prob}{Numeric vector giving the probabilities that the search graph is cut at a certain level. -Its length should be the same as the size of the motif (the \code{size} argument). -If \code{NULL}, the default, no cuts are made.} + Its length should be the same as the size of the motif (the \code{size} argument). + If \code{NULL}, the default, no cuts are made.} } \value{ \code{count_motifs()} returns a numeric scalar. } \description{ Graph motifs are small connected induced subgraphs with a well-defined structure. -These functions search a graph for various motifs. + These functions search a graph for various motifs. } \details{ \code{count_motifs()} calculates the total number of motifs of a given size in graph. diff --git a/man/count_reachable.Rd b/man/count_reachable.Rd index 620793ce607..5350f430dbe 100644 --- a/man/count_reachable.Rd +++ b/man/count_reachable.Rd @@ -12,13 +12,13 @@ count_reachable(graph, ..., mode = c("out", "in", "all", "total")) \item{...}{These dots are for future extensions and must be empty.} \item{mode}{Character constant, defines how edge directions are considered in directed graphs. -\code{"out"} counts vertices reachable via outgoing edges, + \code{"out"} counts vertices reachable via outgoing edges, \code{"in"} counts vertices from which the current vertex is reachable via incoming edges, \code{"all"} or \code{"total"} ignores edge directions. -This parameter is ignored for undirected graphs.} + This parameter is ignored for undirected graphs.} } \value{ An integer vector of length \code{vcount(graph)}. -The i-th element is the number of vertices reachable from vertex i (including vertex i itself). + The i-th element is the number of vertices reachable from vertex i (including vertex i itself). } \description{ \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#experimental}{\figure{lifecycle-experimental.svg}{options: alt='[Experimental]'}}}{\strong{[Experimental]}} @@ -27,8 +27,8 @@ The i-th element is the number of vertices reachable from vertex i (including ve Counts the number of vertices reachable from each vertex in the graph. For each vertex in the graph, this function counts how many vertices are reachable from it, including the vertex itself. -A vertex is reachable from another if there is a directed path between them. -For undirected graphs, two vertices are reachable from each other if they are in the same connected component. + A vertex is reachable from another if there is a directed path between them. + For undirected graphs, two vertices are reachable from each other if they are in the same connected component. } \section{Related documentation in the C library}{ \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_count_reachable}{\code{count_reachable()}} diff --git a/man/count_subgraph_isomorphisms.Rd b/man/count_subgraph_isomorphisms.Rd index 65889ff774d..b6b009c1f78 100644 --- a/man/count_subgraph_isomorphisms.Rd +++ b/man/count_subgraph_isomorphisms.Rd @@ -9,14 +9,14 @@ count_subgraph_isomorphisms(pattern, target, method = c("lad", "vf2"), ...) } \arguments{ \item{pattern}{The smaller graph, it might be directed or undirected. -Undirected graphs are treated as directed graphs with mutual edges.} + Undirected graphs are treated as directed graphs with mutual edges.} \item{target}{The bigger graph, it might be directed or undirected. -Undirected graphs are treated as directed graphs with mutual edges.} + Undirected graphs are treated as directed graphs with mutual edges.} \item{method}{The method to use. -Possible values: \sQuote{lad}, \sQuote{vf2}. -See their details below.} + Possible values: \sQuote{lad}, \sQuote{vf2}. + See their details below.} \item{...}{Additional arguments, passed to the various methods.} } @@ -29,40 +29,40 @@ Count the isomorphic mappings between a graph and the subgraphs of another graph \section{\sQuote{lad} method}{ This is the LAD algorithm by Solnon, see the reference below. -It has the following extra arguments: + It has the following extra arguments: \describe{ \item{domains}{ Matching restrictions. -It must be a list of \code{target} vertex sets, given as numeric vertex IDs or symbolic vertex names. -The length of the list must be \code{vcount(pattern)} and for each vertex in \code{pattern} + It must be a list of \code{target} vertex sets, given as numeric vertex IDs or symbolic vertex names. + The length of the list must be \code{vcount(pattern)} and for each vertex in \code{pattern} it gives the allowed matching vertices in \code{target}. -Defaults to \code{NULL}. -} + Defaults to \code{NULL}. + } \item{induced}{ Logical scalar, whether to search for an induced subgraph. It is \code{FALSE} by default. -} + } \item{time.limit}{ The processor time limit for the computation, in seconds. It defaults to \code{Inf}, which means no limit. -} + } } } \section{\sQuote{vf2} method}{ This method uses the VF2 algorithm by Cordella, Foggia et al., see references below. -It supports vertex and edge colors and have the following extra arguments: + It supports vertex and edge colors and have the following extra arguments: \describe{ \item{vertex.color1, vertex.color2}{ Optional integer vectors giving the colors of the vertices for colored graph isomorphism. -If they are not given, but the graph has a \dQuote{color} vertex attribute, then it will be used. -If you want to ignore these attributes, then supply \code{NULL} for both of these arguments. -See also examples below. -} + If they are not given, but the graph has a \dQuote{color} vertex attribute, then it will be used. + If you want to ignore these attributes, then supply \code{NULL} for both of these arguments. + See also examples below. + } \item{edge.color1, edge.color2}{ Optional integer vectors giving the colors of the edges for edge-colored (sub)graph isomorphism. -If they are not given, but the graph has a \dQuote{color} edge attribute, then it will be used. -If you want to ignore these attributes, then supply \code{NULL} for both of these arguments. -} + If they are not given, but the graph has a \dQuote{color} edge attribute, then it will be used. + If you want to ignore these attributes, then supply \code{NULL} for both of these arguments. + } } } diff --git a/man/count_triangles.Rd b/man/count_triangles.Rd index 7010c512784..0fff4976195 100644 --- a/man/count_triangles.Rd +++ b/man/count_triangles.Rd @@ -11,11 +11,11 @@ count_triangles(graph, vids = NULL) } \arguments{ \item{graph}{The input graph. -It might be directed, but edge directions are ignored.} + It might be directed, but edge directions are ignored.} \item{vids}{The vertices to query. -This might be a vector of numeric IDs, or a character vector of symbolic vertex names for named graphs. -The default \code{NULL} selects all vertices.} + This might be a vector of numeric IDs, or a character vector of symbolic vertex names for named graphs. + The default \code{NULL} selects all vertices.} } \value{ For \code{triangles()} a numeric vector of vertex IDs, the first three vertices belong to the first triangle found, etc. @@ -27,8 +27,8 @@ Count how many triangles a vertex is part of, in a graph, or just list the trian } \details{ \code{triangles()} lists all triangles of a graph. -For efficiency, all triangles are returned in a single vector. -The first three vertices belong to the first triangle, etc. + For efficiency, all triangles are returned in a single vector. + The first three vertices belong to the first triangle, etc. \code{count_triangles()} counts how many triangles a vertex is part of. } diff --git a/man/create.communities.Rd b/man/create.communities.Rd index 4f74c8aaf43..4aaa940cba4 100644 --- a/man/create.communities.Rd +++ b/man/create.communities.Rd @@ -16,14 +16,14 @@ create.communities( \item{graph}{The graph of the community structure.} \item{membership}{The membership vector of the community structure, a numeric vector denoting the ID of the community for each vertex. -It might be \code{NULL} for hierarchical community structures.} + It might be \code{NULL} for hierarchical community structures.} \item{algorithm}{Character string, the algorithm that generated the community structure, it can be arbitrary.} \item{merges}{A merge matrix, for hierarchical community structures (or \code{NULL} otherwise.} \item{modularity}{Modularity value of the community structure. -If this is \code{TRUE} and the membership vector is available, then it the modularity values is calculated automatically.} + If this is \code{TRUE} and the membership vector is available, then it the modularity values is calculated automatically.} } \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/curve_multiple.Rd b/man/curve_multiple.Rd index c295b75ab4a..a2b3bdbc364 100644 --- a/man/curve_multiple.Rd +++ b/man/curve_multiple.Rd @@ -12,7 +12,7 @@ curve_multiple(graph, ..., start = 0.5) \item{...}{These dots are for future extensions and must be empty.} \item{start}{The curvature at the two extreme edges. -All edges will have a curvature between \code{-start} and \code{start}, spaced equally.} + All edges will have a curvature between \code{-start} and \code{start}, spaced equally.} } \value{ A numeric vector, its length is the number of edges in the graph. @@ -20,7 +20,7 @@ A numeric vector, its length is the number of edges in the graph. \description{ If graphs have multiple edges, then drawing them as straight lines does not show them when plotting the graphs; they will be on top of each other. -One solution is to bend the edges, with diffenent curvature, so that all of them are visible. + One solution is to bend the edges, with diffenent curvature, so that all of them are visible. } \details{ \code{curve_multiple()} calculates the optimal \code{edge.curved} vector for plotting a graph with multiple edges, so that all edges are visible. diff --git a/man/cutat.Rd b/man/cutat.Rd index 1c4cbee7533..f206fd39e1e 100644 --- a/man/cutat.Rd +++ b/man/cutat.Rd @@ -8,11 +8,11 @@ cutat(communities, no, steps) } \arguments{ \item{no}{Integer scalar, the desired number of communities. -If too low or two high, then an error message is given. -Exactly one of \code{no} and \code{steps} must be supplied.} + If too low or two high, then an error message is given. + Exactly one of \code{no} and \code{steps} must be supplied.} \item{steps}{The number of merge operations to perform to produce the communities. -Exactly one of \code{no} and \code{steps} must be supplied.} + Exactly one of \code{no} and \code{steps} must be supplied.} } \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/decompose.Rd b/man/decompose.Rd index 8362c53d880..5224b3c9a3b 100644 --- a/man/decompose.Rd +++ b/man/decompose.Rd @@ -21,12 +21,12 @@ decompose( wither \code{weak} for weakly connected components or \code{strong} for strongly connected components.} \item{max.comps}{The maximum number of components to return. -The first \code{max.comps} components will be returned (which hold at least \code{min.vertices} vertices, see the next parameter), + The first \code{max.comps} components will be returned (which hold at least \code{min.vertices} vertices, see the next parameter), the others will be ignored. -Supply \code{NA} here if you don't want to limit the number of components.} + Supply \code{NA} here if you don't want to limit the number of components.} \item{min.vertices}{The minimum number of vertices a component should contain in order to place it in the result list. -E.g. supply 2 here to ignore isolate vertices.} + E.g. supply 2 here to ignore isolate vertices.} } \value{ A list of graph objects. diff --git a/man/decompose.graph.Rd b/man/decompose.graph.Rd index 57704003b5e..40b35db3f66 100644 --- a/man/decompose.graph.Rd +++ b/man/decompose.graph.Rd @@ -18,12 +18,12 @@ decompose.graph( wither \code{weak} for weakly connected components or \code{strong} for strongly connected components.} \item{max.comps}{The maximum number of components to return. -The first \code{max.comps} components will be returned (which hold at least \code{min.vertices} vertices, see the next parameter), + The first \code{max.comps} components will be returned (which hold at least \code{min.vertices} vertices, see the next parameter), the others will be ignored. -Supply \code{NA} here if you don't want to limit the number of components.} + Supply \code{NA} here if you don't want to limit the number of components.} \item{min.vertices}{The minimum number of vertices a component should contain in order to place it in the result list. -E.g. supply 2 here to ignore isolate vertices.} + E.g. supply 2 here to ignore isolate vertices.} } \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/degree.Rd b/man/degree.Rd index ccd04812e04..d689e8f1e9b 100644 --- a/man/degree.Rd +++ b/man/degree.Rd @@ -32,18 +32,18 @@ degree_distribution(graph, cumulative = FALSE, ...) \item{graph}{The graph to analyze.} \item{v}{The IDs of vertices of which the degree will be calculated. -The default \code{NULL} selects all vertices.} + The default \code{NULL} selects all vertices.} \item{...}{These dots are for future extensions and must be empty.} \item{mode}{Character string, \dQuote{out} for out-degree, \dQuote{in} for in-degree or \dQuote{total} for the sum of the two. -For undirected graphs this argument is ignored. -\dQuote{all} is a synonym of \dQuote{total}.} + For undirected graphs this argument is ignored. + \dQuote{all} is a synonym of \dQuote{total}.} \item{loops}{Logical; whether the loop edges are also counted.} \item{normalized}{Logical, whether to normalize the degree. -If \code{TRUE} then the result is divided by \eqn{n-1}, + If \code{TRUE} then the result is divided by \eqn{n-1}, where \eqn{n} is the number of vertices in the graph.} \item{cumulative}{Logical; whether the cumulative degree distribution is to be calculated.} @@ -52,14 +52,14 @@ where \eqn{n} is the number of vertices in the graph.} For \code{degree()} a numeric vector of the same length as argument \code{v}. For \code{degree_distribution()} a numeric vector of the same length as the maximum degree plus one. -The first element is the relative frequency zero degree vertices, the second vertices with degree one, etc. + The first element is the relative frequency zero degree vertices, the second vertices with degree one, etc. For \code{max_degree()}, the largest degree in the graph. -When no vertices are selected, or when the input is the null graph, zero is returned as this is the smallest possible degree. + When no vertices are selected, or when the input is the null graph, zero is returned as this is the smallest possible degree. For \code{mean_degree()}, the average degree in the graph as a single number. -For graphs with no vertices, \code{NaN} is returned. -\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#experimental}{\figure{lifecycle-experimental.svg}{options: alt='[Experimental]'}}}{\strong{[Experimental]}} + For graphs with no vertices, \code{NaN} is returned. + \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#experimental}{\figure{lifecycle-experimental.svg}{options: alt='[Experimental]'}}}{\strong{[Experimental]}} } \description{ The degree of a vertex is its most basic structural property, the number of its adjacent edges. diff --git a/man/degree.sequence.game.Rd b/man/degree.sequence.game.Rd index 84740870d0d..7e6639d1362 100644 --- a/man/degree.sequence.game.Rd +++ b/man/degree.sequence.game.Rd @@ -12,14 +12,14 @@ degree.sequence.game( } \arguments{ \item{out.deg}{Numeric vector, the sequence of degrees (for undirected graphs) or out-degrees (for directed graphs). -For undirected graphs its sum should be even. -For directed graphs its sum should be the same as the sum of \code{in.deg}.} + For undirected graphs its sum should be even. + For directed graphs its sum should be the same as the sum of \code{in.deg}.} \item{in.deg}{For directed graph, the in-degree sequence. -By default this is \code{NULL} and an undirected graph is created.} + By default this is \code{NULL} and an undirected graph is created.} \item{method}{Character, the method for generating the graph. -See Details.} + See Details.} } \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/delete.edges.Rd b/man/delete.edges.Rd index d44fb9c96a7..180f40090c9 100644 --- a/man/delete.edges.Rd +++ b/man/delete.edges.Rd @@ -10,7 +10,7 @@ delete.edges(graph, edges) \item{graph}{The input graph.} \item{edges}{The edges to remove, specified as an edge sequence. -Typically this is either a numeric vector containing edge IDs, + Typically this is either a numeric vector containing edge IDs, or a character vector containing the IDs or names of the source and target vertices, separated by \code{|}} } \description{ diff --git a/man/delete_edges.Rd b/man/delete_edges.Rd index bae801ab511..3bef6e28869 100644 --- a/man/delete_edges.Rd +++ b/man/delete_edges.Rd @@ -10,7 +10,7 @@ delete_edges(graph, edges) \item{graph}{The input graph.} \item{edges}{The edges to remove, specified as an edge sequence. -Typically this is either a numeric vector containing edge IDs, + Typically this is either a numeric vector containing edge IDs, or a character vector containing the IDs or names of the source and target vertices, separated by \code{|}} } \value{ diff --git a/man/dendPlot.Rd b/man/dendPlot.Rd index 9b09eac0496..a8d485e4e52 100644 --- a/man/dendPlot.Rd +++ b/man/dendPlot.Rd @@ -8,11 +8,11 @@ dendPlot(x, mode = igraph_opt("dend.plot.type"), ...) } \arguments{ \item{x}{An object containing the community structure of a graph. -See \code{\link[=communities]{communities()}} for details.} + See \code{\link[=communities]{communities()}} for details.} \item{mode}{Which dendrogram plotting function to use. -See details below. -The default \code{NULL} uses the \code{dend.plot.type} igraph option.} + See details below. + The default \code{NULL} uses the \code{dend.plot.type} igraph option.} \item{...}{Additional arguments to supply to the dendrogram plotting function.} } diff --git a/man/dfs.Rd b/man/dfs.Rd index 31d2c80f95c..374b223a451 100644 --- a/man/dfs.Rd +++ b/man/dfs.Rd @@ -28,15 +28,15 @@ dfs( \item{root}{The single root vertex to start the search from.} \item{mode}{For directed graphs specifies the type of edges to follow. -\sQuote{out} follows outgoing, \sQuote{in} incoming edges. -\sQuote{all} ignores edge directions completely. -\sQuote{total} is a synonym for \sQuote{all}. -This argument is ignored for undirected graphs.} + \sQuote{out} follows outgoing, \sQuote{in} incoming edges. + \sQuote{all} ignores edge directions completely. + \sQuote{total} is a synonym for \sQuote{all}. + This argument is ignored for undirected graphs.} \item{...}{These dots are for future extensions and must be empty.} \item{unreachable}{Logical, whether the search should visit the vertices that are unreachable from the given root vertex (or vertices). -If \code{TRUE}, then additional searches are performed until all vertices are visited.} + If \code{TRUE}, then additional searches are performed until all vertices are visited.} \item{order}{Logical, whether to return the DFS ordering of the vertices.} @@ -47,19 +47,19 @@ If \code{TRUE}, then additional searches are performed until all vertices are vi \item{dist}{Logical, whether to return the distance from the root of the search tree.} \item{in.callback}{Callback function. -This is called whenever a vertex is visited. -See details below. -Default: \code{NULL}.} + This is called whenever a vertex is visited. + See details below. + Default: \code{NULL}.} \item{out.callback}{Callback function. -This is called whenever the subtree of a vertex is completed by the algorithm. -See details below. -Default: \code{NULL}.} + This is called whenever the subtree of a vertex is completed by the algorithm. + See details below. + Default: \code{NULL}.} \item{extra}{Additional argument to supply to the callback function.} \item{rho}{The environment in which the callback function is evaluated. -The default \code{NULL} uses the caller's environment.} + The default \code{NULL} uses the caller's environment.} \item{neimode}{\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} This argument is deprecated from igraph 1.3.0; use \code{mode} instead.} @@ -70,26 +70,26 @@ A named list with the following entries: \describe{ \item{root}{ Numeric scalar. The root vertex that was used as the starting point of the search. -} + } \item{neimode}{ Character scalar. The \code{mode} argument of the function call. -Note that for undirected graphs this is always \sQuote{all}, irrespectively of the supplied value. -} + Note that for undirected graphs this is always \sQuote{all}, irrespectively of the supplied value. + } \item{order}{ Numeric vector. The vertex IDs, in the order in which they were visited by the search. -} + } \item{order.out}{ Numeric vector, the vertex IDs, in the order of the completion of their subtree. -} + } \item{parent}{ Numeric vector. The parent of each vertex, i.e. the vertex it was discovered from. -} + } \item{father}{ Like parent, kept for compatibility for now. -} + } \item{dist}{ Numeric vector, for each vertex its distance from the root of the search tree. -} + } } Note that \code{order}, \code{order.out}, \code{parent}, and \code{dist} might be \code{NULL} if their corresponding argument is \code{FALSE}, @@ -97,25 +97,25 @@ i.e. if their calculation is not requested. } \description{ Depth-first search is an algorithm to traverse a graph. -It starts from a root vertex and tries to go quickly as far from as possible. + It starts from a root vertex and tries to go quickly as far from as possible. } \details{ The callback functions must have the following arguments: \describe{ \item{graph}{ The input graph is passed to the callback function here. -} + } \item{data}{ A named numeric vector, with the following entries: \sQuote{vid}, the vertex that was just visited and \sQuote{dist}, its distance from the root of the search tree. -} + } \item{extra}{ The extra argument. -} + } } The callback must return FALSE to continue the search or TRUE to terminate it. -See examples below on how to use the callback functions. + See examples below on how to use the callback functions. } \section{Related documentation in the C library}{ \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}} diff --git a/man/diameter.Rd b/man/diameter.Rd index 4709c99305f..360a96c8169 100644 --- a/man/diameter.Rd +++ b/man/diameter.Rd @@ -24,25 +24,25 @@ farthest_vertices( \item{...}{These dots are for future extensions and must be empty.} \item{directed}{Logical, whether directed or undirected paths are to be considered. -This is ignored for undirected graphs.} + This is ignored for undirected graphs.} \item{unconnected}{Logical, what to do if the graph is unconnected. -If FALSE, the function will return a number that is one larger the largest possible diameter, which is always the number of vertices. -If TRUE, the diameters of the connected components will be calculated and the largest one will be returned.} + If FALSE, the function will return a number that is one larger the largest possible diameter, which is always the number of vertices. + If TRUE, the diameters of the connected components will be calculated and the largest one will be returned.} \item{weights}{Optional positive weight vector for calculating weighted distances. -If the graph has a \code{weight} edge attribute, then this is used by default.} + If the graph has a \code{weight} edge attribute, then this is used by default.} } \value{ A numeric constant for \code{diameter()}, a numeric vector for \code{get_diameter()}. -\code{farthest_vertices()} returns a list with two entries: + \code{farthest_vertices()} returns a list with two entries: \describe{ \item{\code{vertices}}{ The two vertices that are the farthest. -} + } \item{\code{distance}}{ Their distance. -} + } } } \description{ @@ -52,7 +52,7 @@ The diameter of a graph is the length of the longest geodesic. The diameter is calculated by using a breadth-first search like method. \code{get_diameter()} returns a path with the actual diameter. -If there are many shortest paths of the length of the diameter, then it returns the first one found. + If there are many shortest paths of the length of the diameter, then it returns the first one found. \code{farthest_vertices()} returns two vertex IDs, the vertices which are connected by the diameter path. } diff --git a/man/difference.Rd b/man/difference.Rd index 8c0e7b52c46..25c9c8f31ab 100644 --- a/man/difference.Rd +++ b/man/difference.Rd @@ -14,9 +14,9 @@ Depends on the function that implements this method. } \description{ This is an S3 generic function. -See \code{methods("difference")} for the actual implementations for various S3 classes. -Initially it is implemented for igraph graphs (difference of edges in two graphs), and igraph vertex and edge sequences. -See \code{\link[=difference.igraph]{difference.igraph()}}, and \code{\link[=difference.igraph.vs]{difference.igraph.vs()}}. + See \code{methods("difference")} for the actual implementations for various S3 classes. + Initially it is implemented for igraph graphs (difference of edges in two graphs), and igraph vertex and edge sequences. + See \code{\link[=difference.igraph]{difference.igraph()}}, and \code{\link[=difference.igraph.vs]{difference.igraph.vs()}}. } \seealso{ Other functions for manipulating graph structure: diff --git a/man/difference.igraph.Rd b/man/difference.igraph.Rd index 23ede828d34..72c4098caaa 100644 --- a/man/difference.igraph.Rd +++ b/man/difference.igraph.Rd @@ -9,15 +9,15 @@ } \arguments{ \item{big}{The left hand side argument of the minus operator. -A directed or undirected graph.} + A directed or undirected graph.} \item{small}{The right hand side argument of the minus operator. -A directed ot undirected graph.} + A directed ot undirected graph.} \item{byname}{A Logical, or the character scalar \code{auto}. -Whether to perform the operation based on symbolic vertex names. -If it is \code{auto}, that means \code{TRUE} if both graphs are named and \code{FALSE} otherwise. -A warning is generated if \code{auto} and one graph, but not both graphs are named.} + Whether to perform the operation based on symbolic vertex names. + If it is \code{auto}, that means \code{TRUE} if both graphs are named and \code{FALSE} otherwise. + A warning is generated if \code{auto} and one graph, but not both graphs are named.} \item{...}{Ignored, included for S3 compatibility.} } @@ -29,12 +29,12 @@ The difference of two graphs are created. } \details{ \code{difference()} creates the difference of two graphs. -Only edges present in the first graph but not in the second will be be included in the new graph. -The corresponding operator is \verb{\%m\%}. + Only edges present in the first graph but not in the second will be be included in the new graph. + The corresponding operator is \verb{\%m\%}. If the \code{byname} argument is \code{TRUE} (or \code{auto} and the graphs are all named), then the operation is performed based on symbolic vertex names. -Otherwise numeric vertex IDs are used. + Otherwise numeric vertex IDs are used. \code{difference()} keeps all attributes (graph, vertex and edge) of the first graph. diff --git a/man/difference.igraph.es.Rd b/man/difference.igraph.es.Rd index bbab43de8a2..e011adc528f 100644 --- a/man/difference.igraph.es.Rd +++ b/man/difference.igraph.es.Rd @@ -21,7 +21,7 @@ Difference of edge sequences } \details{ They must belong to the same graph. -Note that this function has \sQuote{set} semantics and the multiplicity of edges is lost in the result. + Note that this function has \sQuote{set} semantics and the multiplicity of edges is lost in the result. } \examples{ g <- make_(ring(10), with_vertex_(name = LETTERS[1:10])) diff --git a/man/difference.igraph.vs.Rd b/man/difference.igraph.vs.Rd index 9372a0f8ab0..4d3057b8c92 100644 --- a/man/difference.igraph.vs.Rd +++ b/man/difference.igraph.vs.Rd @@ -21,7 +21,7 @@ Difference of vertex sequences } \details{ They must belong to the same graph. -Note that this function has \sQuote{set} semantics and the multiplicity of vertices is lost in the result. + Note that this function has \sQuote{set} semantics and the multiplicity of vertices is lost in the result. } \examples{ g <- make_(ring(10), with_vertex_(name = LETTERS[1:10])) diff --git a/man/dim_select.Rd b/man/dim_select.Rd index 86175f0dbf7..b76f25f0b3f 100644 --- a/man/dim_select.Rd +++ b/man/dim_select.Rd @@ -19,14 +19,14 @@ Select the number of significant singular values, by finding the \sQuote{elbow} The input of the function is a numeric vector which contains the measure of \sQuote{importance} for each dimension. For spectral embedding, these are the singular values of the adjacency matrix. -The singular values are assumed to be generated from a Gaussian mixture distribution with two components that have different means and same variance. -The dimensionality \eqn{d} is chosen to maximize the likelihood + The singular values are assumed to be generated from a Gaussian mixture distribution with two components that have different means and same variance. + The dimensionality \eqn{d} is chosen to maximize the likelihood when the \eqn{d} largest singular values are assigned to one component of the mixture and the rest of the singular values assigned to the other component. This function can also be used for the general separation problem, where we assume that the left and the right of the vector are coming from two Normal distributions, with different means, and we want to know their border. -See examples below. + See examples below. } \section{Related documentation in the C library}{ \href{https://igraph.org/c/html/0.10.17/igraph-Embedding.html#igraph_dim_select}{\code{dim_select()}} diff --git a/man/disjoint_union.Rd b/man/disjoint_union.Rd index 03b5f2b3b3d..f89a056fbf5 100644 --- a/man/disjoint_union.Rd +++ b/man/disjoint_union.Rd @@ -13,9 +13,9 @@ x \%du\% y \item{\dots}{Graph objects or lists of graph objects.} \item{graph.attr.comb}{Specification for combining shared graph attributes. -The default \code{NULL} uses the \code{graph.attr.comb} igraph option (\code{"rename"} unless changed via \code{\link[=igraph_options]{igraph_options()}}), + The default \code{NULL} uses the \code{graph.attr.comb} igraph option (\code{"rename"} unless changed via \code{\link[=igraph_options]{igraph_options()}}), which preserves the historical behaviour of appending \verb{_1}, \verb{_2}, ... suffixes to clashing attribute names. -See \link{igraph-attribute-combination} for the available combiners.} + See \link{igraph-attribute-combination} for the available combiners.} \item{x, y}{Graph objects.} } @@ -24,23 +24,23 @@ A new graph object. } \description{ The union of two or more graphs are created. -The graphs are assumed to have disjoint vertex sets. + The graphs are assumed to have disjoint vertex sets. } \details{ \code{disjoint_union()} creates a union of two or more disjoint graphs. -Thus first the vertices in the second, third, etc. graphs are relabeled to have completely disjoint graphs. -Then a simple union is created. -This function can also be used via the \verb{\%du\%} operator. + Thus first the vertices in the second, third, etc. graphs are relabeled to have completely disjoint graphs. + Then a simple union is created. + This function can also be used via the \verb{\%du\%} operator. \code{disjoint_union()} handles graph, vertex and edge attributes. -In particular, it merges vertex and edge attributes using the \code{\link[vctrs:vec_c]{vctrs::vec_c()}} function. -For graphs that lack some vertex/edge attribute, the corresponding values in the new graph are set to a missing value (\code{NA} for scalar attributes, \code{NULL} for list attributes). -Graph attributes are combined according to \code{graph.attr.comb}; by default any name clash is resolved by adding suffixes (\verb{_1}, \verb{_2}, ...). -See \link{igraph-attribute-combination} for the available combiners. + In particular, it merges vertex and edge attributes using the \code{\link[vctrs:vec_c]{vctrs::vec_c()}} function. + For graphs that lack some vertex/edge attribute, the corresponding values in the new graph are set to a missing value (\code{NA} for scalar attributes, \code{NULL} for list attributes). + Graph attributes are combined according to \code{graph.attr.comb}; by default any name clash is resolved by adding suffixes (\verb{_1}, \verb{_2}, ...). + See \link{igraph-attribute-combination} for the available combiners. Note that if both graphs have vertex names (i.e. a \code{name} vertex attribute), then the concatenated vertex names might be non-unique in the result. -A warning is given if this happens. + A warning is given if this happens. An error is generated if some input graphs are directed and others are undirected. } diff --git a/man/distances.Rd b/man/distances.Rd index 18f22d7ee22..71577bd7ed6 100644 --- a/man/distances.Rd +++ b/man/distances.Rd @@ -61,73 +61,73 @@ all_shortest_paths( this argument is ignored for undirected graphs.} \item{weights}{Possibly a numeric vector giving edge weights. -If this is \code{NULL} and the graph has a \code{weight} edge attribute, then the attribute is used. -If this is \code{NA} then no weights are used (even if the graph has a \code{weight} attribute). -In a weighted graph, the length of a path is the sum of the weights of its constituent edges.} + If this is \code{NULL} and the graph has a \code{weight} edge attribute, then the attribute is used. + If this is \code{NA} then no weights are used (even if the graph has a \code{weight} attribute). + In a weighted graph, the length of a path is the sum of the weights of its constituent edges.} \item{unconnected}{What to do if the graph is unconnected (not strongly connected if directed paths are considered). -If TRUE, only the lengths of the existing paths are considered and averaged; if FALSE, + If TRUE, only the lengths of the existing paths are considered and averaged; if FALSE, the length of the missing paths are considered as having infinite length, making the mean distance infinite as well.} \item{details}{Whether to provide additional details in the result. -Functions accepting this argument (like \code{mean_distance()}) return additional information like the number of disconnected vertex pairs in the result + Functions accepting this argument (like \code{mean_distance()}) return additional information like the number of disconnected vertex pairs in the result when this parameter is set to \code{TRUE}.} \item{v}{Numeric vector, the vertices from which the shortest paths will be calculated. -The default \code{NULL} selects all vertices.} + The default \code{NULL} selects all vertices.} \item{to}{Numeric vector, the vertices to which the shortest paths will be calculated. -The default \code{NULL} includes all vertices. -Note that for \code{distances()} every vertex must be included here at most once. -(This is not required for \code{shortest_paths()}.} + The default \code{NULL} includes all vertices. + Note that for \code{distances()} every vertex must be included here at most once. + (This is not required for \code{shortest_paths()}.} \item{mode}{Character constant, gives whether the shortest paths to or from the given vertices should be calculated for directed graphs. -If \code{out} then the shortest paths \emph{from} the vertex, if \verb{in} then \emph{to} it will be considered. -If \code{all}, the default, then the graph is treated as undirected, i.e. edge directions are not taken into account. -This argument is ignored for undirected graphs.} + If \code{out} then the shortest paths \emph{from} the vertex, if \verb{in} then \emph{to} it will be considered. + If \code{all}, the default, then the graph is treated as undirected, i.e. edge directions are not taken into account. + This argument is ignored for undirected graphs.} \item{algorithm}{Which algorithm to use for the calculation. -By default igraph tries to select the fastest suitable algorithm. -If there are no weights, then an unweighted breadth-first search is used, otherwise if all weights are positive, + By default igraph tries to select the fastest suitable algorithm. + If there are no weights, then an unweighted breadth-first search is used, otherwise if all weights are positive, then Dijkstra's algorithm is used. -If there are negative weights and we do the calculation for more than 100 sources, then Johnson's algorithm is used. -Otherwise the Bellman-Ford algorithm is used. -You can override igraph's choice by explicitly giving this parameter. -Note that the igraph C core might still override your choice in obvious cases, i.e. if there are no edge weights, + If there are negative weights and we do the calculation for more than 100 sources, then Johnson's algorithm is used. + Otherwise the Bellman-Ford algorithm is used. + You can override igraph's choice by explicitly giving this parameter. + Note that the igraph C core might still override your choice in obvious cases, i.e. if there are no edge weights, then the unweighted algorithm will be used, regardless of this argument.} \item{from}{Numeric constant, the vertex from or to the shortest paths will be calculated. -Note that right now this is not a vector of vertex IDs, but only a single vertex.} + Note that right now this is not a vector of vertex IDs, but only a single vertex.} \item{output}{Character scalar, defines how to report the shortest paths. -\dQuote{vpath} means that the vertices along the paths are reported, + \dQuote{vpath} means that the vertices along the paths are reported, this form was used prior to igraph version 0.6. \dQuote{epath} means that the edges along the paths are reported. -\dQuote{both} means that both forms are returned, in a named list with components \dQuote{vpath} and \dQuote{epath}.} + \dQuote{both} means that both forms are returned, in a named list with components \dQuote{vpath} and \dQuote{epath}.} \item{predecessors}{Logical, whether to return the predecessor vertex for each vertex. -The predecessor of vertex \code{i} in the tree is the vertex from which vertex \code{i} was reached. -The predecessor of the start vertex (in the \code{from} argument) is itself by definition. -If the predecessor is zero, it means that the given vertex was not reached from the source during the search. -Note that the search terminates if all the vertices in \code{to} are reached.} + The predecessor of vertex \code{i} in the tree is the vertex from which vertex \code{i} was reached. + The predecessor of the start vertex (in the \code{from} argument) is itself by definition. + If the predecessor is zero, it means that the given vertex was not reached from the source during the search. + Note that the search terminates if all the vertices in \code{to} are reached.} \item{inbound.edges}{Logical, whether to return the inbound edge for each vertex. -The inbound edge of vertex \code{i} in the tree is the edge via which vertex \code{i} was reached. -The start vertex and vertices that were not reached during the search will have zero in the corresponding entry of the vector. -Note that the search terminates if all the vertices in \code{to} are reached.} + The inbound edge of vertex \code{i} in the tree is the edge via which vertex \code{i} was reached. + The start vertex and vertices that were not reached during the search will have zero in the corresponding entry of the vector. + Note that the search terminates if all the vertices in \code{to} are reached.} } \value{ For \code{distances()} a numeric matrix with \code{length(to)} columns and \code{length(v)} rows. -The shortest path length from a vertex to itself is always zero. -For unreachable vertices \code{Inf} is included. + The shortest path length from a vertex to itself is always zero. + For unreachable vertices \code{Inf} is included. For \code{shortest_paths()} a named list with four entries is returned: \item{vpath}{This itself is a list, of length \code{length(to)}; list element \code{i} contains the vertex IDs on the path from vertex \code{from} to vertex \code{to[i]} (or the other way for directed graphs depending on the \code{mode} argument). -The vector also contains \code{from} and \code{i} as the first and last elements. -If \code{from} is the same as \code{i} then it is only included once. -If there is no path between two vertices then a numeric vector of length zero is returned as the list element. -If this output is not requested in the \code{output} argument, then it will be \code{NULL}.} + The vector also contains \code{from} and \code{i} as the first and last elements. + If \code{from} is the same as \code{i} then it is only included once. + If there is no path between two vertices then a numeric vector of length zero is returned as the list element. + If this output is not requested in the \code{output} argument, then it will be \code{NULL}.} \item{epath}{This is a list similar to \code{vpath}, but the vectors of the list contain the edge IDs along the shortest paths, instead of the vertex IDs. This entry is set to \code{NULL} if it is not requested in the \code{output} argument.} \item{predecessors}{Numeric vector, the predecessor of each vertex in the \code{to} argument, or \code{NULL} if it was not requested.} \item{inbound_edges}{Numeric vector, the inbound edge for each vertex, or \code{NULL}, if it was not requested.} @@ -136,17 +136,17 @@ For \code{all_shortest_paths()} a list is returned: \describe{ \item{vpaths}{ This is a list. -Each list element contains the vertices of a shortest path from \code{from} to a vertex in \code{to}. -The shortest paths to the same vertex are collected into consecutive elements of the list. -} + Each list element contains the vertices of a shortest path from \code{from} to a vertex in \code{to}. + The shortest paths to the same vertex are collected into consecutive elements of the list. + } \item{epaths}{ This is a list similar to vpaths, but the vectors of the list contain the edge IDs along the shortest paths, instead of the vertex IDs. -} + } \item{nrgeo}{ A vector in which each element is the number of shortest paths (geodesics) from \code{from} to the corresponding vertex in \code{to}. -} + } \item{res}{ Deprecated } @@ -160,7 +160,7 @@ the mean distance as a numeric scalar } \item{\code{unconnected}}{ the number of unconnected vertex pairs, also as a numeric scalar. -} + } } \code{distance_table()} returns a named list with two entries: @@ -170,54 +170,54 @@ a numeric vector, the histogram of distances } \item{\code{unconnected}}{ a numeric scalar, the number of pairs for which the first vertex is not reachable from the second. -In undirected and directed graphs, unorderde and ordered pairs are considered, respectively. -Therefore the sum of the two entries is always \eqn{n(n-1)} for directed graphs + In undirected and directed graphs, unorderde and ordered pairs are considered, respectively. + Therefore the sum of the two entries is always \eqn{n(n-1)} for directed graphs and \eqn{n(n-1)/2} for undirected graphs. -} + } } } \description{ \code{distances()} calculates the length of all the shortest paths from or to the vertices in the network. -\code{shortest_paths()} calculates one shortest path (the path itself, and not just its length) from or to the given vertex. + \code{shortest_paths()} calculates one shortest path (the path itself, and not just its length) from or to the given vertex. } \details{ The shortest path, or geodesic between two pair of vertices is a path with the minimal number of vertices. -The functions documented in this manual page all calculate shortest paths between vertex pairs. + The functions documented in this manual page all calculate shortest paths between vertex pairs. \code{distances()} calculates the lengths of pairwise shortest paths from a set of vertices (\code{from}) to another set of vertices (\code{to}). -It uses different algorithms, depending on the \code{algorithm} argument and the \code{weight} edge attribute of the graph. -The implemented algorithms are breadth-first search (\sQuote{\code{unweighted}}), this only works for unweighted graphs; + It uses different algorithms, depending on the \code{algorithm} argument and the \code{weight} edge attribute of the graph. + The implemented algorithms are breadth-first search (\sQuote{\code{unweighted}}), this only works for unweighted graphs; the Dijkstra algorithm (\sQuote{\code{dijkstra}}), this works for graphs with non-negative edge weights; the Bellman-Ford algorithm (\sQuote{\code{bellman-ford}}); Johnson's algorithm (\sQuote{\code{johnson}}); and a faster version of the Floyd-Warshall algorithm with expected quadratic running time (\sQuote{\code{floyd-warshall}}). -The latter three algorithms work with arbitrary edge weights, but (naturally) only for graphs that don't have a negative cycle. -Note that a negative-weight edge in an undirected graph implies such a cycle. -Johnson's algorithm performs better than the Bellman-Ford one when many source (and target) vertices are given, + The latter three algorithms work with arbitrary edge weights, but (naturally) only for graphs that don't have a negative cycle. + Note that a negative-weight edge in an undirected graph implies such a cycle. + Johnson's algorithm performs better than the Bellman-Ford one when many source (and target) vertices are given, with all-pairs shortest path length calculations being the typical use case. igraph can choose automatically between algorithms, and chooses the most efficient one that is appropriate for the supplied weights (if any). -For automatic algorithm selection, supply \sQuote{\code{automatic}} as the \code{algorithm} argument. -(This is also the default.) + For automatic algorithm selection, supply \sQuote{\code{automatic}} as the \code{algorithm} argument. + (This is also the default.) \code{shortest_paths()} calculates a single shortest path (i.e. the path itself, not just its length) between the source vertex given in \code{from}, to the target vertices given in \code{to}. -\code{shortest_paths()} uses breadth-first search for unweighted graphs and Dijkstra's algorithm for weighted graphs. -The latter only works if the edge weights are non-negative. + \code{shortest_paths()} uses breadth-first search for unweighted graphs and Dijkstra's algorithm for weighted graphs. + The latter only works if the edge weights are non-negative. \code{all_shortest_paths()} calculates \emph{all} shortest paths between pairs of vertices, including several shortest paths of the same length. -More precisely, it computerd all shortest path starting at \code{from}, and ending at any vertex given in \code{to}. -It uses a breadth-first search for unweighted graphs and Dijkstra's algorithm for weighted ones. -The latter only supports non-negative edge weights. -Caution: in multigraphs, the result size is exponentially large in the number of vertex pairs with multiple edges between them. + More precisely, it computerd all shortest path starting at \code{from}, and ending at any vertex given in \code{to}. + It uses a breadth-first search for unweighted graphs and Dijkstra's algorithm for weighted ones. + The latter only supports non-negative edge weights. + Caution: in multigraphs, the result size is exponentially large in the number of vertex pairs with multiple edges between them. \code{mean_distance()} calculates the average path length in a graph, by calculating the shortest paths between all pairs of vertices (both ways for directed graphs). -It uses a breadth-first search for unweighted graphs and Dijkstra's algorithm for weighted ones. -The latter only supports non-negative edge weights. + It uses a breadth-first search for unweighted graphs and Dijkstra's algorithm for weighted ones. + The latter only supports non-negative edge weights. \code{distance_table()} calculates a histogram, by calculating the shortest path length between each pair of vertices. -For directed graphs both directions are considered, so every pair of vertices appears twice in the histogram. + For directed graphs both directions are considered, so every pair of vertices appears twice in the histogram. } \section{Related documentation in the C library}{ \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_path_length_hist}{\code{path_length_hist()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_average_path_length_dijkstra}{\code{average_path_length_dijkstra()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_edges}{\code{edges()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_get_eids}{\code{get_eids()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_ecount}{\code{ecount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_is_directed}{\code{is_directed()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_get_all_shortest_paths_dijkstra}{\code{get_all_shortest_paths_dijkstra()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_get_all_shortest_paths}{\code{get_all_shortest_paths()}} diff --git a/man/diverging_pal.Rd b/man/diverging_pal.Rd index 751b2579dc1..8d371de0554 100644 --- a/man/diverging_pal.Rd +++ b/man/diverging_pal.Rd @@ -8,18 +8,18 @@ diverging_pal(n) } \arguments{ \item{n}{The number of colors in the palette. -The maximum is eleven currently.} + The maximum is eleven currently.} } \value{ A character vector of RGB color codes. } \description{ This is the \sQuote{PuOr} palette from \url{https://colorbrewer2.org/}. -It has at most eleven colors. + It has at most eleven colors. } \details{ This is similar to \code{\link[=sequential_pal]{sequential_pal()}}, but it also puts emphasis on the mid-range values, plus the the two extreme ends. -Use this palette, if you have such a quantity to mark with vertex colors. + Use this palette, if you have such a quantity to mark with vertex colors. } \examples{ \dontshow{if (rlang::is_installed(c("igraphdata", "scales"))) withAutoprint(\{ # examplesIf} diff --git a/man/diversity.Rd b/man/diversity.Rd index 975d6a0560b..0846bc8f0d2 100644 --- a/man/diversity.Rd +++ b/man/diversity.Rd @@ -8,16 +8,16 @@ diversity(graph, ..., weights = NULL, vids = NULL) } \arguments{ \item{graph}{The input graph. -Edge directions are ignored.} + Edge directions are ignored.} \item{...}{These dots are for future extensions and must be empty.} \item{weights}{\code{NULL}, or the vector of edge weights to use for the computation. -If \code{NULL}, then the \sQuote{weight} attibute is used. -Note that this measure is not defined for unweighted graphs.} + If \code{NULL}, then the \sQuote{weight} attibute is used. + Note that this measure is not defined for unweighted graphs.} \item{vids}{The vertex IDs for which to calculate the measure. -The default \code{NULL} selects all vertices.} + The default \code{NULL} selects all vertices.} } \value{ A numeric vector, its length is the number of vertices. diff --git a/man/dominator.tree.Rd b/man/dominator.tree.Rd index 8bb2842304f..d96619daabc 100644 --- a/man/dominator.tree.Rd +++ b/man/dominator.tree.Rd @@ -8,13 +8,13 @@ dominator.tree(graph, root, mode = c("out", "in", "all", "total")) } \arguments{ \item{graph}{A directed graph. -If it is not a flowgraph, and it contains some vertices not reachable from the root vertex, + If it is not a flowgraph, and it contains some vertices not reachable from the root vertex, then these vertices will be collected and returned as part of the result.} \item{root}{The ID of the root (or source) vertex, this will be the root of the tree.} \item{mode}{Constant, must be \sQuote{\verb{in}} or \sQuote{\code{out}}. -If it is \sQuote{\verb{in}}, then all directions are considered as opposite to the original one in the input graph.} + If it is \sQuote{\verb{in}}, then all directions are considered as opposite to the original one in the input graph.} } \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/dominator_tree.Rd b/man/dominator_tree.Rd index dfef6654e63..2a391f4c30a 100644 --- a/man/dominator_tree.Rd +++ b/man/dominator_tree.Rd @@ -8,7 +8,7 @@ dominator_tree(graph, root, ..., mode = c("out", "in", "all", "total")) } \arguments{ \item{graph}{A directed graph. -If it is not a flowgraph, and it contains some vertices not reachable from the root vertex, + If it is not a flowgraph, and it contains some vertices not reachable from the root vertex, then these vertices will be collected and returned as part of the result.} \item{root}{The ID of the root (or source) vertex, this will be the root of the tree.} @@ -16,24 +16,24 @@ then these vertices will be collected and returned as part of the result.} \item{...}{These dots are for future extensions and must be empty.} \item{mode}{Constant, must be \sQuote{\verb{in}} or \sQuote{\code{out}}. -If it is \sQuote{\verb{in}}, then all directions are considered as opposite to the original one in the input graph.} + If it is \sQuote{\verb{in}}, then all directions are considered as opposite to the original one in the input graph.} } \value{ A list with components: \describe{ \item{dom}{ A numeric vector giving the immediate dominators for each vertex. -For vertices that are unreachable from the root, it contains \code{NaN}. -For the root vertex itself it contains minus one. -} + For vertices that are unreachable from the root, it contains \code{NaN}. + For the root vertex itself it contains minus one. + } \item{domtree}{ A graph object, the dominator tree. -Its vertex IDs are the as the vertex IDs of the input graph. -Isolate vertices are the ones that are unreachable from the root. -} + Its vertex IDs are the as the vertex IDs of the input graph. + Isolate vertices are the ones that are unreachable from the root. + } \item{leftout}{ A numeric vector containing the vertex IDs that are unreachable from the root. -} + } } } \description{ @@ -42,15 +42,15 @@ Dominator tree of a directed graph. \details{ A flowgraph is a directed graph with a distinguished start (or root) vertex \eqn{r}, such that for any vertex \eqn{v}, there is a path from \eqn{r} to \eqn{v}. -A vertex \eqn{v} dominates another vertex \eqn{w} (not equal to \eqn{v}), if every path from \eqn{r} to \eqn{w} contains \eqn{v}. -Vertex \eqn{v} is the immediate dominator or \eqn{w}, \eqn{v=\textrm{idom}(w)}{v=idom(w)}, + A vertex \eqn{v} dominates another vertex \eqn{w} (not equal to \eqn{v}), if every path from \eqn{r} to \eqn{w} contains \eqn{v}. + Vertex \eqn{v} is the immediate dominator or \eqn{w}, \eqn{v=\textrm{idom}(w)}{v=idom(w)}, if \eqn{v} dominates \eqn{w} and every other dominator of \eqn{w} dominates \eqn{v}. -The edges \eqn{{(\textrm{idom}(w), w)| w \ne r}}{{(idom(w),w)| w is not r}} form a directed tree, rooted at \eqn{r}, + The edges \eqn{{(\textrm{idom}(w), w)| w \ne r}}{{(idom(w),w)| w is not r}} form a directed tree, rooted at \eqn{r}, called the dominator tree of the graph. -Vertex \eqn{v} dominates vertex \eqn{w} if and only if \eqn{v} is an ancestor of \eqn{w} in the dominator tree. + Vertex \eqn{v} dominates vertex \eqn{w} if and only if \eqn{v} is an ancestor of \eqn{w} in the dominator tree. This function implements the Lengauer-Tarjan algorithm to construct the dominator tree of a directed graph. -For details see the reference below. + For details see the reference below. } \section{Related documentation in the C library}{ \href{https://igraph.org/c/html/0.10.17/igraph-Flows.html#igraph_dominator_tree}{\code{dominator_tree()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}} diff --git a/man/dot-data.Rd b/man/dot-data.Rd index 703249061d8..cfad8033953 100644 --- a/man/dot-data.Rd +++ b/man/dot-data.Rd @@ -9,7 +9,7 @@ \description{ The \code{.data} and \code{.env} pronouns make it explicit where to look up attribute names when indexing \code{V(g)} or \code{E(g)}, i.e. the vertex or edge sequence of a graph. -These pronouns are inspired by \code{.data} and \code{.env} in \code{rlang} - thanks to Michał Bojanowski for bringing these to our attention. + These pronouns are inspired by \code{.data} and \code{.env} in \code{rlang} - thanks to Michał Bojanowski for bringing these to our attention. The rules are simple: \itemize{ @@ -19,8 +19,8 @@ The rules are simple: Note that \code{.data} and \code{.env} are injected dynamically into the environment where the indexing expressions are evaluated; you cannot get access to these objects outside the context of an indexing expression. -To avoid warnings printed by \verb{R CMD check} when code containing \code{.data} and \code{.env} is checked, + To avoid warnings printed by \verb{R CMD check} when code containing \code{.data} and \code{.env} is checked, you can import \code{.data} and \code{.env} from \code{igraph} if needed. -Alternatively, you can declare them explicitly with \code{utils::globalVariables()} to silence the warnings. + Alternatively, you can declare them explicitly with \code{utils::globalVariables()} to silence the warnings. } \concept{env-and-data} diff --git a/man/dot-extract_constructor_and_modifiers.Rd b/man/dot-extract_constructor_and_modifiers.Rd index eb81c1c970c..663c070ee93 100644 --- a/man/dot-extract_constructor_and_modifiers.Rd +++ b/man/dot-extract_constructor_and_modifiers.Rd @@ -12,7 +12,7 @@ \item{.operation}{Human-readable description of the operation that this helper is a part of} \item{.variant}{Constructor variant; must be one of \sQuote{make}, \sQuote{graph} or \sQuote{sample}. -Used in cases when the same constructor specification has deterministic and random variants.} + Used in cases when the same constructor specification has deterministic and random variants.} } \value{ A named list with three items: @@ -25,7 +25,7 @@ the modifiers } \item{args}{ the remaining, unparsed arguments. -} + } } } \description{ diff --git a/man/dyad.census.Rd b/man/dyad.census.Rd index a33d39d3264..4ed08830649 100644 --- a/man/dyad.census.Rd +++ b/man/dyad.census.Rd @@ -8,7 +8,7 @@ dyad.census(graph) } \arguments{ \item{graph}{The input graph. -A warning is given if it is not directed.} + A warning is given if it is not directed.} } \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/dyad_census.Rd b/man/dyad_census.Rd index 47e2590a5bb..aa5f263e1dc 100644 --- a/man/dyad_census.Rd +++ b/man/dyad_census.Rd @@ -8,26 +8,26 @@ dyad_census(graph) } \arguments{ \item{graph}{The input graph. -A warning is given if it is not directed.} + A warning is given if it is not directed.} } \value{ A named numeric vector with three elements: \describe{ \item{mut}{ The number of pairs with mutual connections. -} + } \item{asym}{ The number of pairs with non-mutual connections. -} + } \item{null}{ The number of pairs with no connection between them. -} + } } } \description{ Classify dyads in a directed graphs. -The relationship between each pair of vertices is measured. -It can be in three states: mutual, asymmetric or non-existent. + The relationship between each pair of vertices is measured. + It can be in three states: mutual, asymmetric or non-existent. } \section{Related documentation in the C library}{ \href{https://igraph.org/c/html/0.10.17/igraph-Motifs.html#igraph_dyad_census}{\code{dyad_census()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_is_directed}{\code{is_directed()}} @@ -41,7 +41,7 @@ dyad_census(g) \references{ Holland, P.W. and Leinhardt, S. A Method for Detecting Structure in Sociometric Data. \emph{American Journal of Sociology}, 76, 492--513. -1970. + 1970. Wasserman, S., and Faust, K. \emph{Social Network Analysis: Methods and Applications.} Cambridge: Cambridge University Press. 1994. diff --git a/man/each_edge.Rd b/man/each_edge.Rd index 783694fc147..678743f9bed 100644 --- a/man/each_edge.Rd +++ b/man/each_edge.Rd @@ -22,13 +22,13 @@ each_edge( \item{multiple}{Logical, whether multiple edges are allowed in the generated graph.} \item{mode}{Character string, specifies which endpoint of the edges to rewire in directed graphs. -\sQuote{all} rewires both endpoints, \sQuote{in} rewires the start (tail) of each directed edge, + \sQuote{all} rewires both endpoints, \sQuote{in} rewires the start (tail) of each directed edge, \sQuote{out} rewires the end (head) of each directed edge. -Ignored for undirected graphs.} + Ignored for undirected graphs.} } \description{ This function can be used together with \code{\link[=rewire]{rewire()}}. -This method rewires the endpoints of the edges with a constant probability uniformly randomly to a new vertex in a graph. + This method rewires the endpoints of the edges with a constant probability uniformly randomly to a new vertex in a graph. } \details{ Note that this method might create graphs with multiple and/or loop edges. diff --git a/man/eccentricity.Rd b/man/eccentricity.Rd index f20123cb7ab..86dc340cad6 100644 --- a/man/eccentricity.Rd +++ b/man/eccentricity.Rd @@ -20,15 +20,15 @@ eccentricity( \item{...}{These dots are for future extensions and must be empty.} \item{weights}{Possibly a numeric vector giving edge weights. -If this is \code{NULL} and the graph has a \code{weight} edge attribute, then the attribute is used. -If this is \code{NA} then no weights are used (even if the graph has a \code{weight} attribute). -In a weighted graph, the length of a path is the sum of the weights of its constituent edges.} + If this is \code{NULL} and the graph has a \code{weight} edge attribute, then the attribute is used. + If this is \code{NA} then no weights are used (even if the graph has a \code{weight} attribute). + In a weighted graph, the length of a path is the sum of the weights of its constituent edges.} \item{mode}{Character constant, gives whether the shortest paths to or from the given vertices should be calculated for directed graphs. -If \code{out} then the shortest paths \emph{from} the vertex, if \verb{in} then \emph{to} it will be considered. -If \code{all}, the default, then the graph is treated as undirected, i.e. edge directions are not taken into account. -This argument is ignored for undirected graphs.} + If \code{out} then the shortest paths \emph{from} the vertex, if \verb{in} then \emph{to} it will be considered. + If \code{all}, the default, then the graph is treated as undirected, i.e. edge directions are not taken into account. + This argument is ignored for undirected graphs.} } \value{ \code{eccentricity()} returns a numeric vector, containing the eccentricity score of each given vertex. @@ -41,7 +41,7 @@ The eccentricity of a vertex is calculated by measuring the shortest distance fr to (or from) all vertices in the graph, and taking the maximum. This implementation ignores vertex pairs that are in different components. -Isolate vertices have eccentricity zero. + Isolate vertices have eccentricity zero. } \section{Related documentation in the C library}{ \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_eccentricity_dijkstra}{\code{eccentricity_dijkstra()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_edges}{\code{edges()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_get_eids}{\code{get_eids()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_ecount}{\code{ecount()}} diff --git a/man/edge.Rd b/man/edge.Rd index 61e70a7a739..bde1eee96f4 100644 --- a/man/edge.Rd +++ b/man/edge.Rd @@ -22,8 +22,8 @@ This is a helper function that simplifies adding and deleting edges to/from grap \code{edges()} is an alias for \code{edge()}. When adding edges via \code{+}, all unnamed arguments of \code{edge()} (or \code{edges()}) are concatenated, and then passed to \code{\link[=add_edges]{add_edges()}}. -They are interpreted as pairs of vertex IDs, and an edge will added between each pair. -Named arguments will be used as edge attributes for the new edges. + They are interpreted as pairs of vertex IDs, and an edge will added between each pair. + Named arguments will be used as edge attributes for the new edges. When deleting edges via \code{-}, all arguments of \code{edge()} (or \code{edges()}) are concatenated via \code{c()} and passed to \code{\link[=delete_edges]{delete_edges()}}. } diff --git a/man/edge.betweenness.Rd b/man/edge.betweenness.Rd index 598f97db794..ebdef352efd 100644 --- a/man/edge.betweenness.Rd +++ b/man/edge.betweenness.Rd @@ -16,16 +16,16 @@ edge.betweenness( \item{graph}{The graph to analyze.} \item{e}{The edges for which the edge betweenness will be calculated. -The default \code{NULL} selects all edges.} + The default \code{NULL} selects all edges.} \item{directed}{Logical, whether directed paths should be considered while determining the shortest paths.} \item{weights}{Optional positive weight vector for calculating weighted betweenness. -If the graph has a \code{weight} edge attribute, then this is used by default. -Weights are used to calculate weighted shortest paths, so they are interpreted as distances.} + If the graph has a \code{weight} edge attribute, then this is used by default. + Weights are used to calculate weighted shortest paths, so they are interpreted as distances.} \item{cutoff}{The maximum shortest path length to consider when calculating betweenness. -If negative, then there is no such limit.} + If negative, then there is no such limit.} } \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/edge.betweenness.community.Rd b/man/edge.betweenness.community.Rd index 8c0b324729d..602712b0db8 100644 --- a/man/edge.betweenness.community.Rd +++ b/man/edge.betweenness.community.Rd @@ -19,28 +19,28 @@ edge.betweenness.community( \item{graph}{The graph to analyze.} \item{weights}{The weights of the edges. -It must be a positive numeric vector, \code{NULL} or \code{NA}. -If it is \code{NULL} and the input graph has a \sQuote{weight} edge attribute, then that attribute will be used. -If \code{NULL} and no such attribute is present, then the edges will have equal weights. -Set this to \code{NA} if the graph was a \sQuote{weight} edge attribute, but you don't want to use it for community detection. -Edge weights are used to calculate weighted edge betweenness. -This means that edges are interpreted as distances, not as connection strengths.} + It must be a positive numeric vector, \code{NULL} or \code{NA}. + If it is \code{NULL} and the input graph has a \sQuote{weight} edge attribute, then that attribute will be used. + If \code{NULL} and no such attribute is present, then the edges will have equal weights. + Set this to \code{NA} if the graph was a \sQuote{weight} edge attribute, but you don't want to use it for community detection. + Edge weights are used to calculate weighted edge betweenness. + This means that edges are interpreted as distances, not as connection strengths.} \item{directed}{Logical, whether to calculate directed edge betweenness for directed graphs. -It is ignored for undirected graphs.} + It is ignored for undirected graphs.} \item{edge.betweenness}{Logical, whether to return the edge betweenness of the edges at the time of their removal.} \item{merges}{Logical, whether to return the merge matrix representing the hierarchical community structure of the network. -This argument is called \code{merges}, even if the community structure algorithm itself is divisive and not agglomerative: + This argument is called \code{merges}, even if the community structure algorithm itself is divisive and not agglomerative: it builds the tree from top to bottom. -There is one line for each merge (i.e. split) in matrix, the first line is the first merge (last split). -The communities are identified by integer number starting from one. -Community IDs smaller than or equal to \eqn{N}, the number of vertices in the graph, belong to singleton communities, + There is one line for each merge (i.e. split) in matrix, the first line is the first merge (last split). + The communities are identified by integer number starting from one. + Community IDs smaller than or equal to \eqn{N}, the number of vertices in the graph, belong to singleton communities, i.e. individual vertices. -Before the first merge we have \eqn{N} communities numbered from one to \eqn{N}. -The first merge, the first line of the matrix creates community \eqn{N+1}, the second merge creates community \eqn{N+2}, etc.} + Before the first merge we have \eqn{N} communities numbered from one to \eqn{N}. + The first merge, the first line of the matrix creates community \eqn{N+1}, the second merge creates community \eqn{N+2}, etc.} \item{bridges}{Logical, whether to return a list the edge removals which actually splitted a component of the graph.} diff --git a/man/edge.connectivity.Rd b/man/edge.connectivity.Rd index c6bf7c081ed..d79499d2c04 100644 --- a/man/edge.connectivity.Rd +++ b/man/edge.connectivity.Rd @@ -14,11 +14,11 @@ edge.connectivity(graph, source = NULL, target = NULL, checks = TRUE) \item{target}{The ID of the target vertex, for \code{edge_connectivity()} it can be \code{NULL}, see details below.} \item{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 degree is one then the edge connectivity is also one. -It is a good idea to perform these checks, as they can be done quickly compared to the connectivity calculation itself. -They were suggested by Peter McMahan, thanks Peter.} + 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 degree is one then the edge connectivity is also one. + It is a good idea to perform these checks, as they can be done quickly compared to the connectivity calculation itself. + They were suggested by Peter McMahan, thanks Peter.} } \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/edge.disjoint.paths.Rd b/man/edge.disjoint.paths.Rd index 3a54a146388..015359643f7 100644 --- a/man/edge.disjoint.paths.Rd +++ b/man/edge.disjoint.paths.Rd @@ -14,11 +14,11 @@ edge.disjoint.paths(graph, source = NULL, target = NULL, checks = TRUE) \item{target}{The ID of the target vertex, for \code{edge_connectivity()} it can be \code{NULL}, see details below.} \item{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 degree is one then the edge connectivity is also one. -It is a good idea to perform these checks, as they can be done quickly compared to the connectivity calculation itself. -They were suggested by Peter McMahan, thanks Peter.} + 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 degree is one then the edge connectivity is also one. + It is a good idea to perform these checks, as they can be done quickly compared to the connectivity calculation itself. + They were suggested by Peter McMahan, thanks Peter.} } \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/edge_attr-set.Rd b/man/edge_attr-set.Rd index a713e9511e0..a81fb0919b0 100644 --- a/man/edge_attr-set.Rd +++ b/man/edge_attr-set.Rd @@ -11,10 +11,10 @@ edge_attr(graph, name, index = NULL) <- value \item{graph}{The graph.} \item{name}{The name of the edge attribute to set. -If missing, then \code{value} must be a named list, and its entries are set as edge attributes.} + If missing, then \code{value} must be a named list, and its entries are set as edge attributes.} \item{index}{An optional edge sequence to set the attributes of a subset of edges. -The default \code{NULL} selects all edges.} + The default \code{NULL} selects all edges.} \item{value}{The new value of the attribute(s) for all (or \code{index}) edges.} } diff --git a/man/edge_attr.Rd b/man/edge_attr.Rd index d01cba4493e..923fa403a1d 100644 --- a/man/edge_attr.Rd +++ b/man/edge_attr.Rd @@ -11,10 +11,10 @@ edge_attr(graph, name, index = NULL) \item{graph}{The graph} \item{name}{The name of the attribute to query. -If missing, then all edge attributes are returned in a list.} + If missing, then all edge attributes are returned in a list.} \item{index}{An optional edge sequence to query edge attributes for a subset of edges. -The default \code{NULL} selects all edges.} + The default \code{NULL} selects all edges.} } \value{ The value of the edge attribute, or the list of all edge attributes if \code{name} is missing. diff --git a/man/edge_connectivity.Rd b/man/edge_connectivity.Rd index 5e7854d8169..cdde52a73cb 100644 --- a/man/edge_connectivity.Rd +++ b/man/edge_connectivity.Rd @@ -22,11 +22,11 @@ adhesion(graph, ..., checks = TRUE) \item{...}{These dots are for future extensions and must be empty.} \item{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 degree is one then the edge connectivity is also one. -It is a good idea to perform these checks, as they can be done quickly compared to the connectivity calculation itself. -They were suggested by Peter McMahan, thanks Peter.} + 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 degree is one then the edge connectivity is also one. + It is a good idea to perform these checks, as they can be done quickly compared to the connectivity calculation itself. + They were suggested by Peter McMahan, thanks Peter.} } \value{ A scalar real value. @@ -37,30 +37,30 @@ The edge connectivity of a graph or two vertices, this is recently also called g \section{\code{edge_connectivity()} Edge connectivity}{ The edge connectivity of a pair of vertices (\code{source} and \code{target}) is the minimum number of edges needed to remove to eliminate all (directed) paths from \code{source} to \code{target}. -\code{edge_connectivity()} calculates this quantity if both the \code{source} and \code{target} arguments are given (and not \code{NULL}). + \code{edge_connectivity()} calculates this quantity if both the \code{source} and \code{target} arguments are given (and not \code{NULL}). The edge connectivity of a graph is the minimum of the edge connectivity of every (ordered) pair of vertices in the graph. -\code{edge_connectivity()} calculates this quantity if neither the \code{source} nor the \code{target} arguments are given (i.e. they are both \code{NULL}). + \code{edge_connectivity()} calculates this quantity if neither the \code{source} nor the \code{target} arguments are given (i.e. they are both \code{NULL}). } \section{\code{edge_disjoint_paths()} The maximum number of edge-disjoint paths between two vertices}{ A set of paths between two vertices is called edge-disjoint if they do not share any edges. -The maximum number of edge-disjoint paths are calculated by this function using maximum flow techniques. -Directed paths are considered in directed graphs. + The maximum number of edge-disjoint paths are calculated by this function using maximum flow techniques. + Directed paths are considered in directed graphs. A set of edge disjoint paths between two vertices is a set of paths between them containing no common edges. -The maximum number of edge disjoint paths between two vertices is the same as their edge connectivity. + The maximum number of edge disjoint paths between two vertices is the same as their edge connectivity. When there are no direct edges between the source and the target, the number of vertex-disjoint paths is the same as the vertex connectivity of the two vertices. -When some edges are present, each one of them contributes one extra path. + When some edges are present, each one of them contributes one extra path. } \section{\code{adhesion()} Adhesion of a graph}{ The adhesion of a graph is the minimum number of edges needed to remove to obtain a graph which is not strongly connected. -This is the same as the edge connectivity of the graph. + This is the same as the edge connectivity of the graph. } \section{All three functions}{ diff --git a/man/edge_density.Rd b/man/edge_density.Rd index e6f16e11fe5..8b268fb0feb 100644 --- a/man/edge_density.Rd +++ b/man/edge_density.Rd @@ -12,12 +12,12 @@ edge_density(graph, ..., loops = FALSE) \item{...}{These dots are for future extensions and must be empty.} \item{loops}{Logical, whether loop edges may exist in the graph. -This affects the calculation of the largest possible number of edges in the graph. -If this parameter is set to FALSE yet the graph contains self-loops, the result will not be meaningful.} + This affects the calculation of the largest possible number of edges in the graph. + If this parameter is set to FALSE yet the graph contains self-loops, the result will not be meaningful.} } \value{ A real constant. -This function returns \code{NaN} (=0.0/0.0) for an empty graph with zero vertices. + This function returns \code{NaN} (=0.0/0.0) for an empty graph with zero vertices. } \description{ The density of a graph is the ratio of the actual number of edges and the largest possible number of edges in the graph, @@ -25,7 +25,7 @@ assuming that no multi-edges are present. } \details{ The concept of density is ill-defined for multigraphs. -Note that this function does not check whether the graph has multi-edges and will return meaningless results for such graphs. + Note that this function does not check whether the graph has multi-edges and will return meaningless results for such graphs. } \section{Related documentation in the C library}{ \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_density}{\code{density()}} diff --git a/man/ego.Rd b/man/ego.Rd index 5233fb1b31e..ab6ce88ccb4 100644 --- a/man/ego.Rd +++ b/man/ego.Rd @@ -71,19 +71,19 @@ make_neighborhood_graph( \item{graph}{The input graph.} \item{order}{Integer giving the order of the neighborhood. -Negative values indicate an infinite order.} + Negative values indicate an infinite order.} \item{...}{These dots are for future extensions and must be empty.} \item{mode}{Character constant, it specifies how to use the direction of the edges if a directed graph is analyzed. -For \sQuote{out} only the outgoing edges are followed, + For \sQuote{out} only the outgoing edges are followed, so all vertices reachable from the source vertex in at most \code{order} steps are counted. -For \sQuote{"in"} all vertices from which the source vertex is reachable in at most \code{order} steps are counted. -\sQuote{"all"} ignores the direction of the edges. -This argument is ignored for undirected graphs.} + For \sQuote{"in"} all vertices from which the source vertex is reachable in at most \code{order} steps are counted. + \sQuote{"all"} ignores the direction of the edges. + This argument is ignored for undirected graphs.} \item{nodes}{The vertices for which the calculation is performed. -The default \code{NULL} selects all vertices.} + The default \code{NULL} selects all vertices.} \item{mindist}{The minimum distance to include the vertex in the result.} } @@ -100,12 +100,12 @@ see details for performance characteristics.} \description{ These functions find the vertices not farther than a given limit from another fixed vertex, these are called the neighborhood of the vertex. -Note that \code{ego()} and \code{neighborhood()}, \code{ego_size()} and \code{neighborhood_size()}, \code{make_ego_graph()} and \verb{make_neighborhood()_graph()}, + Note that \code{ego()} and \code{neighborhood()}, \code{ego_size()} and \code{neighborhood_size()}, \code{make_ego_graph()} and \verb{make_neighborhood()_graph()}, are synonyms (aliases). } \details{ The neighborhood of a given order \code{r} of a vertex \code{v} includes all vertices which are closer to \code{v} than the order. -I.e. order 0 is always \code{v} itself, order 1 is \code{v} plus its immediate neighbors, + I.e. order 0 is always \code{v} itself, order 1 is \code{v} plus its immediate neighbors, order 2 is order 1 plus the immediate neighbors of the vertices in order 1, etc. \code{ego_size()}/\code{neighborhood_size()} (synonyms) returns the size of the neighborhoods of the given order, @@ -114,7 +114,7 @@ for each given vertex. \code{ego()}/\code{neighborhood()} (synonyms) returns the vertices belonging to the neighborhoods of the given order, for each given vertex. \code{make_ego_graph()}/\verb{make_neighborhood()_graph()} (synonyms) is creates (sub)graphs from all neighborhoods of the given vertices with the given order parameter. -This function preserves the vertex, edge and graph attributes. + This function preserves the vertex, edge and graph attributes. \code{connect()} creates a new graph by connecting each vertex to all other vertices in its neighborhood. } diff --git a/man/eigen_centrality.Rd b/man/eigen_centrality.Rd index 9447d8b82c3..0dfaeaa2d51 100644 --- a/man/eigen_centrality.Rd +++ b/man/eigen_centrality.Rd @@ -16,35 +16,35 @@ eigen_centrality( \item{graph}{Graph to be analyzed.} \item{directed}{Logical, whether to consider direction of the edges in directed graphs. -It is ignored for undirected graphs.} + It is ignored for undirected graphs.} \item{scale}{\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} Normalization will always take place.} \item{weights}{A numerical vector or \code{NULL}. -This argument can be used to give edge weights for calculating the weighted eigenvector centrality of vertices. -If this is \code{NULL} and the graph has a \code{weight} edge attribute then that is used. -If \code{weights} is a numerical vector then it is used, even if the graph has a \code{weight} edge attribute. -If this is \code{NA}, then no edge weights are used (even if the graph has a \code{weight} edge attribute). -Note that if there are negative edge weights and the direction of the edges is considered, then the eigenvector might be complex. -In this case only the real part is reported. -This function interprets weights as connection strength. -Higher weights spread the centrality better.} + This argument can be used to give edge weights for calculating the weighted eigenvector centrality of vertices. + If this is \code{NULL} and the graph has a \code{weight} edge attribute then that is used. + If \code{weights} is a numerical vector then it is used, even if the graph has a \code{weight} edge attribute. + If this is \code{NA}, then no edge weights are used (even if the graph has a \code{weight} edge attribute). + Note that if there are negative edge weights and the direction of the edges is considered, then the eigenvector might be complex. + In this case only the real part is reported. + This function interprets weights as connection strength. + Higher weights spread the centrality better.} \item{options}{A named list, to override some ARPACK options. -See \code{\link[=arpack]{arpack()}} for details.} + See \code{\link[=arpack]{arpack()}} for details.} } \value{ A named list with components: \describe{ \item{vector}{ A vector containing the centrality scores. -} + } \item{value}{ The eigenvalue corresponding to the calculated eigenvector, i.e. the centrality scores. -} + } \item{options}{ A named list, information about the underlying ARPACK computation. See \code{\link[=arpack]{arpack()}} for the details. -} + } } } \description{ @@ -55,12 +55,12 @@ Eigenvector centrality scores correspond to the values of the principal eigenvec in turn, be interpreted as arising from a reciprocal process in which the centrality of each actor is proportional to the sum of the centralities of those actors to whom he or she is connected. -In general, + In general, vertices with high eigenvector centralities are those which are connected to many other vertices which are, in turn, connected to many others (and so on). -The perceptive may realize that this implies + The perceptive may realize that this implies that the largest values will be obtained by individuals in large cliques (or high-density substructures). -This is also intelligible from an algebraic point of view, + This is also intelligible from an algebraic point of view, with the first eigenvector being closely related to the best rank-1 approximation of the adjacency matrix (a relationship which is easy to see in the special case of a diagonalizable symmetric real matrix via the \eqn{SLS^-1}{$S \Lambda S^{-1}$} decomposition). The adjacency matrix used in the eigenvector centrality calculation assumes that loop edges are counted \emph{twice} in undirected graphs; @@ -68,18 +68,18 @@ this is because each loop edge has \emph{two} endpoints that are both connected and you could traverse the loop edge via either endpoint. In the directed case, the left eigenvector of the adjacency matrix is calculated. -In other words, the centrality of a vertex is proportional to the sum of centralities of vertices pointing to it. + In other words, the centrality of a vertex is proportional to the sum of centralities of vertices pointing to it. Eigenvector centrality is meaningful only for (strongly) connected graphs. -Undirected graphs that are not connected should be decomposed into connected components, + Undirected graphs that are not connected should be decomposed into connected components, and the eigenvector centrality calculated for each separately. -This function does not verify that the graph is connected. -If it is not, in the undirected case the scores of all but one component will be zeros. + This function does not verify that the graph is connected. + If it is not, in the undirected case the scores of all but one component will be zeros. Also note that the adjacency matrix of a directed acyclic graph or the adjacency matrix of an empty graph does not possess positive eigenvalues, therefore the eigenvector centrality is not defined for these graphs. igraph will return an eigenvalue of zero in such cases. -The eigenvector centralities will all be equal for an empty graph and will all be zeros for a directed acyclic graph. -Such pathological cases can be detected by checking whether the eigenvalue is very close to zero. + The eigenvector centralities will all be equal for an empty graph and will all be zeros for a directed acyclic graph. + Such pathological cases can be detected by checking whether the eigenvalue is very close to zero. From igraph version 0.5 this function uses ARPACK for the underlying computation, see \code{\link[=arpack]{arpack()}} for more about ARPACK in igraph. } diff --git a/man/embed_adjacency_matrix.Rd b/man/embed_adjacency_matrix.Rd index c10b7859448..fffd0c57a99 100644 --- a/man/embed_adjacency_matrix.Rd +++ b/man/embed_adjacency_matrix.Rd @@ -19,30 +19,30 @@ embed_adjacency_matrix( \item{graph}{The input graph, directed or undirected.} \item{no}{An integer scalar. -This value is the embedding dimension of the spectral embedding. -Should be smaller than the number of vertices. -The largest \code{no}-dimensional non-zero singular values are used for the spectral embedding.} + This value is the embedding dimension of the spectral embedding. + Should be smaller than the number of vertices. + The largest \code{no}-dimensional non-zero singular values are used for the spectral embedding.} \item{...}{These dots are for future extensions and must be empty.} \item{weights}{Optional positive weight vector for calculating a weighted embedding. -If the graph has a \code{weight} edge attribute, then this is used by default. -In a weighted embedding, the edge weights are used instead of the binary adjacencny matrix.} + If the graph has a \code{weight} edge attribute, then this is used by default. + In a weighted embedding, the edge weights are used instead of the binary adjacencny matrix.} \item{which}{Which eigenvalues (or singular values, for directed graphs) to use. -\sQuote{lm} means the ones with the largest magnitude, \sQuote{la} is the ones (algebraic) largest, + \sQuote{lm} means the ones with the largest magnitude, \sQuote{la} is the ones (algebraic) largest, and \sQuote{sa} is the (algebraic) smallest eigenvalues. -The default is \sQuote{lm}. -Note that for directed graphs \sQuote{la} and \sQuote{lm} are the equivalent, because the singular values are used for the ordering.} + The default is \sQuote{lm}. + Note that for directed graphs \sQuote{la} and \sQuote{lm} are the equivalent, because the singular values are used for the ordering.} \item{scaled}{Logical, if \code{FALSE}, then \eqn{U} and \eqn{V} are returned instead of \eqn{X} and \eqn{Y}.} \item{cvec}{A numeric vector, its length is the number vertices in the graph. -This vector is added to the diagonal of the adjacency matrix. -The default \code{NULL} uses \code{strength(graph, weights = weights) / (vcount(graph) - 1)}.} + This vector is added to the diagonal of the adjacency matrix. + The default \code{NULL} uses \code{strength(graph, weights = weights) / (vcount(graph) - 1)}.} \item{options}{A named list containing the parameters for the SVD computation algorithm in ARPACK. -The default \code{NULL} uses the values given by \code{\link[=arpack_defaults]{arpack_defaults()}}.} + The default \code{NULL} uses the values given by \code{\link[=arpack_defaults]{arpack_defaults()}}.} } \value{ A list containing with entries: @@ -50,20 +50,20 @@ A list containing with entries: \item{X}{ Estimated latent positions, an \code{n} times \code{no} matrix, \code{n} is the number of vertices. -} + } \item{Y}{ \code{NULL} for undirected graphs, the second half of the latent positions for directed graphs, an \code{n} times \code{no} matrix, \code{n} is the number of vertices. -} + } \item{D}{ The eigenvalues (for undirected graphs) or the singular values (for directed graphs) calculated by the algorithm. -} + } \item{options}{ A named list, information about the underlying ARPACK computation. -See \code{\link[=arpack]{arpack()}} for the details. -} + See \code{\link[=arpack]{arpack()}} for the details. + } } } \description{ @@ -71,7 +71,7 @@ Spectral decomposition of the adjacency matrices of graphs. } \details{ This function computes a \code{no}-dimensional Euclidean representation of the graph based on its adjacency matrix, \eqn{A}. -This representation is computed via the singular value decomposition of the adjacency matrix, \eqn{A=UDV^T}.In the case, + This representation is computed via the singular value decomposition of the adjacency matrix, \eqn{A=UDV^T}.In the case, where the graph is a random dot product graph generated using latent position vectors in \eqn{R^{no}} for each vertex, the embedding will provide an estimate of these latent vectors. diff --git a/man/embed_laplacian_matrix.Rd b/man/embed_laplacian_matrix.Rd index a6fcb195d77..56ca0238fac 100644 --- a/man/embed_laplacian_matrix.Rd +++ b/man/embed_laplacian_matrix.Rd @@ -19,31 +19,31 @@ embed_laplacian_matrix( \item{graph}{The input graph, directed or undirected.} \item{no}{An integer scalar. -This value is the embedding dimension of the spectral embedding. -Should be smaller than the number of vertices. -The largest \code{no}-dimensional non-zero singular values are used for the spectral embedding.} + This value is the embedding dimension of the spectral embedding. + Should be smaller than the number of vertices. + The largest \code{no}-dimensional non-zero singular values are used for the spectral embedding.} \item{...}{These dots are for future extensions and must be empty.} \item{weights}{Optional positive weight vector for calculating a weighted embedding. -If the graph has a \code{weight} edge attribute, then this is used by default. -For weighted embedding, edge weights are used instead of the binary adjacency matrix, + If the graph has a \code{weight} edge attribute, then this is used by default. + For weighted embedding, edge weights are used instead of the binary adjacency matrix, and vertex strength (see \code{\link[=strength]{strength()}}) is used instead of the degrees.} \item{which}{Which eigenvalues (or singular values, for directed graphs) to use. -\sQuote{lm} means the ones with the largest magnitude, \sQuote{la} is the ones (algebraic) largest, + \sQuote{lm} means the ones with the largest magnitude, \sQuote{la} is the ones (algebraic) largest, and \sQuote{sa} is the (algebraic) smallest eigenvalues. -The default is \sQuote{lm}. -Note that for directed graphs \sQuote{la} and \sQuote{lm} are the equivalent, because the singular values are used for the ordering.} + The default is \sQuote{lm}. + Note that for directed graphs \sQuote{la} and \sQuote{lm} are the equivalent, because the singular values are used for the ordering.} \item{type}{The type of the Laplacian to use. -Various definitions exist for the Laplacian of a graph, and one can choose between them with this argument. + Various definitions exist for the Laplacian of a graph, and one can choose between them with this argument. Possible values: \code{D-A} means \eqn{D-A} where \eqn{D} is the degree matrix and \eqn{A} is the adjacency matrix; \code{DAD} means \eqn{D^{1/2}}{D^1/2} times \eqn{A} times \eqn{D^{1/2}{D^1/2}}, \eqn{D^{1/2}}{D^1/2} is the inverse of the square root of the degree matrix; \code{I-DAD} means \eqn{I-D^{1/2}}{I-D^1/2}, where \eqn{I} is the identity matrix. -\code{OAP} is \eqn{O^{1/2}AP^{1/2}}{O^1/2 A P^1/2}, + \code{OAP} is \eqn{O^{1/2}AP^{1/2}}{O^1/2 A P^1/2}, where \eqn{O^{1/2}}{O^1/2} is the inverse of the square root of the out-degree matrix and \eqn{P^{1/2}}{P^1/2} is the same for the in-degree matrix. \code{OAP} is not defined for undirected graphs, and is the only defined type for directed graphs. @@ -53,7 +53,7 @@ The default (i.e. type \code{default}) is to use \code{D-A} for undirected graph \item{scaled}{Logical, if \code{FALSE}, then \eqn{U} and \eqn{V} are returned instead of \eqn{X} and \eqn{Y}.} \item{options}{A named list containing the parameters for the SVD computation algorithm in ARPACK. -The default \code{NULL} uses the values given by \code{\link[=arpack_defaults]{arpack_defaults()}}.} + The default \code{NULL} uses the values given by \code{\link[=arpack_defaults]{arpack_defaults()}}.} } \value{ A list containing with entries: @@ -61,20 +61,20 @@ A list containing with entries: \item{X}{ Estimated latent positions, an \code{n} times \code{no} matrix, \code{n} is the number of vertices. -} + } \item{Y}{ \code{NULL} for undirected graphs, the second half of the latent positions for directed graphs, an \code{n} times \code{no} matrix, \code{n} is the number of vertices. -} + } \item{D}{ The eigenvalues (for undirected graphs) or the singular values (for directed graphs) calculated by the algorithm. -} + } \item{options}{ A named list, information about the underlying ARPACK computation. -See \code{\link[=arpack]{arpack()}} for the details. -} + See \code{\link[=arpack]{arpack()}} for the details. + } } } \description{ @@ -82,7 +82,7 @@ Spectral decomposition of Laplacian matrices of graphs. } \details{ This function computes a \code{no}-dimensional Euclidean representation of the graph based on its Laplacian matrix, \eqn{L}. -This representation is computed via the singular value decomposition of the Laplacian matrix. + This representation is computed via the singular value decomposition of the Laplacian matrix. They are essentially doing the same as \code{\link[=embed_adjacency_matrix]{embed_adjacency_matrix()}}, but work on the Laplacian matrix, instead of the adjacency matrix. diff --git a/man/ends.Rd b/man/ends.Rd index 8c437963e4f..1ce8c552c0d 100644 --- a/man/ends.Rd +++ b/man/ends.Rd @@ -15,7 +15,7 @@ ends(graph, es, ..., names = TRUE) \item{...}{These dots are for future extensions and must be empty.} \item{names}{Whether to return vertex names or numeric vertex IDs. -By default vertex names are used.} + By default vertex names are used.} } \value{ A two column matrix of vertex names or vertex IDs. diff --git a/man/erdos.renyi.game.Rd b/man/erdos.renyi.game.Rd index 5beab295c3c..e37257db516 100644 --- a/man/erdos.renyi.game.Rd +++ b/man/erdos.renyi.game.Rd @@ -33,7 +33,7 @@ A graph object. Since igraph version 0.8.0, both \code{erdos.renyi.game()} and \code{random.graph.game()} are deprecated, and \code{\link[=sample_gnp]{sample_gnp()}} and \code{\link[=sample_gnm]{sample_gnm()}} should be used instead. -See these for more details. + See these for more details. \code{random.graph.game()} is an (also deprecated) alias to this function. } diff --git a/man/establishment.game.Rd b/man/establishment.game.Rd index a06081fd737..b1a04b73713 100644 --- a/man/establishment.game.Rd +++ b/man/establishment.game.Rd @@ -21,12 +21,12 @@ establishment.game( \item{k}{The number of trials per time step, see details below.} \item{type.dist}{The distribution of the vertex types. -This is assumed to be stationary in time. -The default \code{NULL} gives a uniform distribution.} + This is assumed to be stationary in time. + The default \code{NULL} gives a uniform distribution.} \item{pref.matrix}{A matrix giving the preferences of the given vertex types. -These should be probabilities, i.e. numbers between zero and one. -The default \code{NULL} sets all preferences to one.} + These should be probabilities, i.e. numbers between zero and one. + The default \code{NULL} sets all preferences to one.} \item{directed}{Logical, whether to generate directed graphs.} } diff --git a/man/estimate_betweenness.Rd b/man/estimate_betweenness.Rd index 10a91010a77..8d579690d53 100644 --- a/man/estimate_betweenness.Rd +++ b/man/estimate_betweenness.Rd @@ -20,11 +20,11 @@ estimate_betweenness( \item{directed}{Logical, whether directed paths should be considered while determining the shortest paths.} \item{cutoff}{The maximum shortest path length to consider when calculating betweenness. -If negative, then there is no such limit.} + If negative, then there is no such limit.} \item{weights}{Optional positive weight vector for calculating weighted betweenness. -If the graph has a \code{weight} edge attribute, then this is used by default. -Weights are used to calculate weighted shortest paths, so they are interpreted as distances.} + If the graph has a \code{weight} edge attribute, then this is used by default. + Weights are used to calculate weighted shortest paths, so they are interpreted as distances.} } \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/estimate_closeness.Rd b/man/estimate_closeness.Rd index 986f2df6ad6..70d08744d4d 100644 --- a/man/estimate_closeness.Rd +++ b/man/estimate_closeness.Rd @@ -17,21 +17,21 @@ estimate_closeness( \item{graph}{The graph to analyze.} \item{vids}{The vertices for which closeness will be calculated. -The default \code{NULL} selects all vertices.} + The default \code{NULL} selects all vertices.} \item{mode}{Character string, defined the types of the paths used for measuring the distance in directed graphs. -\dQuote{in} measures the paths \emph{to} a vertex, \dQuote{out} measures paths \emph{from} a vertex, \emph{all} uses undirected paths. -This argument is ignored for undirected graphs.} + \dQuote{in} measures the paths \emph{to} a vertex, \dQuote{out} measures paths \emph{from} a vertex, \emph{all} uses undirected paths. + This argument is ignored for undirected graphs.} \item{cutoff}{The maximum path length to consider when calculating the closeness. -If zero or negative then there is no such limit.} + If zero or negative then there is no such limit.} \item{weights}{Optional positive weight vector for calculating weighted closeness. -If the graph has a \code{weight} edge attribute, then this is used by default. -Weights are used for calculating weighted shortest paths, so they are interpreted as distances.} + If the graph has a \code{weight} edge attribute, then this is used by default. + Weights are used for calculating weighted shortest paths, so they are interpreted as distances.} \item{normalized}{Logical, whether to calculate the normalized closeness, i.e. the inverse average distance to all reachable vertices. -The non-normalized closeness is the inverse of the sum of distances to all reachable vertices.} + The non-normalized closeness is the inverse of the sum of distances to all reachable vertices.} } \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/estimate_edge_betweenness.Rd b/man/estimate_edge_betweenness.Rd index 2fddaec4867..c94fbfe68ae 100644 --- a/man/estimate_edge_betweenness.Rd +++ b/man/estimate_edge_betweenness.Rd @@ -16,16 +16,16 @@ estimate_edge_betweenness( \item{graph}{The graph to analyze.} \item{e}{The edges for which the edge betweenness will be calculated. -The default \code{NULL} selects all edges.} + The default \code{NULL} selects all edges.} \item{directed}{Logical, whether directed paths should be considered while determining the shortest paths.} \item{cutoff}{The maximum shortest path length to consider when calculating betweenness. -If negative, then there is no such limit.} + If negative, then there is no such limit.} \item{weights}{Optional positive weight vector for calculating weighted betweenness. -If the graph has a \code{weight} edge attribute, then this is used by default. -Weights are used to calculate weighted shortest paths, so they are interpreted as distances.} + If the graph has a \code{weight} edge attribute, then this is used by default. + Weights are used to calculate weighted shortest paths, so they are interpreted as distances.} } \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/evcent.Rd b/man/evcent.Rd index 7fc0d769b10..89b07c4d492 100644 --- a/man/evcent.Rd +++ b/man/evcent.Rd @@ -16,22 +16,22 @@ evcent( \item{graph}{Graph to be analyzed.} \item{directed}{Logical, whether to consider direction of the edges in directed graphs. -It is ignored for undirected graphs.} + It is ignored for undirected graphs.} \item{scale}{\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} Normalization will always take place.} \item{weights}{A numerical vector or \code{NULL}. -This argument can be used to give edge weights for calculating the weighted eigenvector centrality of vertices. -If this is \code{NULL} and the graph has a \code{weight} edge attribute then that is used. -If \code{weights} is a numerical vector then it is used, even if the graph has a \code{weight} edge attribute. -If this is \code{NA}, then no edge weights are used (even if the graph has a \code{weight} edge attribute). -Note that if there are negative edge weights and the direction of the edges is considered, then the eigenvector might be complex. -In this case only the real part is reported. -This function interprets weights as connection strength. -Higher weights spread the centrality better.} + This argument can be used to give edge weights for calculating the weighted eigenvector centrality of vertices. + If this is \code{NULL} and the graph has a \code{weight} edge attribute then that is used. + If \code{weights} is a numerical vector then it is used, even if the graph has a \code{weight} edge attribute. + If this is \code{NA}, then no edge weights are used (even if the graph has a \code{weight} edge attribute). + Note that if there are negative edge weights and the direction of the edges is considered, then the eigenvector might be complex. + In this case only the real part is reported. + This function interprets weights as connection strength. + Higher weights spread the centrality better.} \item{options}{A named list, to override some ARPACK options. -See \code{\link[=arpack]{arpack()}} for details.} + See \code{\link[=arpack]{arpack()}} for details.} } \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/exportPajek.Rd b/man/exportPajek.Rd index a7344a67ec6..8e4e9f545af 100644 --- a/man/exportPajek.Rd +++ b/man/exportPajek.Rd @@ -8,8 +8,8 @@ exportPajek(blocks, graph, file, project.file = TRUE) } \arguments{ \item{graph}{For \code{cohesive_blocks()} a graph object of class \code{igraph}. -It must be undirected and simple. -(See \code{\link[=is_simple]{is_simple()}}.) + It must be undirected and simple. + (See \code{\link[=is_simple]{is_simple()}}.) For \code{graphs_from_cohesive_blocks()} and \code{export_pajek()} the same graph must be supplied whose cohesive block structure is given in the \code{blocks()} argument.} @@ -17,17 +17,17 @@ For \code{graphs_from_cohesive_blocks()} and \code{export_pajek()} the same grap If the \code{project.file} argument is \code{TRUE}, then it can be a filename (with extension), a file object, or in general any king of connection object. -The file/connection will be opened if it wasn't already. + The file/connection will be opened if it wasn't already. If the \code{project.file} argument is \code{FALSE}, then several files are created and \code{file} must be a character scalar containing the base name of the files, without extension. -(But it can contain the path to the files.) + (But it can contain the path to the files.) See also details below.} \item{project.file}{Logical, whether to create a single Pajek project file containing all the data, or to create separated files for each item. -See details below.} + See details below.} } \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/farthest.nodes.Rd b/man/farthest.nodes.Rd index 59f752f3d7a..252d59bfe09 100644 --- a/man/farthest.nodes.Rd +++ b/man/farthest.nodes.Rd @@ -10,14 +10,14 @@ farthest.nodes(graph, directed = TRUE, unconnected = TRUE, weights = NULL) \item{graph}{The graph to analyze.} \item{directed}{Logical, whether directed or undirected paths are to be considered. -This is ignored for undirected graphs.} + This is ignored for undirected graphs.} \item{unconnected}{Logical, what to do if the graph is unconnected. -If FALSE, the function will return a number that is one larger the largest possible diameter, which is always the number of vertices. -If TRUE, the diameters of the connected components will be calculated and the largest one will be returned.} + If FALSE, the function will return a number that is one larger the largest possible diameter, which is always the number of vertices. + If TRUE, the diameters of the connected components will be calculated and the largest one will be returned.} \item{weights}{Optional positive weight vector for calculating weighted distances. -If the graph has a \code{weight} edge attribute, then this is used by default.} + If the graph has a \code{weight} edge attribute, then this is used by default.} } \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/fastgreedy.community.Rd b/man/fastgreedy.community.Rd index 5461eb1e1cf..87cb2fcf638 100644 --- a/man/fastgreedy.community.Rd +++ b/man/fastgreedy.community.Rd @@ -14,7 +14,7 @@ fastgreedy.community( } \arguments{ \item{graph}{The input graph. -It must be undirected and must not have multi-edges.} + It must be undirected and must not have multi-edges.} \item{merges}{Logical, whether to return the merge matrix.} @@ -24,11 +24,11 @@ It must be undirected and must not have multi-edges.} considering all possible community structures along the merges.} \item{weights}{The weights of the edges. -It must be a positive numeric vector, \code{NULL} or \code{NA}. -If it is \code{NULL} and the input graph has a \sQuote{weight} edge attribute, then that attribute will be used. -If \code{NULL} and no such attribute is present, then the edges will have equal weights. -Set this to \code{NA} if the graph was a \sQuote{weight} edge attribute, but you don't want to use it for community detection. -A larger edge weight means a stronger connection for this function.} + It must be a positive numeric vector, \code{NULL} or \code{NA}. + If it is \code{NULL} and the input graph has a \sQuote{weight} edge attribute, then that attribute will be used. + If \code{NULL} and no such attribute is present, then the edges will have equal weights. + Set this to \code{NA} if the graph was a \sQuote{weight} edge attribute, but you don't want to use it for community detection. + A larger edge weight means a stronger connection for this function.} } \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/feedback_arc_set.Rd b/man/feedback_arc_set.Rd index a552d649419..80cce4877f6 100644 --- a/man/feedback_arc_set.Rd +++ b/man/feedback_arc_set.Rd @@ -17,14 +17,14 @@ feedback_arc_set( \item{...}{These dots are for future extensions and must be empty.} \item{weights}{Potential edge weights. -If the graph has an edge attribute called \sQuote{\code{weight}}, and this argument is \code{NULL}, + If the graph has an edge attribute called \sQuote{\code{weight}}, and this argument is \code{NULL}, then the edge attribute is used automatically. -The goal of the feedback arc set problem is to find a feedback arc set with the smallest total weight.} + The goal of the feedback arc set problem is to find a feedback arc set with the smallest total weight.} \item{algo}{Specifies the algorithm to use. -\dQuote{\code{exact_ip}} solves the feedback arc set problem with an exact integer programming algorithm that guarantees that the total weight of the removed edges is as small as possible. -\dQuote{\code{approx_eades}} uses a fast (linear-time) approximation algorithm from Eades, Lin and Smyth. -\dQuote{\code{exact}} is an alias to \dQuote{\code{exact_ip}} while \dQuote{\code{approx}} is an alias to \dQuote{\code{approx_eades}}.} + \dQuote{\code{exact_ip}} solves the feedback arc set problem with an exact integer programming algorithm that guarantees that the total weight of the removed edges is as small as possible. + \dQuote{\code{approx_eades}} uses a fast (linear-time) approximation algorithm from Eades, Lin and Smyth. + \dQuote{\code{exact}} is an alias to \dQuote{\code{exact_ip}} while \dQuote{\code{approx}} is an alias to \dQuote{\code{approx_eades}}.} } \value{ An edge sequence (by default, but see the \code{return.vs.es} option of \code{\link[=igraph_options]{igraph_options()}}) containing the feedback arc set. @@ -34,8 +34,8 @@ A feedback arc set of a graph is a subset of edges whose removal breaks all cycl } \details{ Feedback arc sets are typically used in directed graphs. -The removal of a feedback arc set of a directed graph ensures that the remaining graph is a directed acyclic graph (DAG). -For undirected graphs, + The removal of a feedback arc set of a directed graph ensures that the remaining graph is a directed acyclic graph (DAG). + For undirected graphs, the removal of a feedback arc set ensures that the remaining graph is a forest (i.e. every connected component is a tree). } \section{Related documentation in the C library}{ diff --git a/man/feedback_vertex_set.Rd b/man/feedback_vertex_set.Rd index 290d47cfbf4..7ba2bd95ff9 100644 --- a/man/feedback_vertex_set.Rd +++ b/man/feedback_vertex_set.Rd @@ -12,12 +12,12 @@ feedback_vertex_set(graph, ..., weights = NULL, algo = c("exact_ip")) \item{...}{These dots are for future extensions and must be empty.} \item{weights}{Potential vertex weights. -If the graph has a vertex attribute called \sQuote{\code{weight}}, and this argument is \code{NULL}, + If the graph has a vertex attribute called \sQuote{\code{weight}}, and this argument is \code{NULL}, then the vertex attribute is used automatically. -The goal of the feedback vertex set problem is to find a feedback vertex set with the smallest total weight.} + The goal of the feedback vertex set problem is to find a feedback vertex set with the smallest total weight.} \item{algo}{Specifies the algorithm to use. -Currently, \dQuote{\code{exact_ip}}, which solves the feedback vertex set problem with an exact integer programming approach, + Currently, \dQuote{\code{exact_ip}}, which solves the feedback vertex set problem with an exact integer programming approach, is the only option.} } \value{ @@ -27,7 +27,7 @@ A vertex sequence (by default, but see the \code{return.vs.es} option of \code{\ \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#experimental}{\figure{lifecycle-experimental.svg}{options: alt='[Experimental]'}}}{\strong{[Experimental]}} A feedback vertex set of a graph is a subset of vertices whose removal breaks all cycles in the graph. -Finding a \emph{minimum} feedback vertex set is an NP-complete problem, both on directed and undirected graphs. + Finding a \emph{minimum} feedback vertex set is an NP-complete problem, both on directed and undirected graphs. } \section{Related documentation in the C library}{ \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_feedback_vertex_set}{\code{feedback_vertex_set()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}} diff --git a/man/find_cycle.Rd b/man/find_cycle.Rd index b025dce7174..48ac645b8b3 100644 --- a/man/find_cycle.Rd +++ b/man/find_cycle.Rd @@ -12,18 +12,18 @@ find_cycle(graph, ..., mode = c("out", "in", "all", "total")) \item{...}{These dots are for future extensions and must be empty.} \item{mode}{Character constant specifying how to handle directed graphs. -\code{out} follows edge directions, \verb{in} follows edges in the reverse direction, and \code{all} ignores edge directions. -Ignored in undirected graphs.} + \code{out} follows edge directions, \verb{in} follows edges in the reverse direction, and \code{all} ignores edge directions. + Ignored in undirected graphs.} } \value{ A list of integer vectors, each integer vector is a path from the source vertex to one of the target vertices. -A path is given by its vertex IDs. + A path is given by its vertex IDs. } \description{ \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#experimental}{\figure{lifecycle-experimental.svg}{options: alt='[Experimental]'}}}{\strong{[Experimental]}} This function returns a cycle of the graph, in terms of both its vertices and edges. -If the graph is acyclic, it returns empty vertex and edge sequences. + If the graph is acyclic, it returns empty vertex and edge sequences. Use \code{\link[=is_acyclic]{is_acyclic()}} to determine if a graph has cycles, without returning a specific cycle. } diff --git a/man/fit_hrg.Rd b/man/fit_hrg.Rd index e500d88a8bc..c9ccd4f172c 100644 --- a/man/fit_hrg.Rd +++ b/man/fit_hrg.Rd @@ -8,34 +8,34 @@ fit_hrg(graph, hrg = NULL, ..., start = FALSE, steps = 0) } \arguments{ \item{graph}{The graph to fit the model to. -Edge directions are ignored in directed graphs.} + Edge directions are ignored in directed graphs.} \item{hrg}{A hierarchical random graph model, in the form of an \code{igraphHRG} object. -\code{fit_hrg()} allows this to be \code{NULL}, in which case a random starting point is used for the fitting.} + \code{fit_hrg()} allows this to be \code{NULL}, in which case a random starting point is used for the fitting.} \item{...}{These dots are for future extensions and must be empty.} \item{start}{Logical, whether to start the fitting/sampling from the supplied \code{igraphHRG} object, or from a random starting point.} \item{steps}{The number of MCMC steps to make. -If this is zero, then the MCMC procedure is performed until convergence.} + If this is zero, then the MCMC procedure is performed until convergence.} } \value{ \code{fit_hrg()} returns an \code{igraphHRG} object. -This is a list with the following members: + This is a list with the following members: \describe{ \item{left}{ Vector that contains the left children of the internal tree vertices. -The first vertex is always the root vertex, + The first vertex is always the root vertex, so the first element of the vector is the left child of the root vertex. -Internal vertices are denoted with negative numbers, + Internal vertices are denoted with negative numbers, starting from -1 and going down, i.e. the root vertex is -1. -Leaf vertices are denoted by non-negative number, starting from zero and up. -} + Leaf vertices are denoted by non-negative number, starting from zero and up. + } \item{right}{ Vector that contains the right children of the vertices, with the same encoding as the \code{left} vector. -} + } \item{prob}{ The connection probabilities attached to the internal vertices, the first number belongs to the root vertex (i.e. internal vertex -1), @@ -43,18 +43,18 @@ the second to internal vertex -2, etc. } \item{edges}{ The number of edges in the subtree below the given internal vertex. -} + } \item{vertices}{ The number of vertices in the subtree below the given internal vertex, including itself. -} + } } } \description{ \code{fit_hrg()} fits a HRG to a given graph. -It takes the specified \code{steps} number of MCMC steps to perform the fitting, + It takes the specified \code{steps} number of MCMC steps to perform the fitting, or a convergence criteria if the specified number of steps is zero. -\code{fit_hrg()} can start from a given HRG, if this is given in the \code{hrg()} argument and the \code{start} argument is \code{TRUE}. -It can be converted to the \code{hclust} class using \code{as.hclust()} provided in this package. + \code{fit_hrg()} can start from a given HRG, if this is given in the \code{hrg()} argument and the \code{start} argument is \code{TRUE}. + It can be converted to the \code{hclust} class using \code{as.hclust()} provided in this package. } \section{Related documentation in the C library}{ \href{https://igraph.org/c/html/0.10.17/igraph-HRG.html#igraph_hrg_fit}{\code{hrg_fit()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}} diff --git a/man/fit_power_law.Rd b/man/fit_power_law.Rd index 50ad9bde343..737f48cc7ab 100644 --- a/man/fit_power_law.Rd +++ b/man/fit_power_law.Rd @@ -17,28 +17,28 @@ fit_power_law( } \arguments{ \item{x}{The data to fit, a numeric vector. -For implementation \sQuote{\code{R.mle}} the data must be integer values. -For the \sQuote{\code{plfit}} implementation non-integer values might be present and then a continuous power-law distribution is fitted.} + For implementation \sQuote{\code{R.mle}} the data must be integer values. + For the \sQuote{\code{plfit}} implementation non-integer values might be present and then a continuous power-law distribution is fitted.} \item{xmin}{Numeric scalar, or \code{NULL}. -The lower bound for fitting the power-law. -If \code{NULL}, the smallest value in \code{x} will be used for the \sQuote{\code{R.mle}} implementation, + The lower bound for fitting the power-law. + If \code{NULL}, the smallest value in \code{x} will be used for the \sQuote{\code{R.mle}} implementation, and its value will be automatically determined for the \sQuote{\code{plfit}} implementation. -This argument makes it possible to fit only the tail of the distribution.} + This argument makes it possible to fit only the tail of the distribution.} \item{start}{Numeric scalar. -The initial value of the exponent for the minimizing function, for the \sQuote{\code{R.mle}} implementation. -Usually it is safe to leave this untouched.} + The initial value of the exponent for the minimizing function, for the \sQuote{\code{R.mle}} implementation. + Usually it is safe to leave this untouched.} \item{force.continuous}{Logical. -Whether to force a continuous distribution for the \sQuote{\code{plfit}} implementation, + Whether to force a continuous distribution for the \sQuote{\code{plfit}} implementation, even if the sample vector contains integer values only (by chance). -If this argument is false, + If this argument is false, igraph will assume a continuous distribution if at least one sample is non-integer and assume a discrete distribution otherwise.} \item{implementation}{Character scalar. -Which implementation to use. -See details below.} + Which implementation to use. + See details below.} \item{p.value}{\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#experimental}{\figure{lifecycle-experimental.svg}{options: alt='[Experimental]'}}}{\strong{[Experimental]}} @@ -47,47 +47,47 @@ Set to \code{TRUE} to compute the p-value with \code{implementation = "plfit"}.} \item{p.precision}{\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#experimental}{\figure{lifecycle-experimental.svg}{options: alt='[Experimental]'}}}{\strong{[Experimental]}} The desired precision of the p-value calculation. -The precision ultimately depends on the number of resampling attempts. -The number of resampling trials is determined by 0.25 divided by the square of the required precision. -For instance, a required precision of 0.01 means that 2500 samples will be drawn.} + The precision ultimately depends on the number of resampling attempts. + The number of resampling trials is determined by 0.25 divided by the square of the required precision. + For instance, a required precision of 0.01 means that 2500 samples will be drawn.} \item{\dots}{Additional arguments, passed to the maximum likelihood optimizing function, \code{\link[stats4:mle]{stats4::mle()}}, if the \sQuote{\code{R.mle}} implementation is chosen. -It is ignored by the \sQuote{\code{plfit}} implementation.} + It is ignored by the \sQuote{\code{plfit}} implementation.} } \value{ Depends on the \code{implementation} argument. -If it is \sQuote{\code{R.mle}}, then an object with class \sQuote{\code{mle}}. -It can be used to calculate confidence intervals and log-likelihood. -See \code{\link[stats4:mle-class]{stats4::mle-class()}} for details. + If it is \sQuote{\code{R.mle}}, then an object with class \sQuote{\code{mle}}. + It can be used to calculate confidence intervals and log-likelihood. + See \code{\link[stats4:mle-class]{stats4::mle-class()}} for details. If \code{implementation} is \sQuote{\code{plfit}}, then the result is a named list with entries: \describe{ \item{continuous}{ Logical, whether the fitted power-law distribution was continuous or discrete. -} + } \item{alpha}{ Numeric scalar, the exponent of the fitted power-law distribution. -} + } \item{xmin}{ Numeric scalar, the minimum value from which the power-law distribution was fitted. -In other words, only the values larger than \code{xmin} were used from the input vector. -} + In other words, only the values larger than \code{xmin} were used from the input vector. + } \item{logLik}{ Numeric scalar, the log-likelihood of the fitted parameters. -} + } \item{KS.stat}{ Numeric scalar, the test statistic of a Kolmogorov-Smirnov test that compares the fitted distribution with the input vector. -Smaller scores denote better fit. -} + Smaller scores denote better fit. + } \item{KS.p}{ Only for \code{p.value = TRUE}. -Numeric scalar, the p-value of the Kolmogorov-Smirnov test. -Small p-values (less than 0.05) indicate that the test rejected the hypothesis + Numeric scalar, the p-value of the Kolmogorov-Smirnov test. + Small p-values (less than 0.05) indicate that the test rejected the hypothesis that the original data could have been drawn from the fitted power-law distribution. -} + } } } \description{ @@ -95,30 +95,30 @@ that the original data could have been drawn from the fitted power-law distribut } \details{ This function fits a power-law distribution to a vector containing samples from a distribution (that is assumed to follow a power-law of course). -In a power-law distribution, it is generally assumed that \eqn{P(X=x)} is proportional to \eqn{x^{-\alpha}}{x^-alpha}, + In a power-law distribution, it is generally assumed that \eqn{P(X=x)} is proportional to \eqn{x^{-\alpha}}{x^-alpha}, where \eqn{x} is a positive number and \eqn{\alpha}{alpha} is greater than 1. In many real-world cases, the power-law behaviour kicks in only above a threshold value \eqn{x_\text{min}}{xmin}. -The goal of this function is to determine \eqn{\alpha}{alpha} if \eqn{x_\text{min}}{xmin} is given, + The goal of this function is to determine \eqn{\alpha}{alpha} if \eqn{x_\text{min}}{xmin} is given, or to determine \eqn{x_\text{min}}{xmin} and the corresponding value of \eqn{\alpha}{alpha}. \code{fit_power_law()} provides two maximum likelihood implementations. -If the \code{implementation} argument is \sQuote{\code{R.mle}}, + If the \code{implementation} argument is \sQuote{\code{R.mle}}, then the BFGS optimization (see \code{\link[stats4:mle]{stats4::mle()}}) algorithm is applied. -The additional arguments are passed to the mle function, + The additional arguments are passed to the mle function, so it is possible to change the optimization method and/or its parameters. -This implementation can \emph{not} to fit the \eqn{x_\text{min}}{xmin} argument, + This implementation can \emph{not} to fit the \eqn{x_\text{min}}{xmin} argument, so use the \sQuote{\code{plfit}} implementation if you want to do that. The \sQuote{\code{plfit}} implementation also uses the maximum likelihood principle to determine \eqn{\alpha}{alpha} for a given \eqn{x_\text{min}}{xmin}; When \eqn{x_\text{min}}{xmin} is not given in advance, the algorithm will attempt to find its optimal value for which the \eqn{p}-value of a Kolmogorov-Smirnov test between the fitted distribution and the original sample is the largest. -The function uses the method of Clauset, Shalizi and Newman to calculate the parameters of the fitted distribution. -See references below for the details. + The function uses the method of Clauset, Shalizi and Newman to calculate the parameters of the fitted distribution. + See references below for the details. \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#experimental}{\figure{lifecycle-experimental.svg}{options: alt='[Experimental]'}}}{\strong{[Experimental]}} Pass \code{p.value = TRUE} to include the p-value in the output. -This is not returned by default because the computation may be slow. + This is not returned by default because the computation may be slow. } \examples{ diff --git a/man/forest.fire.game.Rd b/man/forest.fire.game.Rd index 108cf736b07..aa57e837963 100644 --- a/man/forest.fire.game.Rd +++ b/man/forest.fire.game.Rd @@ -12,7 +12,7 @@ forest.fire.game(nodes, fw.prob, bw.factor = 1, ambs = 1, directed = TRUE) \item{fw.prob}{The forward burning probability, see details below.} \item{bw.factor}{The backward burning ratio. -The backward burning probability is calculated as \code{bw.factor*fw.prob}.} + The backward burning probability is calculated as \code{bw.factor*fw.prob}.} \item{ambs}{The number of ambassador vertices.} diff --git a/man/get.adjacency.Rd b/man/get.adjacency.Rd index 7915723d8a2..ddc660af9e2 100644 --- a/man/get.adjacency.Rd +++ b/man/get.adjacency.Rd @@ -17,23 +17,23 @@ get.adjacency( \item{graph}{The graph to convert.} \item{type}{Gives how to create the adjacency matrix for undirected graphs. -It is ignored for directed graphs. -Possible values: \code{upper}: the upper right triangle of the matrix is used, \code{lower}: the lower left triangle of the matrix is used. -\code{both}: the whole matrix is used, a symmetric matrix is returned.} + It is ignored for directed graphs. + Possible values: \code{upper}: the upper right triangle of the matrix is used, \code{lower}: the lower left triangle of the matrix is used. + \code{both}: the whole matrix is used, a symmetric matrix is returned.} \item{attr}{\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} Use \code{weights} instead. -A character edge attribute name is forwarded to \code{weights} unchanged; \code{NULL} becomes \code{weights = NA}, + A character edge attribute name is forwarded to \code{weights} unchanged; \code{NULL} becomes \code{weights = NA}, since \code{attr = NULL} asked for a traditional unweighted matrix while \code{weights = NULL} picks the \code{weight} attribute up.} \item{edges}{\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} Logical, whether to return the edge IDs in the matrix. -For non-existant edges zero is returned.} + For non-existant edges zero is returned.} \item{names}{Logical, whether to assign row and column names to the matrix. -These are only assigned if the \code{name} vertex attribute is present in the graph.} + These are only assigned if the \code{name} vertex attribute is present in the graph.} \item{sparse}{Logical, whether to create a sparse matrix. -The \sQuote{\code{Matrix}} package must be installed for creating sparse matrices. -The default \code{NULL} uses the \code{sparsematrices} igraph option.} + The \sQuote{\code{Matrix}} package must be installed for creating sparse matrices. + The default \code{NULL} uses the \code{sparsematrices} igraph option.} } \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/get.adjedgelist.Rd b/man/get.adjedgelist.Rd index 1f3d81a6dd5..3a7714ea744 100644 --- a/man/get.adjedgelist.Rd +++ b/man/get.adjedgelist.Rd @@ -14,12 +14,12 @@ get.adjedgelist( \item{graph}{The input graph.} \item{mode}{Character scalar, it gives what kind of adjacent edges/vertices to include in the lists. -\sQuote{\code{out}} is for outgoing edges/vertices, \sQuote{\verb{in}} is for incoming edges/vertices, \sQuote{\code{all}} is for both. -This argument is ignored for undirected graphs.} + \sQuote{\code{out}} is for outgoing edges/vertices, \sQuote{\verb{in}} is for incoming edges/vertices, \sQuote{\code{all}} is for both. + This argument is ignored for undirected graphs.} \item{loops}{Character scalar, one of \code{"ignore"} (to omit loops), \code{"twice"} (to include loop edges twice) and \code{"once"} (to include them once). -\code{"twice"} is not allowed for directed graphs and will be replaced with \code{"once"}.} + \code{"twice"} is not allowed for directed graphs and will be replaced with \code{"once"}.} } \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/get.adjlist.Rd b/man/get.adjlist.Rd index e2cc514f521..65404adb4c1 100644 --- a/man/get.adjlist.Rd +++ b/man/get.adjlist.Rd @@ -15,12 +15,12 @@ get.adjlist( \item{graph}{The input graph.} \item{mode}{Character scalar, it gives what kind of adjacent edges/vertices to include in the lists. -\sQuote{\code{out}} is for outgoing edges/vertices, \sQuote{\verb{in}} is for incoming edges/vertices, \sQuote{\code{all}} is for both. -This argument is ignored for undirected graphs.} + \sQuote{\code{out}} is for outgoing edges/vertices, \sQuote{\verb{in}} is for incoming edges/vertices, \sQuote{\code{all}} is for both. + This argument is ignored for undirected graphs.} \item{loops}{Character scalar, one of \code{"ignore"} (to omit loops), \code{"twice"} (to include loop edges twice) and \code{"once"} (to include them once). -\code{"twice"} is not allowed for directed graphs and will be replaced with \code{"once"}.} + \code{"twice"} is not allowed for directed graphs and will be replaced with \code{"once"}.} \item{multiple}{Logical, set to \code{FALSE} to use only one representative of each set of parallel edges.} } diff --git a/man/get.all.shortest.paths.Rd b/man/get.all.shortest.paths.Rd index 2a83d4160b6..de061979d0c 100644 --- a/man/get.all.shortest.paths.Rd +++ b/man/get.all.shortest.paths.Rd @@ -16,23 +16,23 @@ get.all.shortest.paths( \item{graph}{The graph to work on.} \item{from}{Numeric constant, the vertex from or to the shortest paths will be calculated. -Note that right now this is not a vector of vertex IDs, but only a single vertex.} + Note that right now this is not a vector of vertex IDs, but only a single vertex.} \item{to}{Numeric vector, the vertices to which the shortest paths will be calculated. -The default \code{NULL} includes all vertices. -Note that for \code{distances()} every vertex must be included here at most once. -(This is not required for \code{shortest_paths()}.} + The default \code{NULL} includes all vertices. + Note that for \code{distances()} every vertex must be included here at most once. + (This is not required for \code{shortest_paths()}.} \item{mode}{Character constant, gives whether the shortest paths to or from the given vertices should be calculated for directed graphs. -If \code{out} then the shortest paths \emph{from} the vertex, if \verb{in} then \emph{to} it will be considered. -If \code{all}, the default, then the graph is treated as undirected, i.e. edge directions are not taken into account. -This argument is ignored for undirected graphs.} + If \code{out} then the shortest paths \emph{from} the vertex, if \verb{in} then \emph{to} it will be considered. + If \code{all}, the default, then the graph is treated as undirected, i.e. edge directions are not taken into account. + This argument is ignored for undirected graphs.} \item{weights}{Possibly a numeric vector giving edge weights. -If this is \code{NULL} and the graph has a \code{weight} edge attribute, then the attribute is used. -If this is \code{NA} then no weights are used (even if the graph has a \code{weight} attribute). -In a weighted graph, the length of a path is the sum of the weights of its constituent edges.} + If this is \code{NULL} and the graph has a \code{weight} edge attribute, then the attribute is used. + If this is \code{NA} then no weights are used (even if the graph has a \code{weight} attribute). + In a weighted graph, the length of a path is the sum of the weights of its constituent edges.} } \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/get.data.frame.Rd b/man/get.data.frame.Rd index b8ef45f46d4..38201f1574a 100644 --- a/man/get.data.frame.Rd +++ b/man/get.data.frame.Rd @@ -10,7 +10,7 @@ get.data.frame(x, what = c("edges", "vertices", "both")) \item{x}{An igraph object.} \item{what}{Character constant, whether to return info about vertices, edges, or both. -The default is \sQuote{edges}.} + The default is \sQuote{edges}.} } \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/get.diameter.Rd b/man/get.diameter.Rd index 5b990fedfb3..ecefd98eb6f 100644 --- a/man/get.diameter.Rd +++ b/man/get.diameter.Rd @@ -10,14 +10,14 @@ get.diameter(graph, directed = TRUE, unconnected = TRUE, weights = NULL) \item{graph}{The graph to analyze.} \item{directed}{Logical, whether directed or undirected paths are to be considered. -This is ignored for undirected graphs.} + This is ignored for undirected graphs.} \item{unconnected}{Logical, what to do if the graph is unconnected. -If FALSE, the function will return a number that is one larger the largest possible diameter, which is always the number of vertices. -If TRUE, the diameters of the connected components will be calculated and the largest one will be returned.} + If FALSE, the function will return a number that is one larger the largest possible diameter, which is always the number of vertices. + If TRUE, the diameters of the connected components will be calculated and the largest one will be returned.} \item{weights}{Optional positive weight vector for calculating weighted distances. -If the graph has a \code{weight} edge attribute, then this is used by default.} + If the graph has a \code{weight} edge attribute, then this is used by default.} } \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/get.edge.attribute.Rd b/man/get.edge.attribute.Rd index d1db8167234..a043244c6e7 100644 --- a/man/get.edge.attribute.Rd +++ b/man/get.edge.attribute.Rd @@ -10,10 +10,10 @@ get.edge.attribute(graph, name, index = E(graph)) \item{graph}{The graph} \item{name}{The name of the attribute to query. -If missing, then all edge attributes are returned in a list.} + If missing, then all edge attributes are returned in a list.} \item{index}{An optional edge sequence to query edge attributes for a subset of edges. -The default \code{NULL} selects all edges.} + The default \code{NULL} selects all edges.} } \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/get.edge.ids.Rd b/man/get.edge.ids.Rd index 7a7f74a76e9..016e017e440 100644 --- a/man/get.edge.ids.Rd +++ b/man/get.edge.ids.Rd @@ -10,14 +10,14 @@ get.edge.ids(graph, vp, directed = TRUE, error = FALSE, multi = deprecated()) \item{graph}{The input graph.} \item{vp}{The incident vertices, given as a two-column data frame, two-column matrix, or vector of vertex IDs or symbolic vertex names. -For a vector, the values are interpreted pairwise, i.e. the first and second are used for the first edge, + For a vector, the values are interpreted pairwise, i.e. the first and second are used for the first edge, the third and fourth for the second, etc.} \item{directed}{Logical, whether to consider edge directions in directed graphs. -This argument is ignored for undirected graphs.} + This argument is ignored for undirected graphs.} \item{error}{Logical, whether to report an error if an edge is not found in the graph. -If \code{FALSE}, then no error is reported, and zero is returned for the non-existant edge(s).} + If \code{FALSE}, then no error is reported, and zero is returned for the non-existant edge(s).} \item{multi}{\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/get.graph.attribute.Rd b/man/get.graph.attribute.Rd index 8c7c431e4c0..aaed9b0dbd0 100644 --- a/man/get.graph.attribute.Rd +++ b/man/get.graph.attribute.Rd @@ -10,7 +10,7 @@ get.graph.attribute(graph, name) \item{graph}{Input graph.} \item{name}{The name of attribute to query. -If missing, then all attributes are returned in a list.} + If missing, then all attributes are returned in a list.} } \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/get.incidence.Rd b/man/get.incidence.Rd index 985d4081b2b..8c401aa4775 100644 --- a/man/get.incidence.Rd +++ b/man/get.incidence.Rd @@ -8,18 +8,18 @@ get.incidence(graph, types = NULL, attr = NULL, names = TRUE, sparse = FALSE) } \arguments{ \item{graph}{The input graph. -The direction of the edges is ignored in directed graphs.} + The direction of the edges is ignored in directed graphs.} \item{types}{An optional vertex type vector to use instead of the \code{type} vertex attribute. -You must supply this argument if the graph has no \code{type} vertex attribute.} + You must supply this argument if the graph has no \code{type} vertex attribute.} \item{attr}{\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} Use \code{weights} instead. -A character edge attribute name is forwarded to \code{weights} unchanged; \code{NULL} becomes \code{weights = NA}, + A character edge attribute name is forwarded to \code{weights} unchanged; \code{NULL} becomes \code{weights = NA}, since \code{attr = NULL} asked for a traditional unweighted matrix while \code{weights = NULL} picks the \code{weight} attribute up.} \item{names}{Logical, if \code{TRUE} and the vertices in the graph are named (i.e. the graph has a vertex attribute called \code{name}), then vertex names will be added to the result as row and column names. -Otherwise the IDs of the vertices are used as row and column names.} + Otherwise the IDs of the vertices are used as row and column names.} \item{sparse}{Logical, if it is \code{TRUE} then a sparse matrix is created, you will need the \code{Matrix} package for this.} } diff --git a/man/get.shortest.paths.Rd b/man/get.shortest.paths.Rd index 98264feb219..224c44de9a5 100644 --- a/man/get.shortest.paths.Rd +++ b/man/get.shortest.paths.Rd @@ -20,48 +20,48 @@ get.shortest.paths( \item{graph}{The graph to work on.} \item{from}{Numeric constant, the vertex from or to the shortest paths will be calculated. -Note that right now this is not a vector of vertex IDs, but only a single vertex.} + Note that right now this is not a vector of vertex IDs, but only a single vertex.} \item{to}{Numeric vector, the vertices to which the shortest paths will be calculated. -The default \code{NULL} includes all vertices. -Note that for \code{distances()} every vertex must be included here at most once. -(This is not required for \code{shortest_paths()}.} + The default \code{NULL} includes all vertices. + Note that for \code{distances()} every vertex must be included here at most once. + (This is not required for \code{shortest_paths()}.} \item{mode}{Character constant, gives whether the shortest paths to or from the given vertices should be calculated for directed graphs. -If \code{out} then the shortest paths \emph{from} the vertex, if \verb{in} then \emph{to} it will be considered. -If \code{all}, the default, then the graph is treated as undirected, i.e. edge directions are not taken into account. -This argument is ignored for undirected graphs.} + If \code{out} then the shortest paths \emph{from} the vertex, if \verb{in} then \emph{to} it will be considered. + If \code{all}, the default, then the graph is treated as undirected, i.e. edge directions are not taken into account. + This argument is ignored for undirected graphs.} \item{weights}{Possibly a numeric vector giving edge weights. -If this is \code{NULL} and the graph has a \code{weight} edge attribute, then the attribute is used. -If this is \code{NA} then no weights are used (even if the graph has a \code{weight} attribute). -In a weighted graph, the length of a path is the sum of the weights of its constituent edges.} + If this is \code{NULL} and the graph has a \code{weight} edge attribute, then the attribute is used. + If this is \code{NA} then no weights are used (even if the graph has a \code{weight} attribute). + In a weighted graph, the length of a path is the sum of the weights of its constituent edges.} \item{output}{Character scalar, defines how to report the shortest paths. -\dQuote{vpath} means that the vertices along the paths are reported, + \dQuote{vpath} means that the vertices along the paths are reported, this form was used prior to igraph version 0.6. \dQuote{epath} means that the edges along the paths are reported. -\dQuote{both} means that both forms are returned, in a named list with components \dQuote{vpath} and \dQuote{epath}.} + \dQuote{both} means that both forms are returned, in a named list with components \dQuote{vpath} and \dQuote{epath}.} \item{predecessors}{Logical, whether to return the predecessor vertex for each vertex. -The predecessor of vertex \code{i} in the tree is the vertex from which vertex \code{i} was reached. -The predecessor of the start vertex (in the \code{from} argument) is itself by definition. -If the predecessor is zero, it means that the given vertex was not reached from the source during the search. -Note that the search terminates if all the vertices in \code{to} are reached.} + The predecessor of vertex \code{i} in the tree is the vertex from which vertex \code{i} was reached. + The predecessor of the start vertex (in the \code{from} argument) is itself by definition. + If the predecessor is zero, it means that the given vertex was not reached from the source during the search. + Note that the search terminates if all the vertices in \code{to} are reached.} \item{inbound.edges}{Logical, whether to return the inbound edge for each vertex. -The inbound edge of vertex \code{i} in the tree is the edge via which vertex \code{i} was reached. -The start vertex and vertices that were not reached during the search will have zero in the corresponding entry of the vector. -Note that the search terminates if all the vertices in \code{to} are reached.} + The inbound edge of vertex \code{i} in the tree is the edge via which vertex \code{i} was reached. + The start vertex and vertices that were not reached during the search will have zero in the corresponding entry of the vector. + Note that the search terminates if all the vertices in \code{to} are reached.} \item{algorithm}{Which algorithm to use for the calculation. -By default igraph tries to select the fastest suitable algorithm. -If there are no weights, then an unweighted breadth-first search is used, otherwise if all weights are positive, + By default igraph tries to select the fastest suitable algorithm. + If there are no weights, then an unweighted breadth-first search is used, otherwise if all weights are positive, then Dijkstra's algorithm is used. -If there are negative weights and we do the calculation for more than 100 sources, then Johnson's algorithm is used. -Otherwise the Bellman-Ford algorithm is used. -You can override igraph's choice by explicitly giving this parameter. -Note that the igraph C core might still override your choice in obvious cases, i.e. if there are no edge weights, + If there are negative weights and we do the calculation for more than 100 sources, then Johnson's algorithm is used. + Otherwise the Bellman-Ford algorithm is used. + You can override igraph's choice by explicitly giving this parameter. + Note that the igraph C core might still override your choice in obvious cases, i.e. if there are no edge weights, then the unweighted algorithm will be used, regardless of this argument.} } \description{ diff --git a/man/get.stochastic.Rd b/man/get.stochastic.Rd index 431963df8bc..370f8a35ebf 100644 --- a/man/get.stochastic.Rd +++ b/man/get.stochastic.Rd @@ -12,13 +12,13 @@ get.stochastic( } \arguments{ \item{graph}{The input graph. -Must be of class \code{igraph}.} + Must be of class \code{igraph}.} \item{column.wise}{If \code{FALSE}, then the rows of the stochastic matrix sum up to one; otherwise it is the columns.} \item{sparse}{Logical, whether to return a sparse matrix. -The \code{Matrix} package is needed for sparse matrices. -The default \code{NULL} uses the \code{sparsematrices} igraph option.} + The \code{Matrix} package is needed for sparse matrices. + The default \code{NULL} uses the \code{sparsematrices} igraph option.} } \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/get.vertex.attribute.Rd b/man/get.vertex.attribute.Rd index 7c283097aaa..e98468aebf7 100644 --- a/man/get.vertex.attribute.Rd +++ b/man/get.vertex.attribute.Rd @@ -10,10 +10,10 @@ get.vertex.attribute(graph, name, index = V(graph)) \item{graph}{The graph.} \item{name}{Name of the attribute to query. -If missing, then all vertex attributes are returned in a list.} + If missing, then all vertex attributes are returned in a list.} \item{index}{An optional vertex sequence to query the attribute only for these vertices. -The default \code{NULL} selects all vertices.} + The default \code{NULL} selects all vertices.} } \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/getIgraphOpt.Rd b/man/getIgraphOpt.Rd index 88dbc3c9bad..58697845542 100644 --- a/man/getIgraphOpt.Rd +++ b/man/getIgraphOpt.Rd @@ -10,7 +10,7 @@ getIgraphOpt(x, default = NULL) \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.} + This facilitates retrieving an option and checking whether it is set and setting it separately if not.} } \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/get_edge_ids.Rd b/man/get_edge_ids.Rd index 03e8e004868..cda2a4585dc 100644 --- a/man/get_edge_ids.Rd +++ b/man/get_edge_ids.Rd @@ -10,29 +10,29 @@ get_edge_ids(graph, vp, ..., directed = TRUE, error = FALSE) \item{graph}{The input graph.} \item{vp}{The incident vertices, given as a two-column data frame, two-column matrix, or vector of vertex IDs or symbolic vertex names. -For a vector, the values are interpreted pairwise, i.e. the first and second are used for the first edge, + For a vector, the values are interpreted pairwise, i.e. the first and second are used for the first edge, the third and fourth for the second, etc.} \item{...}{These dots are for future extensions and must be empty.} \item{directed}{Logical, whether to consider edge directions in directed graphs. -This argument is ignored for undirected graphs.} + This argument is ignored for undirected graphs.} \item{error}{Logical, whether to report an error if an edge is not found in the graph. -If \code{FALSE}, then no error is reported, and zero is returned for the non-existant edge(s).} + If \code{FALSE}, then no error is reported, and zero is returned for the non-existant edge(s).} } \value{ A numeric vector of edge IDs, one for each pair of input vertices. -If there is no edge in the input graph for a given pair of vertices, then zero is reported. -(If the \code{error} argument is \code{FALSE}.) + If there is no edge in the input graph for a given pair of vertices, then zero is reported. + (If the \code{error} argument is \code{FALSE}.) } \description{ Find the edges in an igraph graph that have the specified end points. -This function handles multi-graph (graphs with multiple edges) and can consider or ignore the edge directions in directed graphs. + This function handles multi-graph (graphs with multiple edges) and can consider or ignore the edge directions in directed graphs. } \details{ igraph vertex IDs are natural numbers, starting from one, up to the number of vertices in the graph. -Similarly, edges are also numbered from one, up to the number of edges. + Similarly, edges are also numbered from one, up to the number of edges. This function allows finding the edges of the graph, via their incident vertices. } diff --git a/man/girth.Rd b/man/girth.Rd index cd4bd53a7c4..64ff723d61f 100644 --- a/man/girth.Rd +++ b/man/girth.Rd @@ -8,7 +8,7 @@ girth(graph, ..., circle = TRUE) } \arguments{ \item{graph}{The input graph. -It may be directed, but the algorithm searches for undirected circles anyway.} + It may be directed, but the algorithm searches for undirected circles anyway.} \item{...}{These dots are for future extensions and must be empty.} @@ -19,10 +19,10 @@ A named list with two components: \describe{ \item{girth}{ Integer constant, the girth of the graph, or \code{Inf} if the graph is acyclic. -} + } \item{circle}{ Numeric vector with the vertex IDs in the shortest circle. -} + } } } \description{ @@ -30,8 +30,8 @@ The girth of a graph is the length of the shortest circle in it. } \details{ The current implementation works for undirected graphs only, directed graphs are treated as undirected graphs. -Loop edges and multiple edges are ignored. -If the graph is a forest (i.e. acyclic), then \code{Inf} is returned. + Loop edges and multiple edges are ignored. + If the graph is a forest (i.e. acyclic), then \code{Inf} is returned. This implementation is based on Alon Itai and Michael Rodeh: Finding a minimum circuit in a graph \emph{Proceedings of the ninth annual ACM symposium on Theory of computing}, diff --git a/man/global_efficiency.Rd b/man/global_efficiency.Rd index fbb064d7a10..84b7b714211 100644 --- a/man/global_efficiency.Rd +++ b/man/global_efficiency.Rd @@ -31,27 +31,27 @@ average_local_efficiency( \item{...}{These dots are for future extensions and must be empty.} \item{weights}{The edge weights. -All edge weights must be non-negative; additionally, no edge weight may be NaN. -If it is \code{NULL} (the default) and the graph has a \code{weight} edge attribute, then it is used automatically.} + All edge weights must be non-negative; additionally, no edge weight may be NaN. + If it is \code{NULL} (the default) and the graph has a \code{weight} edge attribute, then it is used automatically.} \item{directed}{Logical, whether to consider directed paths. -Ignored for undirected graphs.} + Ignored for undirected graphs.} \item{vids}{The vertex IDs of the vertices for which the calculation will be done. -Applies to the local efficiency calculation only. -The default \code{NULL} selects all vertices.} + Applies to the local efficiency calculation only. + The default \code{NULL} selects all vertices.} \item{mode}{Specifies how to define the local neighborhood of a vertex in directed graphs. -\dQuote{out} considers out-neighbors only, \dQuote{in} considers in-neighbors only, \dQuote{all} considers both.} + \dQuote{out} considers out-neighbors only, \dQuote{in} considers in-neighbors only, \dQuote{all} considers both.} } \value{ For \code{global_efficiency()}, the global efficiency of the graph as a single number. -For \code{average_local_efficiency()}, the average local efficiency of the graph as a single number. -For \code{local_efficiency()}, the local efficiency of each vertex in a vector. + For \code{average_local_efficiency()}, the average local efficiency of the graph as a single number. + For \code{local_efficiency()}, the local efficiency of each vertex in a vector. } \description{ These functions calculate the global or average local efficiency of a network, or the local efficiency of every vertex in the network. -See below for definitions. + See below for definitions. } \section{Global efficiency}{ @@ -66,7 +66,7 @@ E_g = 1/(n*(n-1)) sum_{i!=j} 1/d_ij} where \eqn{n}{n} is the number of vertices. The inverse distance between pairs that are not reachable from each other is considered to be zero. -For graphs with fewer than 2 vertices, NaN is returned. + For graphs with fewer than 2 vertices, NaN is returned. } \section{Local efficiency}{ @@ -74,10 +74,10 @@ For graphs with fewer than 2 vertices, NaN is returned. The local efficiency of a network around a vertex is defined as follows: We remove the vertex and compute the distances (shortest path lengths) between its neighbours through the rest of the network. -The local efficiency around the removed vertex is the average of the inverse of these distances. + The local efficiency around the removed vertex is the average of the inverse of these distances. The inverse distance between two vertices which are not reachable from each other is considered to be zero. -The local efficiency around a vertex with fewer than two neighbours is taken to be zero by convention. + The local efficiency around a vertex with fewer than two neighbours is taken to be zero by convention. } \section{Average local efficiency}{ diff --git a/man/graph.Rd b/man/graph.Rd index c74c5199289..25b5c2b41b1 100644 --- a/man/graph.Rd +++ b/man/graph.Rd @@ -17,32 +17,32 @@ graph( \arguments{ \item{edges}{A vector defining the edges, the first edge points from the first element to the second, the second edge from the third to the fourth, etc. For a numeric vector, these are interpreted as internal vertex IDs. -For character vectors, they are interpreted as vertex names. + For character vectors, they are interpreted as vertex names. Alternatively, this can be a character scalar, the name of a notable graph. -See Notable graphs below. -The name is case insensitive. + See Notable graphs below. + The name is case insensitive. Starting from igraph 0.8.0, you can also include literals here, via igraph's formula notation (see \code{\link[=graph_from_literal]{graph_from_literal()}}). -In this case, the first term of the formula has to start with a \sQuote{\code{~}} character, just like regular formulae in R. + In this case, the first term of the formula has to start with a \sQuote{\code{~}} character, just like regular formulae in R. See examples below.} \item{...}{For \code{make_graph()}: extra arguments for the case when the graph is given via a literal, see \code{\link[=graph_from_literal]{graph_from_literal()}}. -For \code{directed_graph()} and \code{undirected_graph()}: Passed to \code{make_directed_graph()} or \code{make_undirected_graph()}.} + For \code{directed_graph()} and \code{undirected_graph()}: Passed to \code{make_directed_graph()} or \code{make_undirected_graph()}.} \item{n}{The number of vertices in the graph. -This argument is ignored (with a warning) if \code{edges} are symbolic vertex names. -It is also ignored if there is a bigger vertex ID in \code{edges}. -This means that for this function it is safe to supply zero here if the vertex with the largest ID is not an isolate. -The default \code{NULL} uses the largest vertex ID in \code{edges}.} + This argument is ignored (with a warning) if \code{edges} are symbolic vertex names. + It is also ignored if there is a bigger vertex ID in \code{edges}. + This means that for this function it is safe to supply zero here if the vertex with the largest ID is not an isolate. + The default \code{NULL} uses the largest vertex ID in \code{edges}.} \item{isolates}{Character vector, names of isolate vertices, for symbolic edge lists. -It is ignored for numeric edge lists.} + It is ignored for numeric edge lists.} \item{directed}{Whether to create a directed graph.} \item{dir}{It is the same as \code{directed}, for compatibility. -Do not give both of them.} + Do not give both of them.} \item{simplify}{For graph literals, whether to simplify the graph.} } diff --git a/man/graph.adhesion.Rd b/man/graph.adhesion.Rd index afd2db5d861..f08faded56e 100644 --- a/man/graph.adhesion.Rd +++ b/man/graph.adhesion.Rd @@ -10,11 +10,11 @@ graph.adhesion(graph, checks = TRUE) \item{graph}{The input graph.} \item{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 degree is one then the edge connectivity is also one. -It is a good idea to perform these checks, as they can be done quickly compared to the connectivity calculation itself. -They were suggested by Peter McMahan, thanks Peter.} + 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 degree is one then the edge connectivity is also one. + It is a good idea to perform these checks, as they can be done quickly compared to the connectivity calculation itself. + They were suggested by Peter McMahan, thanks Peter.} } \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/graph.adjacency.Rd b/man/graph.adjacency.Rd index ebb3e924b06..8b55e6fefeb 100644 --- a/man/graph.adjacency.Rd +++ b/man/graph.adjacency.Rd @@ -15,31 +15,31 @@ graph.adjacency( } \arguments{ \item{adjmatrix}{A square adjacency matrix. -From igraph version 0.5.1 this can be a sparse matrix created with the \code{Matrix} package.} + From igraph version 0.5.1 this can be a sparse matrix created with the \code{Matrix} package.} \item{mode}{Character scalar, specifies how igraph should interpret the supplied matrix. -See also the \code{weighted} argument, the interpretation depends on that too. -Possible values are: \code{directed}, \code{undirected}, \code{upper}, \code{lower}, \code{max}, \code{min}, \code{plus}. -See details below.} + See also the \code{weighted} argument, the interpretation depends on that too. + Possible values are: \code{directed}, \code{undirected}, \code{upper}, \code{lower}, \code{max}, \code{min}, \code{plus}. + See details below.} \item{weighted}{This argument specifies whether to create a weighted graph from an adjacency matrix. -If it is \code{NULL} then an unweighted graph is created and the elements of the adjacency matrix gives the number of edges between the vertices. -If it is a character constant then for every non-zero matrix entry an edge is created and the value of the entry is added as an edge attribute named by the \code{weighted} argument. -If it is \code{TRUE} then a weighted graph is created and the name of the edge attribute will be \code{weight}. -See also details below.} + If it is \code{NULL} then an unweighted graph is created and the elements of the adjacency matrix gives the number of edges between the vertices. + If it is a character constant then for every non-zero matrix entry an edge is created and the value of the entry is added as an edge attribute named by the \code{weighted} argument. + If it is \code{TRUE} then a weighted graph is created and the name of the edge attribute will be \code{weight}. + See also details below.} \item{diag}{Logical, whether to include the diagonal of the matrix in the calculation. -If this is \code{FALSE} then the diagonal is zerod out first.} + If this is \code{FALSE} then the diagonal is zerod out first.} \item{add.colnames}{Character scalar, whether to add the column names as vertex attributes. -If it is \code{NULL} (the default) then, if present, column names are added as vertex attribute \sQuote{name}. -If \code{NA} or \code{FALSE} then they will not be added. -If a character constant, then it gives the name of the vertex attribute to add.} + If it is \code{NULL} (the default) then, if present, column names are added as vertex attribute \sQuote{name}. + If \code{NA} or \code{FALSE} then they will not be added. + If a character constant, then it gives the name of the vertex attribute to add.} \item{add.rownames}{Character scalar, whether to add the row names as vertex attributes. -Possible values the same as the previous argument. -By default row names are not added. -If \sQuote{\code{add.rownames}} and \sQuote{\code{add.colnames}} specify the same vertex attribute, then the former is ignored.} + Possible values the same as the previous argument. + By default row names are not added. + If \sQuote{\code{add.rownames}} and \sQuote{\code{add.colnames}} specify the same vertex attribute, then the former is ignored.} } \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/graph.adjlist.Rd b/man/graph.adjlist.Rd index 69bb7d36078..72e3f2b7b58 100644 --- a/man/graph.adjlist.Rd +++ b/man/graph.adjlist.Rd @@ -8,15 +8,15 @@ graph.adjlist(adjlist, mode = c("out", "in", "all", "total"), duplicate = TRUE) } \arguments{ \item{adjlist}{The adjacency list. -It should be consistent, + It should be consistent, i.e. the maximum throughout all vectors in the list must be less than the number of vectors (=the number of vertices in the graph).} \item{mode}{Character scalar, it specifies whether the graph to create is undirected (\sQuote{all} or \sQuote{total}) or directed; and in the latter case, whether it contains the outgoing (\sQuote{out}) or the incoming (\sQuote{in}) neighbors of the vertices.} \item{duplicate}{Logical. -For undirected graphs it gives whether edges are included in the list twice. -E.g. if it is \code{TRUE} then for an undirected \code{{A,B}} edge \code{graph_from_adj_list()} expects \code{A} included in the neighbors of \code{B} and \code{B} to be included in the neighbors of \code{A}. + For undirected graphs it gives whether edges are included in the list twice. + E.g. if it is \code{TRUE} then for an undirected \code{{A,B}} edge \code{graph_from_adj_list()} expects \code{A} included in the neighbors of \code{B} and \code{B} to be included in the neighbors of \code{A}. This argument is ignored if \code{mode} is \code{out} or \verb{in}.} } diff --git a/man/graph.automorphisms.Rd b/man/graph.automorphisms.Rd index c988fd6d2b7..b3a59e30298 100644 --- a/man/graph.automorphisms.Rd +++ b/man/graph.automorphisms.Rd @@ -15,12 +15,12 @@ graph.automorphisms( \item{colors}{The colors of the individual vertices of the graph; only vertices having the same color are allowed to match each other in an automorphism. -When omitted, igraph uses the \code{color} attribute of the vertices, or, if there is no such vertex attribute, + When omitted, igraph uses the \code{color} attribute of the vertices, or, if there is no such vertex attribute, it simply assumes that all vertices have the same color. -Pass NULL explicitly if the graph has a \code{color} vertex attribute but you do not want to use it.} + Pass NULL explicitly if the graph has a \code{color} vertex attribute but you do not want to use it.} \item{sh}{The splitting heuristics for the BLISS algorithm. -Possible values are: \sQuote{\code{f}}: + Possible values are: \sQuote{\code{f}}: first non-singleton cell, \sQuote{\code{fl}}: first largest non-singleton cell, diff --git a/man/graph.bfs.Rd b/man/graph.bfs.Rd index 9479a54da96..10292a30e19 100644 --- a/man/graph.bfs.Rd +++ b/man/graph.bfs.Rd @@ -26,22 +26,22 @@ graph.bfs( \item{graph}{The input graph.} \item{root}{Numeric vector, usually of length one. -The root vertex, or root vertices to start the search from. -When several roots are given, they are considered in the order they appear. -If a root vertex was already reached while searching from an earlier root, no separate search is started from it, + The root vertex, or root vertices to start the search from. + When several roots are given, they are considered in the order they appear. + If a root vertex was already reached while searching from an earlier root, no separate search is started from it, so it keeps the distance it was first found at rather than \code{0}.} \item{mode}{For directed graphs specifies the type of edges to follow. -\sQuote{out} follows outgoing, \sQuote{in} incoming edges. -\sQuote{all} ignores edge directions completely. -\sQuote{total} is a synonym for \sQuote{all}. -This argument is ignored for undirected graphs.} + \sQuote{out} follows outgoing, \sQuote{in} incoming edges. + \sQuote{all} ignores edge directions completely. + \sQuote{total} is a synonym for \sQuote{all}. + This argument is ignored for undirected graphs.} \item{unreachable}{Logical, whether the search should visit the vertices that are unreachable from the given root vertex (or vertices). -If \code{TRUE}, then additional searches are performed until all vertices are visited.} + If \code{TRUE}, then additional searches are performed until all vertices are visited.} \item{restricted}{\code{NULL} (=no restriction), or a vector of vertices (IDs or symbolic names). -In the latter case, the search is restricted to the given vertices.} + In the latter case, the search is restricted to the given vertices.} \item{order}{Logical, whether to return the ordering of the vertices.} @@ -56,15 +56,15 @@ In the latter case, the search is restricted to the given vertices.} \item{dist}{Logical, whether to return the distance from the root of the search tree.} \item{callback}{Callback function. -This is called whenever a vertex is visited. -The callback function should return \code{FALSE} to continue the search or \code{TRUE} to stop it. -See details below. -Default: \code{NULL}.} + This is called whenever a vertex is visited. + The callback function should return \code{FALSE} to continue the search or \code{TRUE} to stop it. + See details below. + Default: \code{NULL}.} \item{extra}{Additional argument to supply to the callback function.} \item{rho}{The environment in which the callback function is evaluated. -The default \code{NULL} uses the caller's environment.} + The default \code{NULL} uses the caller's environment.} \item{neimode}{\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} This argument is deprecated from igraph 1.3.0; use \code{mode} instead.} } diff --git a/man/graph.bipartite.Rd b/man/graph.bipartite.Rd index 57e46f913bb..6f4809b21d8 100644 --- a/man/graph.bipartite.Rd +++ b/man/graph.bipartite.Rd @@ -8,16 +8,16 @@ graph.bipartite(types, edges, directed = FALSE) } \arguments{ \item{types}{A vector giving the vertex types. -It will be coerced into boolean. -The length of the vector gives the number of vertices in the graph. -When the vector is a named vector, the names will be attached to the graph as the \code{name} vertex attribute.} + It will be coerced into boolean. + The length of the vector gives the number of vertices in the graph. + When the vector is a named vector, the names will be attached to the graph as the \code{name} vertex attribute.} \item{edges}{A vector giving the edges of the graph, the same way as for the regular \code{\link[=make_graph]{make_graph()}} function. -It is checked that the edges indeed connect vertices of different kind, according to the supplied \code{types} vector. -The vector may be a string vector if \code{types} is a named vector.} + It is checked that the edges indeed connect vertices of different kind, according to the supplied \code{types} vector. + The vector may be a string vector if \code{types} is a named vector.} \item{directed}{Logical, whether to create a directed graph. -Note that by default undirected graphs are created, as this is more common for bipartite graphs.} + Note that by default undirected graphs are created, as this is more common for bipartite graphs.} } \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/graph.compose.Rd b/man/graph.compose.Rd index 64f296690fd..75fac68c4a8 100644 --- a/man/graph.compose.Rd +++ b/man/graph.compose.Rd @@ -12,9 +12,9 @@ graph.compose(g1, g2, byname = "auto") \item{g2}{The second input graph.} \item{byname}{A Logical, or the character scalar \code{auto}. -Whether to perform the operation based on symbolic vertex names. -If it is \code{auto}, that means \code{TRUE} if both graphs are named and \code{FALSE} otherwise. -A warning is generated if \code{auto} and one graph, but not both graphs are named.} + Whether to perform the operation based on symbolic vertex names. + If it is \code{auto}, that means \code{TRUE} if both graphs are named and \code{FALSE} otherwise. + A warning is generated if \code{auto} and one graph, but not both graphs are named.} } \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/graph.coreness.Rd b/man/graph.coreness.Rd index eddc30825ef..b1184949d42 100644 --- a/man/graph.coreness.Rd +++ b/man/graph.coreness.Rd @@ -10,9 +10,9 @@ graph.coreness(graph, mode = c("all", "out", "in")) \item{graph}{The input graph, it can be directed or undirected} \item{mode}{The type of the core in directed graphs. -Character constant, possible values: \verb{in}: in-cores are computed, \code{out}: out-cores are computed, \code{all}: + Character constant, possible values: \verb{in}: in-cores are computed, \code{out}: out-cores are computed, \code{all}: the corresponding undirected graph is considered. -This argument is ignored for undirected graphs.} + This argument is ignored for undirected graphs.} } \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/graph.data.frame.Rd b/man/graph.data.frame.Rd index 55511d6eb5a..19c4727e352 100644 --- a/man/graph.data.frame.Rd +++ b/man/graph.data.frame.Rd @@ -8,14 +8,14 @@ graph.data.frame(d, directed = TRUE, vertices = NULL) } \arguments{ \item{d}{A data frame containing a symbolic edge list in the first two columns. -Additional columns are considered as edge attributes. -Since version 0.7 this argument is coerced to a data frame with \code{as.data.frame}.} + Additional columns are considered as edge attributes. + Since version 0.7 this argument is coerced to a data frame with \code{as.data.frame}.} \item{directed}{Logical, whether or not to create a directed graph.} \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 with \code{as.data.frame}, if not \code{NULL}.} + See details below. + Since version 0.7 this argument is coerced to a data frame with \code{as.data.frame}, if not \code{NULL}.} } \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/graph.de.bruijn.Rd b/man/graph.de.bruijn.Rd index aa808d7c331..c6f313715a5 100644 --- a/man/graph.de.bruijn.Rd +++ b/man/graph.de.bruijn.Rd @@ -8,10 +8,10 @@ graph.de.bruijn(m, n) } \arguments{ \item{m}{Integer scalar, the size of the alphabet. -See details below.} + See details below.} \item{n}{Integer scalar, the length of the labels. -See details below.} + See details below.} } \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/graph.density.Rd b/man/graph.density.Rd index b8759135194..a2e6cf6a9a1 100644 --- a/man/graph.density.Rd +++ b/man/graph.density.Rd @@ -10,8 +10,8 @@ graph.density(graph, loops = FALSE) \item{graph}{The input graph.} \item{loops}{Logical, whether loop edges may exist in the graph. -This affects the calculation of the largest possible number of edges in the graph. -If this parameter is set to FALSE yet the graph contains self-loops, the result will not be meaningful.} + This affects the calculation of the largest possible number of edges in the graph. + If this parameter is set to FALSE yet the graph contains self-loops, the result will not be meaningful.} } \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/graph.dfs.Rd b/man/graph.dfs.Rd index 7eed8bbb00a..0451dcc9223 100644 --- a/man/graph.dfs.Rd +++ b/man/graph.dfs.Rd @@ -26,13 +26,13 @@ graph.dfs( \item{root}{The single root vertex to start the search from.} \item{mode}{For directed graphs specifies the type of edges to follow. -\sQuote{out} follows outgoing, \sQuote{in} incoming edges. -\sQuote{all} ignores edge directions completely. -\sQuote{total} is a synonym for \sQuote{all}. -This argument is ignored for undirected graphs.} + \sQuote{out} follows outgoing, \sQuote{in} incoming edges. + \sQuote{all} ignores edge directions completely. + \sQuote{total} is a synonym for \sQuote{all}. + This argument is ignored for undirected graphs.} \item{unreachable}{Logical, whether the search should visit the vertices that are unreachable from the given root vertex (or vertices). -If \code{TRUE}, then additional searches are performed until all vertices are visited.} + If \code{TRUE}, then additional searches are performed until all vertices are visited.} \item{order}{Logical, whether to return the DFS ordering of the vertices.} @@ -43,19 +43,19 @@ If \code{TRUE}, then additional searches are performed until all vertices are vi \item{dist}{Logical, whether to return the distance from the root of the search tree.} \item{in.callback}{Callback function. -This is called whenever a vertex is visited. -See details below. -Default: \code{NULL}.} + This is called whenever a vertex is visited. + See details below. + Default: \code{NULL}.} \item{out.callback}{Callback function. -This is called whenever the subtree of a vertex is completed by the algorithm. -See details below. -Default: \code{NULL}.} + This is called whenever the subtree of a vertex is completed by the algorithm. + See details below. + Default: \code{NULL}.} \item{extra}{Additional argument to supply to the callback function.} \item{rho}{The environment in which the callback function is evaluated. -The default \code{NULL} uses the caller's environment.} + The default \code{NULL} uses the caller's environment.} \item{neimode}{\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} This argument is deprecated from igraph 1.3.0; use \code{mode} instead.} } diff --git a/man/graph.diversity.Rd b/man/graph.diversity.Rd index fec7280c8f3..af1dbd98c64 100644 --- a/man/graph.diversity.Rd +++ b/man/graph.diversity.Rd @@ -8,14 +8,14 @@ graph.diversity(graph, weights = NULL, vids = V(graph)) } \arguments{ \item{graph}{The input graph. -Edge directions are ignored.} + Edge directions are ignored.} \item{weights}{\code{NULL}, or the vector of edge weights to use for the computation. -If \code{NULL}, then the \sQuote{weight} attibute is used. -Note that this measure is not defined for unweighted graphs.} + If \code{NULL}, then the \sQuote{weight} attibute is used. + Note that this measure is not defined for unweighted graphs.} \item{vids}{The vertex IDs for which to calculate the measure. -The default \code{NULL} selects all vertices.} + The default \code{NULL} selects all vertices.} } \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/graph.eigen.Rd b/man/graph.eigen.Rd index 3fba1a85a43..0028b2247de 100644 --- a/man/graph.eigen.Rd +++ b/man/graph.eigen.Rd @@ -15,14 +15,14 @@ graph.eigen( \item{graph}{The input graph, can be directed or undirected.} \item{algorithm}{The algorithm to use. -Currently only \code{arpack} is implemented, which uses the ARPACK solver. -See also \code{\link[=arpack]{arpack()}}.} + Currently only \code{arpack} is implemented, which uses the ARPACK solver. + See also \code{\link[=arpack]{arpack()}}.} \item{which}{A list to specify which eigenvalues and eigenvectors to calculate. -By default the leading (i.e. largest magnitude) eigenvalue and the corresponding eigenvector is calculated.} + By default the leading (i.e. largest magnitude) eigenvalue and the corresponding eigenvector is calculated.} \item{options}{Options for the ARPACK solver. -See \code{\link[=arpack_defaults]{arpack_defaults()}}.} + See \code{\link[=arpack_defaults]{arpack_defaults()}}.} } \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/graph.extended.chordal.ring.Rd b/man/graph.extended.chordal.ring.Rd index 3b27b0b2f25..17530e58a02 100644 --- a/man/graph.extended.chordal.ring.Rd +++ b/man/graph.extended.chordal.ring.Rd @@ -10,7 +10,7 @@ graph.extended.chordal.ring(n, w, directed = FALSE) \item{n}{The number of vertices.} \item{w}{A matrix which specifies the extended chordal ring. -See details below.} + See details below.} \item{directed}{Logical, whether or not to create a directed graph.} } diff --git a/man/graph.famous.Rd b/man/graph.famous.Rd index 5070bc99045..96a29ebabd1 100644 --- a/man/graph.famous.Rd +++ b/man/graph.famous.Rd @@ -17,32 +17,32 @@ graph.famous( \arguments{ \item{edges}{A vector defining the edges, the first edge points from the first element to the second, the second edge from the third to the fourth, etc. For a numeric vector, these are interpreted as internal vertex IDs. -For character vectors, they are interpreted as vertex names. + For character vectors, they are interpreted as vertex names. Alternatively, this can be a character scalar, the name of a notable graph. -See Notable graphs below. -The name is case insensitive. + See Notable graphs below. + The name is case insensitive. Starting from igraph 0.8.0, you can also include literals here, via igraph's formula notation (see \code{\link[=graph_from_literal]{graph_from_literal()}}). -In this case, the first term of the formula has to start with a \sQuote{\code{~}} character, just like regular formulae in R. + In this case, the first term of the formula has to start with a \sQuote{\code{~}} character, just like regular formulae in R. See examples below.} \item{...}{For \code{make_graph()}: extra arguments for the case when the graph is given via a literal, see \code{\link[=graph_from_literal]{graph_from_literal()}}. -For \code{directed_graph()} and \code{undirected_graph()}: Passed to \code{make_directed_graph()} or \code{make_undirected_graph()}.} + For \code{directed_graph()} and \code{undirected_graph()}: Passed to \code{make_directed_graph()} or \code{make_undirected_graph()}.} \item{n}{The number of vertices in the graph. -This argument is ignored (with a warning) if \code{edges} are symbolic vertex names. -It is also ignored if there is a bigger vertex ID in \code{edges}. -This means that for this function it is safe to supply zero here if the vertex with the largest ID is not an isolate. -The default \code{NULL} uses the largest vertex ID in \code{edges}.} + This argument is ignored (with a warning) if \code{edges} are symbolic vertex names. + It is also ignored if there is a bigger vertex ID in \code{edges}. + This means that for this function it is safe to supply zero here if the vertex with the largest ID is not an isolate. + The default \code{NULL} uses the largest vertex ID in \code{edges}.} \item{isolates}{Character vector, names of isolate vertices, for symbolic edge lists. -It is ignored for numeric edge lists.} + It is ignored for numeric edge lists.} \item{directed}{Whether to create a directed graph.} \item{dir}{It is the same as \code{directed}, for compatibility. -Do not give both of them.} + Do not give both of them.} \item{simplify}{For graph literals, whether to simplify the graph.} } diff --git a/man/graph.formula.Rd b/man/graph.formula.Rd index b72794392eb..2f1e14add45 100644 --- a/man/graph.formula.Rd +++ b/man/graph.formula.Rd @@ -8,13 +8,13 @@ graph.formula(..., simplify = TRUE) } \arguments{ \item{...}{For \code{graph_from_literal()} the formulae giving the structure of the graph, see details below. -For \code{from_literal()} all arguments are passed to \code{graph_from_literal()}.} + For \code{from_literal()} all arguments are passed to \code{graph_from_literal()}.} \item{simplify}{Logical, whether to call \code{\link[=simplify]{simplify()}} on the created graph. -By default the graph is simplified, loop and multiple edges are removed. -\code{\link[=simplify]{simplify()}} is only called when the created graph is not already simple, + By default the graph is simplified, loop and multiple edges are removed. + \code{\link[=simplify]{simplify()}} is only called when the created graph is not already simple, so the edge order from the formula is preserved whenever no loops or multi-edges are present. -When the graph does contain loops or multi-edges (and \code{simplify = TRUE}), \code{\link[=simplify]{simplify()}} reorders the edges into its canonical order.} + When the graph does contain loops or multi-edges (and \code{simplify = TRUE}), \code{\link[=simplify]{simplify()}} reorders the edges into its canonical order.} } \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/graph.full.bipartite.Rd b/man/graph.full.bipartite.Rd index 63235f870d7..effc0c9ecdd 100644 --- a/man/graph.full.bipartite.Rd +++ b/man/graph.full.bipartite.Rd @@ -14,9 +14,9 @@ graph.full.bipartite(n1, n2, directed = FALSE, mode = c("all", "out", "in")) \item{directed}{Logical, whether the graphs is directed.} \item{mode}{Scalar giving the kind of edges to create for directed graphs. -If this is \sQuote{\code{out}} then all vertices of the first kind are connected to the others; + If this is \sQuote{\code{out}} then all vertices of the first kind are connected to the others; \sQuote{\verb{in}} specifies the opposite direction; \sQuote{\code{all}} creates mutual edges. -This argument is ignored for undirected graphs.x} + This argument is ignored for undirected graphs.x} } \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/graph.graphdb.Rd b/man/graph.graphdb.Rd index 7e258215026..d3b47940380 100644 --- a/man/graph.graphdb.Rd +++ b/man/graph.graphdb.Rd @@ -18,31 +18,31 @@ graph.graphdb( } \arguments{ \item{url}{Complete URL with the file to import. -Default: \code{NULL}.} + Default: \code{NULL}.} \item{prefix}{Gives the prefix. -See details below. -Possible values: \code{iso}, \code{i2}, \code{si4}, \code{si6}, \code{mcs10}, \code{mcs30}, \code{mcs50}, \code{mcs70}, \code{mcs90}.} + See details below. + Possible values: \code{iso}, \code{i2}, \code{si4}, \code{si6}, \code{mcs10}, \code{mcs30}, \code{mcs50}, \code{mcs70}, \code{mcs90}.} \item{type}{Gives the graph type identifier. -See details below. -Possible values: \code{r001}, \code{r005}, \code{r01}, \code{r02}, \code{m2D}, \code{m2Dr2}, \code{m2Dr4}, \code{m2Dr6} \code{m3D}, \code{m3Dr2}, \code{m3Dr4}, \code{m3Dr6}, \code{m4D}, \code{m4Dr2}, + See details below. + Possible values: \code{r001}, \code{r005}, \code{r01}, \code{r02}, \code{m2D}, \code{m2Dr2}, \code{m2Dr4}, \code{m2Dr6} \code{m3D}, \code{m3Dr2}, \code{m3Dr4}, \code{m3Dr6}, \code{m4D}, \code{m4Dr2}, \code{m4Dr4}, \code{m4Dr6}, \code{b03}, \code{b03m}, \code{b06}, \code{b06m}, \code{b09}, \code{b09m}.} \item{nodes}{The number of vertices in the graph.} \item{pair}{Specifies which graph of the pair to read. -Possible values: \code{A} and \code{B}.} + Possible values: \code{A} and \code{B}.} \item{which}{Gives the number of the graph to read. -For every graph type there are a number of actual graphs in the database. -This argument specifies which one to read.} + For every graph type there are a number of actual graphs in the database. + This argument specifies which one to read.} \item{base}{The base address of the database. -See details below.} + See details below.} \item{compressed}{Logical, if TRUE than the file is expected to be compressed by gzip. -If \code{url} is \code{NULL} then a \sQuote{\code{.gz}} suffix is added to the filename.} + If \code{url} is \code{NULL} then a \sQuote{\code{.gz}} suffix is added to the filename.} \item{directed}{Logical, whether to create a directed graph.} } diff --git a/man/graph.incidence.Rd b/man/graph.incidence.Rd index 317d10b3aea..cbf2a33786f 100644 --- a/man/graph.incidence.Rd +++ b/man/graph.incidence.Rd @@ -15,30 +15,30 @@ graph.incidence( } \arguments{ \item{incidence}{The input bipartite adjacency matrix. -It can also be a sparse matrix from the \code{Matrix} package.} + It can also be a sparse matrix from the \code{Matrix} package.} \item{directed}{Logical, whether to create a directed graph.} \item{mode}{A character constant, defines the direction of the edges in directed graphs, ignored for undirected graphs. -If \sQuote{\code{out}}, + If \sQuote{\code{out}}, then edges go from vertices of the first kind (corresponding to rows in the bipartite adjacency matrix) to vertices of the second kind (columns in the incidence matrix). -If \sQuote{\verb{in}}, then the opposite direction is used. -If \sQuote{\code{all}} or \sQuote{\code{total}}, then mutual edges are created.} + If \sQuote{\verb{in}}, then the opposite direction is used. + If \sQuote{\code{all}} or \sQuote{\code{total}}, then mutual edges are created.} \item{multiple}{Logical, specifies how to interpret the matrix elements. -See details below.} + See details below.} \item{weighted}{This argument specifies whether to create a weighted graph from the bipartite adjacency matrix. -If it is \code{NULL} then an unweighted graph is created and the \code{multiple} argument is used to determine the edges of the graph. -If it is a character constant then for every non-zero matrix entry an edge is created and the value of the entry is added as an edge attribute named by the \code{weighted} argument. -If it is \code{TRUE} then a weighted graph is created and the name of the edge attribute will be \sQuote{\code{weight}}.} + If it is \code{NULL} then an unweighted graph is created and the \code{multiple} argument is used to determine the edges of the graph. + If it is a character constant then for every non-zero matrix entry an edge is created and the value of the entry is added as an edge attribute named by the \code{weighted} argument. + If it is \code{TRUE} then a weighted graph is created and the name of the edge attribute will be \sQuote{\code{weight}}.} \item{add.names}{A character constant, \code{NA} or \code{NULL}. -\code{graph_from_biadjacency_matrix()} can add the row and column names of the incidence matrix as vertex attributes. -If this argument is \code{NULL} (the default) and the bipartite adjacency matrix has both row and column names, + \code{graph_from_biadjacency_matrix()} can add the row and column names of the incidence matrix as vertex attributes. + If this argument is \code{NULL} (the default) and the bipartite adjacency matrix has both row and column names, then these are added as the \sQuote{\code{name}} vertex attribute. -If you want a different vertex attribute for this, then give the name of the attributes as a character string. -If this argument is \code{NA}, then no vertex attributes (other than type) will be added.} + If you want a different vertex attribute for this, then give the name of the attributes as a character string. + If this argument is \code{NA}, then no vertex attributes (other than type) will be added.} } \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/graph.kautz.Rd b/man/graph.kautz.Rd index 15a6bb90c8e..48adbb66902 100644 --- a/man/graph.kautz.Rd +++ b/man/graph.kautz.Rd @@ -8,10 +8,10 @@ graph.kautz(m, n) } \arguments{ \item{m}{Integer scalar, the size of the alphabet. -See details below.} + See details below.} \item{n}{Integer scalar, the length of the labels. -See details below.} + See details below.} } \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/graph.knn.Rd b/man/graph.knn.Rd index 2ed55dfe290..0fdaa2046f2 100644 --- a/man/graph.knn.Rd +++ b/man/graph.knn.Rd @@ -14,24 +14,24 @@ graph.knn( } \arguments{ \item{graph}{The input graph. -It may be directed.} + It may be directed.} \item{vids}{The vertices for which the calculation is performed. -The default \code{NULL} includes all vertices. -Note, that if not all vertices are given here, + The default \code{NULL} includes all vertices. + Note, that if not all vertices are given here, then both \sQuote{\code{knn}} and \sQuote{\code{knnk}} will be calculated based on the given vertices only.} \item{mode}{Character constant to indicate the type of neighbors to consider in directed graphs. -\code{out} considers out-neighbors, \verb{in} considers in-neighbors and \code{all} ignores edge directions.} + \code{out} considers out-neighbors, \verb{in} considers in-neighbors and \code{all} ignores edge directions.} \item{neighbor.degree.mode}{The type of degree to average in directed graphs. -\code{out} averages out-degrees, \verb{in} averages in-degrees and \code{all} ignores edge directions for the degree calculation.} + \code{out} averages out-degrees, \verb{in} averages in-degrees and \code{all} ignores edge directions for the degree calculation.} \item{weights}{Weight vector. -If the graph has a \code{weight} edge attribute, then this is used by default. -If this argument is given, then vertex strength (see \code{\link[=strength]{strength()}}) is used instead of vertex degree. -But note that \code{knnk} is still given in the function of the normal vertex degree. -Weights are are used to calculate a weighted degree (also called \code{\link[=strength]{strength()}}) instead of the degree.} + If the graph has a \code{weight} edge attribute, then this is used by default. + If this argument is given, then vertex strength (see \code{\link[=strength]{strength()}}) is used instead of vertex degree. + But note that \code{knnk} is still given in the function of the normal vertex degree. + Weights are are used to calculate a weighted degree (also called \code{\link[=strength]{strength()}}) instead of the degree.} } \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/graph.laplacian.Rd b/man/graph.laplacian.Rd index 3c5d74acc85..14161cdce99 100644 --- a/man/graph.laplacian.Rd +++ b/man/graph.laplacian.Rd @@ -17,11 +17,11 @@ graph.laplacian( \item{normalized}{Deprecated, use \code{normalization} instead.} \item{weights}{An optional vector giving edge weights for weighted Laplacian matrix. -If this is \code{NULL} and the graph has an edge attribute called \code{weight}, then it will be used automatically. -Set this to \code{NA} if you want the unweighted Laplacian on a graph that has a \code{weight} edge attribute.} + If this is \code{NULL} and the graph has an edge attribute called \code{weight}, then it will be used automatically. + Set this to \code{NA} if you want the unweighted Laplacian on a graph that has a \code{weight} edge attribute.} \item{sparse}{Logical, whether to return the result as a sparse matrix. -The \code{Matrix} package is required for sparse matrices.} + The \code{Matrix} package is required for sparse matrices.} } \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/graph.lattice.Rd b/man/graph.lattice.Rd index 6c4d94ee944..232c134ba91 100644 --- a/man/graph.lattice.Rd +++ b/man/graph.lattice.Rd @@ -23,14 +23,14 @@ graph.lattice( \item{dim}{Integer constant, the dimension of the lattice.} \item{nei}{The distance within which (inclusive) the neighbors on the lattice will be connected. -This parameter is not used right now.} + This parameter is not used right now.} \item{directed}{Whether to create a directed lattice.} \item{mutual}{Logical, if \code{TRUE} directed lattices will be mutually connected.} \item{periodic}{Logical vector, defines whether the generated lattice is periodic along each dimension. -This parameter may also be a single logical which will be extended to a logical vector of `dimvector`` length.} + This parameter may also be a single logical which will be extended to a logical vector of `dimvector`` length.} \item{circular}{Deprecated, use \code{periodic} instead.} } diff --git a/man/graph.lcf.Rd b/man/graph.lcf.Rd index 30443b70563..95a48578093 100644 --- a/man/graph.lcf.Rd +++ b/man/graph.lcf.Rd @@ -8,7 +8,7 @@ graph.lcf(n, shifts, repeats = 1) } \arguments{ \item{n}{Integer, the number of vertices in the graph. -If \code{NULL} (default), it is set to \code{len(shifts) * repeats}.} + If \code{NULL} (default), it is set to \code{len(shifts) * repeats}.} \item{shifts}{Integer vector, the shifts.} diff --git a/man/graph.maxflow.Rd b/man/graph.maxflow.Rd index c270870aeb7..6ee599b9176 100644 --- a/man/graph.maxflow.Rd +++ b/man/graph.maxflow.Rd @@ -14,8 +14,8 @@ graph.maxflow(graph, source, target, capacity = NULL) \item{target}{The ID of the target vertex (sometimes also called sink).} \item{capacity}{Vector giving the capacity of the edges. -If this is \code{NULL} (the default) then the \code{capacity} edge attribute is used. -Note that the \code{weight} edge attribute is not used by this function.} + If this is \code{NULL} (the default) then the \code{capacity} edge attribute is used. + Note that the \code{weight} edge attribute is not used by this function.} } \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/graph.mincut.Rd b/man/graph.mincut.Rd index 18bb2e7032e..54c2e50d467 100644 --- a/man/graph.mincut.Rd +++ b/man/graph.mincut.Rd @@ -20,7 +20,7 @@ graph.mincut( \item{target}{The ID of the target vertex (sometimes also called sink).} \item{capacity}{Vector giving the capacity of the edges. -If this is \code{NULL} (the default) then the \code{capacity} edge attribute is used.} + If this is \code{NULL} (the default) then the \code{capacity} edge attribute is used.} \item{value.only}{Logical, if \code{TRUE} only the minimum cut value is returned, if \code{FALSE} the edges in the cut and a the two (or more) partitions are also returned.} diff --git a/man/graph.motifs.Rd b/man/graph.motifs.Rd index 2b2cbb0f027..3b963d0ce98 100644 --- a/man/graph.motifs.Rd +++ b/man/graph.motifs.Rd @@ -12,8 +12,8 @@ graph.motifs(graph, size = 3, cut.prob = rep(0, size)) \item{size}{The size of the motif, currently sizes 3 and 4 are supported in directed graphs and sizes 3 to 6 in undirected graphs.} \item{cut.prob}{Numeric vector giving the probabilities that the search graph is cut at a certain level. -Its length should be the same as the size of the motif (the \code{size} argument). -If \verb{rep(0, size))}, the default, no cuts are made.} + Its length should be the same as the size of the motif (the \code{size} argument). + If \verb{rep(0, size))}, the default, no cuts are made.} } \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/graph.motifs.est.Rd b/man/graph.motifs.est.Rd index e61b351aabf..6ad794a19aa 100644 --- a/man/graph.motifs.est.Rd +++ b/man/graph.motifs.est.Rd @@ -18,15 +18,15 @@ graph.motifs.est( \item{size}{The size of the motif, currently size 3 and 4 are supported in directed graphs and sizes 3-6 in undirected graphs.} \item{cut.prob}{Numeric vector giving the probabilities that the search graph is cut at a certain level. -Its length should be the same as the size of the motif (the \code{size} argument). -If \verb{rep(0, size))}, the default, no cuts are made.} + Its length should be the same as the size of the motif (the \code{size} argument). + If \verb{rep(0, size))}, the default, no cuts are made.} \item{sample.size}{The number of vertices to use as a starting point for finding motifs. -Only used if the \code{sample} argument is \code{NULL}. -The default is \code{ceiling(vcount(graph) / 10)} .} + Only used if the \code{sample} argument is \code{NULL}. + The default is \code{ceiling(vcount(graph) / 10)} .} \item{sample}{Vertices to use as a starting point for finding motifs. -Default: \code{NULL}.} + Default: \code{NULL}.} } \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/graph.motifs.no.Rd b/man/graph.motifs.no.Rd index cba0d710b3c..7dd351d0773 100644 --- a/man/graph.motifs.no.Rd +++ b/man/graph.motifs.no.Rd @@ -12,8 +12,8 @@ graph.motifs.no(graph, size = 3, cut.prob = rep(0, size)) \item{size}{The size of the motif.} \item{cut.prob}{Numeric vector giving the probabilities that the search graph is cut at a certain level. -Its length should be the same as the size of the motif (the \code{size} argument). -If \code{NULL}, the default, no cuts are made.} + Its length should be the same as the size of the motif (the \code{size} argument). + If \code{NULL}, the default, no cuts are made.} } \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/graph.neighborhood.Rd b/man/graph.neighborhood.Rd index bf224bc72ac..1d7b221cf29 100644 --- a/man/graph.neighborhood.Rd +++ b/man/graph.neighborhood.Rd @@ -16,17 +16,17 @@ graph.neighborhood( \item{graph}{The input graph.} \item{order}{Integer giving the order of the neighborhood. -Negative values indicate an infinite order.} + Negative values indicate an infinite order.} \item{nodes}{The vertices for which the calculation is performed. -The default \code{NULL} selects all vertices.} + The default \code{NULL} selects all vertices.} \item{mode}{Character constant, it specifies how to use the direction of the edges if a directed graph is analyzed. -For \sQuote{out} only the outgoing edges are followed, + For \sQuote{out} only the outgoing edges are followed, so all vertices reachable from the source vertex in at most \code{order} steps are counted. -For \sQuote{"in"} all vertices from which the source vertex is reachable in at most \code{order} steps are counted. -\sQuote{"all"} ignores the direction of the edges. -This argument is ignored for undirected graphs.} + For \sQuote{"in"} all vertices from which the source vertex is reachable in at most \code{order} steps are counted. + \sQuote{"all"} ignores the direction of the edges. + This argument is ignored for undirected graphs.} \item{mindist}{The minimum distance to include the vertex in the result.} } diff --git a/man/graph.ring.Rd b/man/graph.ring.Rd index a116bc274dd..6c9436ff343 100644 --- a/man/graph.ring.Rd +++ b/man/graph.ring.Rd @@ -12,10 +12,10 @@ graph.ring(n, directed = FALSE, mutual = FALSE, circular = TRUE) \item{directed}{Whether the graph is directed.} \item{mutual}{Whether directed edges are mutual. -It is ignored in undirected graphs.} + It is ignored in undirected graphs.} \item{circular}{Whether to create a circular ring. -A non-circular ring is essentially a \dQuote{line}: a tree where every non-leaf vertex has one child.} + A non-circular ring is essentially a \dQuote{line}: a tree where every non-leaf vertex has one child.} } \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/graph.strength.Rd b/man/graph.strength.Rd index 3282e9d1533..0a880474d63 100644 --- a/man/graph.strength.Rd +++ b/man/graph.strength.Rd @@ -16,17 +16,17 @@ graph.strength( \item{graph}{The input graph.} \item{vids}{The vertices for which the strength will be calculated. -The default \code{NULL} selects all vertices.} + The default \code{NULL} selects all vertices.} \item{mode}{Character string, \dQuote{out} for out-degree, \dQuote{in} for in-degree or \dQuote{all} for the sum of the two. -For undirected graphs this argument is ignored.} + For undirected graphs this argument is ignored.} \item{loops}{Logical; whether the loop edges are also counted.} \item{weights}{Weight vector. -If the graph has a \code{weight} edge attribute, then this is used by default. -If the graph does not have a \code{weight} edge attribute and this argument is \code{NULL}, then a \code{\link[=degree]{degree()}} is called. -If this is \code{NA}, then no edge weights are used (even if the graph has a \code{weight} edge attribute).} + If the graph has a \code{weight} edge attribute, then this is used by default. + If the graph does not have a \code{weight} edge attribute and this argument is \code{NULL}, then a \code{\link[=degree]{degree()}} is called. + If this is \code{NA}, then no edge weights are used (even if the graph has a \code{weight} edge attribute).} } \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/graph.tree.Rd b/man/graph.tree.Rd index 9dfbe77ffe0..4bffe36327c 100644 --- a/man/graph.tree.Rd +++ b/man/graph.tree.Rd @@ -12,7 +12,7 @@ graph.tree(n, children = 2, mode = c("out", "in", "undirected")) \item{children}{Integer scalar, the number of children of a vertex (except for leafs)} \item{mode}{Defines the direction of the edges. -\code{out} indicates that the edges point from the parent to the children, + \code{out} indicates that the edges point from the parent to the children, \verb{in} indicates that they point from the children to their parents, while \code{undirected} creates an undirected graph.} } \description{ diff --git a/man/graph.union.Rd b/man/graph.union.Rd index 6b346e21ba5..b496145934b 100644 --- a/man/graph.union.Rd +++ b/man/graph.union.Rd @@ -10,9 +10,9 @@ graph.union(..., byname = "auto") \item{...}{Graph objects or lists of graph objects.} \item{byname}{A Logical, or the character scalar \code{auto}. -Whether to perform the operation based on symbolic vertex names. -If it is \code{auto}, that means \code{TRUE} if all graphs are named and \code{FALSE} otherwise. -A warning is generated if \code{auto} and some (but not all) graphs are named.} + Whether to perform the operation based on symbolic vertex names. + If it is \code{auto}, that means \code{TRUE} if all graphs are named and \code{FALSE} otherwise. + A warning is generated if \code{auto} and some (but not all) graphs are named.} } \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/graph_attr-set.Rd b/man/graph_attr-set.Rd index ddd84cdb030..b7011045a52 100644 --- a/man/graph_attr-set.Rd +++ b/man/graph_attr-set.Rd @@ -11,7 +11,7 @@ graph_attr(graph, name) <- value \item{graph}{The graph.} \item{name}{The name of the attribute to set. -If missing, then \code{value} should be a named list, and all list members are set as attributes.} + If missing, then \code{value} should be a named list, and all list members are set as attributes.} \item{value}{The value of the attribute to set} } diff --git a/man/graph_attr.Rd b/man/graph_attr.Rd index 5516d224ec3..bf3fa267c7a 100644 --- a/man/graph_attr.Rd +++ b/man/graph_attr.Rd @@ -11,7 +11,7 @@ graph_attr(graph, name) \item{graph}{Input graph.} \item{name}{The name of attribute to query. -If missing, then all attributes are returned in a list.} + If missing, then all attributes are returned in a list.} } \value{ A list of graph attributes, or a single graph attribute. diff --git a/man/graph_center.Rd b/man/graph_center.Rd index 6583cb6c96e..3643c193220 100644 --- a/man/graph_center.Rd +++ b/man/graph_center.Rd @@ -12,15 +12,15 @@ graph_center(graph, ..., weights = NULL, mode = c("all", "out", "in", "total")) \item{...}{These dots are for future extensions and must be empty.} \item{weights}{Possibly a numeric vector giving edge weights. -If this is \code{NULL} and the graph has a \code{weight} edge attribute, then the attribute is used. -If this is \code{NA} then no weights are used (even if the graph has a \code{weight} attribute). -In a weighted graph, the length of a path is the sum of the weights of its constituent edges.} + If this is \code{NULL} and the graph has a \code{weight} edge attribute, then the attribute is used. + If this is \code{NA} then no weights are used (even if the graph has a \code{weight} attribute). + In a weighted graph, the length of a path is the sum of the weights of its constituent edges.} \item{mode}{Character constant, gives whether the shortest paths to or from the given vertices should be calculated for directed graphs. -If \code{out} then the shortest paths \emph{from} the vertex, if \verb{in} then \emph{to} it will be considered. -If \code{all}, the default, then the graph is treated as undirected, i.e. edge directions are not taken into account. -This argument is ignored for undirected graphs.} + If \code{out} then the shortest paths \emph{from} the vertex, if \verb{in} then \emph{to} it will be considered. + If \code{all}, the default, then the graph is treated as undirected, i.e. edge directions are not taken into account. + This argument is ignored for undirected graphs.} } \value{ The vertex IDs of the central vertices. diff --git a/man/graph_from_adj_list.Rd b/man/graph_from_adj_list.Rd index 295f6426b05..9a366b9ce57 100644 --- a/man/graph_from_adj_list.Rd +++ b/man/graph_from_adj_list.Rd @@ -13,7 +13,7 @@ graph_from_adj_list( } \arguments{ \item{adjlist}{The adjacency list. -It should be consistent, + It should be consistent, i.e. the maximum throughout all vectors in the list must be less than the number of vectors (=the number of vertices in the graph).} \item{...}{These dots are for future extensions and must be empty.} @@ -22,8 +22,8 @@ i.e. the maximum throughout all vectors in the list must be less than the number and in the latter case, whether it contains the outgoing (\sQuote{out}) or the incoming (\sQuote{in}) neighbors of the vertices.} \item{duplicate}{Logical. -For undirected graphs it gives whether edges are included in the list twice. -E.g. if it is \code{TRUE} then for an undirected \code{{A,B}} edge \code{graph_from_adj_list()} expects \code{A} included in the neighbors of \code{B} and \code{B} to be included in the neighbors of \code{A}. + For undirected graphs it gives whether edges are included in the list twice. + E.g. if it is \code{TRUE} then for an undirected \code{{A,B}} edge \code{graph_from_adj_list()} expects \code{A} included in the neighbors of \code{B} and \code{B} to be included in the neighbors of \code{A}. This argument is ignored if \code{mode} is \code{out} or \verb{in}.} } @@ -32,11 +32,11 @@ An igraph graph object. } \description{ An adjacency list is a list of numeric vectors, containing the neighbor vertices for each vertex. -This function creates an igraph graph object from such a list. + This function creates an igraph graph object from such a list. } \details{ Adjacency lists are handy if you intend to do many (small) modifications to a graph. -In this case adjacency lists are more efficient than igraph graphs. + In this case adjacency lists are more efficient than igraph graphs. The idea is that you convert your graph to an adjacency list by \code{\link[=as_adj_list]{as_adj_list()}}, do your modifications to the graphs and finally create again an igraph graph by calling \code{graph_from_adj_list()}. diff --git a/man/graph_from_adjacency_matrix.Rd b/man/graph_from_adjacency_matrix.Rd index 29175c2a08a..121d6eba649 100644 --- a/man/graph_from_adjacency_matrix.Rd +++ b/man/graph_from_adjacency_matrix.Rd @@ -27,33 +27,33 @@ from_adjacency( } \arguments{ \item{adjmatrix}{A square adjacency matrix. -From igraph version 0.5.1 this can be a sparse matrix created with the \code{Matrix} package.} + From igraph version 0.5.1 this can be a sparse matrix created with the \code{Matrix} package.} \item{...}{These dots are for future extensions and must be empty.} \item{mode}{Character scalar, specifies how igraph should interpret the supplied matrix. -See also the \code{weighted} argument, the interpretation depends on that too. -Possible values are: \code{directed}, \code{undirected}, \code{upper}, \code{lower}, \code{max}, \code{min}, \code{plus}. -See details below.} + See also the \code{weighted} argument, the interpretation depends on that too. + Possible values are: \code{directed}, \code{undirected}, \code{upper}, \code{lower}, \code{max}, \code{min}, \code{plus}. + See details below.} \item{weighted}{This argument specifies whether to create a weighted graph from an adjacency matrix. -If it is \code{NULL} then an unweighted graph is created and the elements of the adjacency matrix gives the number of edges between the vertices. -If it is a character constant then for every non-zero matrix entry an edge is created and the value of the entry is added as an edge attribute named by the \code{weighted} argument. -If it is \code{TRUE} then a weighted graph is created and the name of the edge attribute will be \code{weight}. -See also details below.} + If it is \code{NULL} then an unweighted graph is created and the elements of the adjacency matrix gives the number of edges between the vertices. + If it is a character constant then for every non-zero matrix entry an edge is created and the value of the entry is added as an edge attribute named by the \code{weighted} argument. + If it is \code{TRUE} then a weighted graph is created and the name of the edge attribute will be \code{weight}. + See also details below.} \item{diag}{Logical, whether to include the diagonal of the matrix in the calculation. -If this is \code{FALSE} then the diagonal is zerod out first.} + If this is \code{FALSE} then the diagonal is zerod out first.} \item{add.colnames}{Character scalar, whether to add the column names as vertex attributes. -If it is \code{NULL} (the default) then, if present, column names are added as vertex attribute \sQuote{name}. -If \code{NA} or \code{FALSE} then they will not be added. -If a character constant, then it gives the name of the vertex attribute to add.} + If it is \code{NULL} (the default) then, if present, column names are added as vertex attribute \sQuote{name}. + If \code{NA} or \code{FALSE} then they will not be added. + If a character constant, then it gives the name of the vertex attribute to add.} \item{add.rownames}{Character scalar, whether to add the row names as vertex attributes. -Possible values the same as the previous argument. -By default row names are not added. -If \sQuote{\code{add.rownames}} and \sQuote{\code{add.colnames}} specify the same vertex attribute, then the former is ignored.} + Possible values the same as the previous argument. + By default row names are not added. + If \sQuote{\code{add.rownames}} and \sQuote{\code{add.colnames}} specify the same vertex attribute, then the former is ignored.} } \value{ An igraph graph object. @@ -68,68 +68,68 @@ The order of the vertices are preserved, i.e. the vertex corresponding to the fi If this argument is \code{NULL} then an unweighted graph is created and an element of the adjacency matrix gives the number of edges to create between the two corresponding vertices. -The details depend on the value of the \code{mode} argument: + The details depend on the value of the \code{mode} argument: \describe{ \item{"directed"}{ The graph will be directed and a matrix element gives the number of edges between two vertices. -} + } \item{"undirected"}{ This is exactly the same as \code{max}, for convenience. -Note that it is \emph{not} checked whether the matrix is symmetric. -} + Note that it is \emph{not} checked whether the matrix is symmetric. + } \item{"max"}{ An undirected graph will be created and \code{max(A(i,j), A(j,i))} gives the number of edges. -} + } \item{"upper"}{ An undirected graph will be created, only the upper right triangle (including the diagonal) is used for the number of edges. -} + } \item{"lower"}{ An undirected graph will be created, only the lower left triangle (including the diagonal) is used for creating the edges. -} + } \item{"min"}{ An undirected graph will be created with \code{min(A(i,j), A(j,i))} edges between vertex \code{i} and \code{j}. -} + } \item{"plus"}{ An undirected graph will be created with \code{A(i,j)+A(j,i)} edges between vertex \code{i} and \code{j}. -} + } } If the \code{weighted} argument is not \code{NULL} then the elements of the matrix give the weights of the edges (if they are not zero). -The details depend on the value of the \code{mode} argument: + The details depend on the value of the \code{mode} argument: \describe{ \item{"directed"}{ The graph will be directed and a matrix element gives the edge weights. -} + } \item{"undirected"}{ First we check that the matrix is symmetric. It is an error if not. -Then only the upper triangle is used to create a weighted undirected graph. -} + Then only the upper triangle is used to create a weighted undirected graph. + } \item{"max"}{ An undirected graph will be created and \code{max(A(i,j), A(j,i))} gives the edge weights. -} + } \item{"upper"}{ An undirected graph will be created, only the upper right triangle (including the diagonal) is used (for the edge weights). -} + } \item{"lower"}{ An undirected graph will be created, only the lower left triangle (including the diagonal) is used for creating the edges. -} + } \item{"min"}{ An undirected graph will be created, \code{min(A(i,j), A(j,i))} gives the edge weights. -} + } \item{"plus"}{ An undirected graph will be created, \code{A(i,j)+A(j,i)} gives the edge weights. -} + } } } \section{Related documentation in the C library}{ diff --git a/man/graph_from_atlas.Rd b/man/graph_from_atlas.Rd index ed23580d945..5ebcd3cad18 100644 --- a/man/graph_from_atlas.Rd +++ b/man/graph_from_atlas.Rd @@ -17,7 +17,7 @@ An igraph graph. } \description{ \code{graph_from_atlas()} creates graphs from the book \sQuote{An Atlas of Graphs} by Roland C. Read and Robin J. Wilson. -The atlas contains all undirected graphs with up to seven vertices, numbered from 0 up to 1252. The graphs are listed: + The atlas contains all undirected graphs with up to seven vertices, numbered from 0 up to 1252. The graphs are listed: \enumerate{ \item in increasing order of number of nodes; \item for a fixed number of nodes, in increasing order of the number @@ -26,7 +26,7 @@ of edges; the degree sequence, for example 111223 < 112222; \item for fixed degree sequence, in increasing number of automorphisms. -} + } } \section{Related documentation in the C library}{ \href{https://igraph.org/c/html/0.10.17/igraph-Generators.html#igraph_atlas}{\code{atlas()}} diff --git a/man/graph_from_biadjacency_matrix.Rd b/man/graph_from_biadjacency_matrix.Rd index 89c660736de..7dbb3020ef8 100644 --- a/man/graph_from_biadjacency_matrix.Rd +++ b/man/graph_from_biadjacency_matrix.Rd @@ -16,36 +16,36 @@ graph_from_biadjacency_matrix( } \arguments{ \item{incidence}{The input bipartite adjacency matrix. -It can also be a sparse matrix from the \code{Matrix} package.} + It can also be a sparse matrix from the \code{Matrix} package.} \item{...}{These dots are for future extensions and must be empty.} \item{directed}{Logical, whether to create a directed graph.} \item{mode}{A character constant, defines the direction of the edges in directed graphs, ignored for undirected graphs. -If \sQuote{\code{out}}, + If \sQuote{\code{out}}, then edges go from vertices of the first kind (corresponding to rows in the bipartite adjacency matrix) to vertices of the second kind (columns in the incidence matrix). -If \sQuote{\verb{in}}, then the opposite direction is used. -If \sQuote{\code{all}} or \sQuote{\code{total}}, then mutual edges are created.} + If \sQuote{\verb{in}}, then the opposite direction is used. + If \sQuote{\code{all}} or \sQuote{\code{total}}, then mutual edges are created.} \item{multiple}{Logical, specifies how to interpret the matrix elements. -See details below.} + See details below.} \item{weighted}{This argument specifies whether to create a weighted graph from the bipartite adjacency matrix. -If it is \code{NULL} then an unweighted graph is created and the \code{multiple} argument is used to determine the edges of the graph. -If it is a character constant then for every non-zero matrix entry an edge is created and the value of the entry is added as an edge attribute named by the \code{weighted} argument. -If it is \code{TRUE} then a weighted graph is created and the name of the edge attribute will be \sQuote{\code{weight}}.} + If it is \code{NULL} then an unweighted graph is created and the \code{multiple} argument is used to determine the edges of the graph. + If it is a character constant then for every non-zero matrix entry an edge is created and the value of the entry is added as an edge attribute named by the \code{weighted} argument. + If it is \code{TRUE} then a weighted graph is created and the name of the edge attribute will be \sQuote{\code{weight}}.} \item{add.names}{A character constant, \code{NA} or \code{NULL}. -\code{graph_from_biadjacency_matrix()} can add the row and column names of the incidence matrix as vertex attributes. -If this argument is \code{NULL} (the default) and the bipartite adjacency matrix has both row and column names, + \code{graph_from_biadjacency_matrix()} can add the row and column names of the incidence matrix as vertex attributes. + If this argument is \code{NULL} (the default) and the bipartite adjacency matrix has both row and column names, then these are added as the \sQuote{\code{name}} vertex attribute. -If you want a different vertex attribute for this, then give the name of the attributes as a character string. -If this argument is \code{NA}, then no vertex attributes (other than type) will be added.} + If you want a different vertex attribute for this, then give the name of the attributes as a character string. + If this argument is \code{NA}, then no vertex attributes (other than type) will be added.} } \value{ A bipartite igraph graph. -In other words, an igraph graph that has a vertex attribute \code{type}. + In other words, an igraph graph that has a vertex attribute \code{type}. } \description{ \code{graph_from_biadjacency_matrix()} creates a bipartite igraph graph from an incidence matrix. @@ -55,8 +55,8 @@ Bipartite graphs have a \sQuote{\code{type}} vertex attribute in igraph, this is boolean and \code{FALSE} for the vertices of the first kind and \code{TRUE} for vertices of the second kind. \code{graph_from_biadjacency_matrix()} can operate in two modes, depending on the \code{multiple} argument. -If it is \code{FALSE} then a single edge is created for every non-zero element in the bipartite adjacency matrix. -If \code{multiple} is \code{TRUE}, + If it is \code{FALSE} then a single edge is created for every non-zero element in the bipartite adjacency matrix. + If \code{multiple} is \code{TRUE}, then the matrix elements are rounded up to the closest non-negative integer to get the number of edges to create between a pair of vertices. Some authors refer to the bipartite adjacency matrix as the "bipartite incidence matrix". igraph 1.6.0 and later does not use this naming to avoid confusion with the edge-vertex incidence matrix. diff --git a/man/graph_from_data_frame.Rd b/man/graph_from_data_frame.Rd index 0012ae1ab89..f72c0904685 100644 --- a/man/graph_from_data_frame.Rd +++ b/man/graph_from_data_frame.Rd @@ -13,19 +13,19 @@ graph_from_data_frame(d, directed = TRUE, ..., vertices = NULL) \item{x}{An igraph object.} \item{what}{Character constant, whether to return info about vertices, edges, or both. -The default is \sQuote{edges}.} + The default is \sQuote{edges}.} \item{d}{A data frame containing a symbolic edge list in the first two columns. -Additional columns are considered as edge attributes. -Since version 0.7 this argument is coerced to a data frame with \code{as.data.frame}.} + Additional columns are considered as edge attributes. + Since version 0.7 this argument is coerced to a data frame with \code{as.data.frame}.} \item{directed}{Logical, whether or not to create a directed graph.} \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 with \code{as.data.frame}, if not \code{NULL}.} + See details below. + Since version 0.7 this argument is coerced to a data frame with \code{as.data.frame}, if not \code{NULL}.} } \value{ An igraph graph object for \code{graph_from_data_frame()}, @@ -36,16 +36,16 @@ This function creates an igraph graph from one or two data frames containing the } \details{ \code{graph_from_data_frame()} creates igraph graphs from one or two data frames. -It has two modes of operation, depending whether the \code{vertices} argument is \code{NULL} or not. + It has two modes of operation, depending whether the \code{vertices} argument is \code{NULL} or not. If \code{vertices} is \code{NULL}, then the first two columns of \code{d} are used as a symbolic edge list and additional columns as edge attributes. -The names of the attributes are taken from the names of the columns. + The names of the attributes are taken from the names of the columns. If \code{vertices} is not \code{NULL}, then it must be a data frame giving vertex metadata. -The first column of \code{vertices} is assumed to contain symbolic vertex names, + The first column of \code{vertices} is assumed to contain symbolic vertex names, this will be added to the graphs as the \sQuote{\code{name}} vertex attribute. -Other columns will be added as additional vertex attributes. -If \code{vertices} is not \code{NULL} then the symbolic edge list given in \code{d} is checked to contain only vertex names listed in \code{vertices}. + Other columns will be added as additional vertex attributes. + If \code{vertices} is not \code{NULL} then the symbolic edge list given in \code{d} is checked to contain only vertex names listed in \code{vertices}. Typically, the data frames are exported from some spreadsheet software like Excel and are imported into R via \code{\link[=read.table]{read.table()}}, \code{\link[=read.delim]{read.delim()}} or \code{\link[=read.csv]{read.csv()}}. @@ -55,25 +55,25 @@ All edges in the data frame are included in the graph, which may include multipl \code{as_data_frame()} converts the igraph graph into one or more data frames, depending on the \code{what} argument. If the \code{what} argument is \code{edges} (the default), then the edges of the graph and also the edge attributes are returned. -The edges will be in the first two columns, named \code{from} and \code{to}. -(This also denotes edge direction for directed graphs.) -For named graphs, the vertex names will be included in these columns, for other graphs, the numeric vertex IDs. -The edge attributes will be in the other columns. -It is not a good idea to have an edge attribute named \code{from} or \code{to}, because then the column named in the data frame will not be unique. -The edges are listed in the order of their numeric IDs. + The edges will be in the first two columns, named \code{from} and \code{to}. + (This also denotes edge direction for directed graphs.) + For named graphs, the vertex names will be included in these columns, for other graphs, the numeric vertex IDs. + The edge attributes will be in the other columns. + It is not a good idea to have an edge attribute named \code{from} or \code{to}, because then the column named in the data frame will not be unique. + The edges are listed in the order of their numeric IDs. If the \code{what} argument is \code{vertices}, then vertex attributes are returned. -Vertices are listed in the order of their numeric vertex IDs. + Vertices are listed in the order of their numeric vertex IDs. If the \code{what} argument is \code{both}, then both vertex and edge data is returned, in a list with named entries \code{vertices} and \code{edges}. } \note{ For \code{graph_from_data_frame()} \code{NA} elements in the first two columns \sQuote{d} are replaced by the string \dQuote{NA} before creating the graph. -This means that all \code{NA}s will correspond to a single vertex. + This means that all \code{NA}s will correspond to a single vertex. \code{NA} elements in the first column of \sQuote{vertices} are also replaced by the string \dQuote{NA}, but the rest of \sQuote{vertices} is not touched. -In other words, vertex names (=the first column) cannot be \code{NA}, but other vertex attributes can. + In other words, vertex names (=the first column) cannot be \code{NA}, but other vertex attributes can. } \section{Related documentation in the C library}{ \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_get_edgelist}{\code{get_edgelist()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_add_vertices}{\code{add_vertices()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_empty}{\code{empty()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_edges}{\code{edges()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_get_eids}{\code{get_eids()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_ecount}{\code{ecount()}} @@ -110,7 +110,7 @@ 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. -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_()}}. + 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 d7113b72f37..0fdc16e6506 100644 --- a/man/graph_from_edgelist.Rd +++ b/man/graph_from_edgelist.Rd @@ -18,9 +18,9 @@ An igraph graph. } \description{ \code{graph_from_edgelist()} creates a graph from an edge list. -Its argument is a two-column matrix, each row defines one edge. -If it is a numeric matrix then its elements are interpreted as vertex IDs. -If it is a character matrix then it is interpreted as symbolic vertex names and a vertex ID will be assigned to each name, + Its argument is a two-column matrix, each row defines one edge. + If it is a numeric matrix then its elements are interpreted as vertex IDs. + If it is a character matrix then it is interpreted as symbolic vertex names and a vertex ID will be assigned to each name, and also a \code{name} vertex attribute will be added. } \section{Related documentation in the C library}{ diff --git a/man/graph_from_graphdb.Rd b/man/graph_from_graphdb.Rd index 04fc7ac7fce..a509a870cff 100644 --- a/man/graph_from_graphdb.Rd +++ b/man/graph_from_graphdb.Rd @@ -19,33 +19,33 @@ graph_from_graphdb( } \arguments{ \item{url}{Complete URL with the file to import. -Default: \code{NULL}.} + Default: \code{NULL}.} \item{...}{These dots are for future extensions and must be empty.} \item{prefix}{Gives the prefix. -See details below. -Possible values: \code{iso}, \code{i2}, \code{si4}, \code{si6}, \code{mcs10}, \code{mcs30}, \code{mcs50}, \code{mcs70}, \code{mcs90}.} + See details below. + Possible values: \code{iso}, \code{i2}, \code{si4}, \code{si6}, \code{mcs10}, \code{mcs30}, \code{mcs50}, \code{mcs70}, \code{mcs90}.} \item{type}{Gives the graph type identifier. -See details below. -Possible values: \code{r001}, \code{r005}, \code{r01}, \code{r02}, \code{m2D}, \code{m2Dr2}, \code{m2Dr4}, \code{m2Dr6} \code{m3D}, \code{m3Dr2}, \code{m3Dr4}, \code{m3Dr6}, \code{m4D}, \code{m4Dr2}, + See details below. + Possible values: \code{r001}, \code{r005}, \code{r01}, \code{r02}, \code{m2D}, \code{m2Dr2}, \code{m2Dr4}, \code{m2Dr6} \code{m3D}, \code{m3Dr2}, \code{m3Dr4}, \code{m3Dr6}, \code{m4D}, \code{m4Dr2}, \code{m4Dr4}, \code{m4Dr6}, \code{b03}, \code{b03m}, \code{b06}, \code{b06m}, \code{b09}, \code{b09m}.} \item{nodes}{The number of vertices in the graph.} \item{pair}{Specifies which graph of the pair to read. -Possible values: \code{A} and \code{B}.} + Possible values: \code{A} and \code{B}.} \item{which}{Gives the number of the graph to read. -For every graph type there are a number of actual graphs in the database. -This argument specifies which one to read.} + For every graph type there are a number of actual graphs in the database. + This argument specifies which one to read.} \item{base}{The base address of the database. -See details below.} + See details below.} \item{compressed}{Logical, if TRUE than the file is expected to be compressed by gzip. -If \code{url} is \code{NULL} then a \sQuote{\code{.gz}} suffix is added to the filename.} + If \code{url} is \code{NULL} then a \sQuote{\code{.gz}} suffix is added to the filename.} \item{directed}{Logical, whether to create a directed graph.} } @@ -57,10 +57,10 @@ This function downloads a graph from a database created for the evaluation of gr } \details{ \code{graph_from_graphdb()} reads a graph from the graph database from an FTP or HTTP server or from a local copy. -It has two modes of operation: + It has two modes of operation: If the \code{url} argument is specified then it should the complete path to a local or remote graph database file. -In this case we simply call \code{\link[=read_graph]{read_graph()}} with the proper arguments to read the file. + In this case we simply call \code{\link[=read_graph]{read_graph()}} with the proper arguments to read the file. If \code{url} is \code{NULL}, and this is the default, then the filename is assembled from the \code{base}, \code{prefix}, \code{type}, \code{nodes}, \code{pair} and \code{which} arguments. diff --git a/man/graph_from_graphnel.Rd b/man/graph_from_graphnel.Rd index 77a1c9149a3..65a824e5a44 100644 --- a/man/graph_from_graphnel.Rd +++ b/man/graph_from_graphnel.Rd @@ -20,7 +20,7 @@ graph_from_graphnel( \item{name}{Logical, whether to add graphNEL vertex names as an igraph vertex attribute called \sQuote{\code{name}}.} \item{weight}{Logical, whether to add graphNEL edge weights as an igraph edge attribute called \sQuote{\code{weight}}. -(graphNEL graphs are always weighted.)} + (graphNEL graphs are always weighted.)} \item{unlist.attrs}{Logical. graphNEL attribute query functions return the values of the attributes in R lists, if this argument is \code{TRUE} (the default) these will be converted to atomic vectors, whenever possible, @@ -31,9 +31,9 @@ before adding them to the igraph graph.} } \description{ The graphNEL class is defined in the \code{graph} package, it is another way to represent graphs. -\code{graph_from_graphnel()} takes a graphNEL graph and converts it to an igraph graph. -It handles all graph/vertex/edge attributes. -If the graphNEL graph has a vertex attribute called \sQuote{\code{name}} it will be used as igraph vertex attribute \sQuote{\code{name}} and the graphNEL vertex names will be ignored. + \code{graph_from_graphnel()} takes a graphNEL graph and converts it to an igraph graph. + It handles all graph/vertex/edge attributes. + If the graphNEL graph has a vertex attribute called \sQuote{\code{name}} it will be used as igraph vertex attribute \sQuote{\code{name}} and the graphNEL vertex names will be ignored. } \details{ Because graphNEL graphs poorly support multiple edges, the edge attributes of the multiple edges are lost: diff --git a/man/graph_from_isomorphism_class.Rd b/man/graph_from_isomorphism_class.Rd index 5788576c68f..a079c25244d 100644 --- a/man/graph_from_isomorphism_class.Rd +++ b/man/graph_from_isomorphism_class.Rd @@ -20,8 +20,8 @@ An igraph object, the graph of the given size, directedness and isomorphism clas } \description{ The isomorphism class is a non-negative integer number. -Graphs (with the same number of vertices) having the same isomorphism class are isomorphic and isomorphic graphs always have the same isomorphism class. -Currently it can handle directed graphs with 3 or 4 vertices and undirected graphd with 3 to 6 vertices. + Graphs (with the same number of vertices) having the same isomorphism class are isomorphic and isomorphic graphs always have the same isomorphism class. + Currently it can handle directed graphs with 3 or 4 vertices and undirected graphd with 3 to 6 vertices. } \section{Related documentation in the C library}{ \href{https://igraph.org/c/html/0.10.17/igraph-Isomorphism.html#igraph_isoclass_create}{\code{isoclass_create()}} diff --git a/man/graph_from_lcf.Rd b/man/graph_from_lcf.Rd index 7b21ec71d8e..5a4f587908a 100644 --- a/man/graph_from_lcf.Rd +++ b/man/graph_from_lcf.Rd @@ -12,7 +12,7 @@ graph_from_lcf(shifts, ..., n = NULL, repeats = 1L) \item{...}{These dots are for future extensions and must be empty.} \item{n}{Integer, the number of vertices in the graph. -If \code{NULL} (default), it is set to \code{len(shifts) * repeats}.} + If \code{NULL} (default), it is set to \code{len(shifts) * repeats}.} \item{repeats}{Integer constant, how many times to repeat the shifts.} } @@ -21,9 +21,9 @@ A graph object. } \description{ LCF is short for Lederberg-Coxeter-Frucht, it is a concise notation for 3-regular Hamiltonian graphs. -It constists of three parameters, the number of vertices in the graph, + It constists of three parameters, the number of vertices in the graph, a list of shifts giving additional edges to a cycle backbone and another integer giving how many times the shifts should be performed. -See \url{https://mathworld.wolfram.com/LCFNotation.html} for details. + See \url{https://mathworld.wolfram.com/LCFNotation.html} for details. } \section{Related documentation in the C library}{ \href{https://igraph.org/c/html/0.10.17/igraph-Generators.html#igraph_lcf_vector}{\code{lcf_vector()}} diff --git a/man/graph_from_literal.Rd b/man/graph_from_literal.Rd index be7981a9a54..a9f72216a1d 100644 --- a/man/graph_from_literal.Rd +++ b/man/graph_from_literal.Rd @@ -11,13 +11,13 @@ from_literal(...) } \arguments{ \item{...}{For \code{graph_from_literal()} the formulae giving the structure of the graph, see details below. -For \code{from_literal()} all arguments are passed to \code{graph_from_literal()}.} + For \code{from_literal()} all arguments are passed to \code{graph_from_literal()}.} \item{simplify}{Logical, whether to call \code{\link[=simplify]{simplify()}} on the created graph. -By default the graph is simplified, loop and multiple edges are removed. -\code{\link[=simplify]{simplify()}} is only called when the created graph is not already simple, + By default the graph is simplified, loop and multiple edges are removed. + \code{\link[=simplify]{simplify()}} is only called when the created graph is not already simple, so the edge order from the formula is preserved whenever no loops or multi-edges are present. -When the graph does contain loops or multi-edges (and \code{simplify = TRUE}), \code{\link[=simplify]{simplify()}} reorders the edges into its canonical order.} + When the graph does contain loops or multi-edges (and \code{simplify = TRUE}), \code{\link[=simplify]{simplify()}} reorders the edges into its canonical order.} } \value{ An igraph graph @@ -27,17 +27,17 @@ This function is useful if you want to create a small (named) graph quickly, it } \details{ \code{graph_from_literal()} is very handy for creating small graphs quickly. -You need to supply one or more R expressions giving the structure of the graph. -The expressions consist of vertex names and edge operators. -An edge operator is a sequence of \sQuote{\code{-}} and \sQuote{\code{+}} characters, + You need to supply one or more R expressions giving the structure of the graph. + The expressions consist of vertex names and edge operators. + An edge operator is a sequence of \sQuote{\code{-}} and \sQuote{\code{+}} characters, the former is for the edges and the latter is used for arrow heads. -The edges can be arbitrarily long, i.e. you may use as many \sQuote{\code{-}} characters to \dQuote{draw} them as you like. + The edges can be arbitrarily long, i.e. you may use as many \sQuote{\code{-}} characters to \dQuote{draw} them as you like. If all edge operators consist of only \sQuote{\code{-}} characters then the graph will be undirected, whereas a single \sQuote{\code{+}} character implies a directed graph. Let us see some simple examples. -Without arguments the function creates an empty graph: + Without arguments the function creates an empty graph: \preformatted{ graph_from_literal() } @@ -50,13 +50,13 @@ Remember that the length of the edges does not matter, so we could have written } If you have many disconnected components in the graph, separate them with commas. -You can also give isolate vertices. -\preformatted{ graph_from_literal( A--B, C--D, E--F, G--H, I, J, K ) + You can also give isolate vertices. + \preformatted{ graph_from_literal( A--B, C--D, E--F, G--H, I, J, K ) } The \sQuote{\code{:}} operator can be used to define vertex sets. -If an edge operator connects two vertex sets then every vertex from the first set will be connected to every vertex in the second set. -The following form creates a full graph, including loop edges: + If an edge operator connects two vertex sets then every vertex from the first set will be connected to every vertex in the second set. + The following form creates a full graph, including loop edges: \preformatted{ graph_from_literal( A:B:C:D -- A:B:C:D ) } diff --git a/man/graph_id.Rd b/man/graph_id.Rd index e197340c2a9..8b5a578de27 100644 --- a/man/graph_id.Rd +++ b/man/graph_id.Rd @@ -13,12 +13,12 @@ graph_id(x, ...) } \value{ The ID of the graph, a character scalar. -For vertex and edge sequences the ID of the graph they were created from. + For vertex and edge sequences the ID of the graph they were created from. } \description{ Graph IDs are used to check that a vertex or edge sequence belongs to a graph. -If you create a new graph by changing the structure of a graph, the new graph will have a new ID. -Changing the attributes will not change the ID. + If you create a new graph by changing the structure of a graph, the new graph will have a new ID. + Changing the attributes will not change the ID. } \examples{ g <- make_ring(10) diff --git a/man/graph_version.Rd b/man/graph_version.Rd index 3bc741104e4..2f090d08626 100644 --- a/man/graph_version.Rd +++ b/man/graph_version.Rd @@ -8,14 +8,14 @@ graph_version(graph) } \arguments{ \item{graph}{The input graph. -If it is missing, then the version number of the current data format is returned.} + If it is missing, then the version number of the current data format is returned.} } \value{ An integer scalar. } \description{ igraph's internal data representation changes sometimes between versions. -This means that it is not always possible to use igraph objects that were created (and possibly saved to a file) with an older igraph version. + This means that it is not always possible to use igraph objects that were created (and possibly saved to a file) with an older igraph version. } \details{ \code{graph_version()} queries the current data format, diff --git a/man/graphlet_basis.Rd b/man/graphlet_basis.Rd index dafcd1a858a..ef9e25bbf2e 100644 --- a/man/graphlet_basis.Rd +++ b/man/graphlet_basis.Rd @@ -14,56 +14,56 @@ graphlets(graph, ..., weights = NULL, niter = 1000) } \arguments{ \item{graph}{The input graph, edge directions are ignored. -Only simple graph (i.e. graphs without self-loops and multiple edges) are supported.} + Only simple graph (i.e. graphs without self-loops and multiple edges) are supported.} \item{...}{These dots are for future extensions and must be empty.} \item{weights}{Edge weights. -If the graph has a \code{weight} edge attribute and this argument is \code{NULL} (the default), then the \code{weight} edge attribute is used.} + If the graph has a \code{weight} edge attribute and this argument is \code{NULL} (the default), then the \code{weight} edge attribute is used.} \item{cliques}{A list of vertex IDs, the graphlet basis to use for the projection.} \item{niter}{Integer scalar, the number of iterations to perform.} \item{Mu}{Starting weights for the projection. -The default \code{NULL} uses a weight of one for each clique.} + The default \code{NULL} uses a weight of one for each clique.} } \value{ \code{graphlets()} returns a list with two members: \describe{ \item{cliques}{ A list of subgraphs, the candidate graphlet basis. -Each subgraph is give by a vector of vertex IDs. -} + Each subgraph is give by a vector of vertex IDs. + } \item{Mu}{ The weights of the subgraphs in graphlet basis. -} + } } \code{graphlet_basis()} returns a list of two elements: \describe{ \item{cliques}{ A list of subgraphs, the candidate graphlet basis. -Each subgraph is give by a vector of vertex IDs. -} + Each subgraph is give by a vector of vertex IDs. + } \item{thresholds}{ The weight thresholds used for finding the subgraphs. -} + } } \code{graphlet_proj()} return a numeric vector, the weights of the graphlet basis subgraphs. } \description{ Graphlet decomposition models a weighted undirected graph via the union of potentially overlapping dense social groups. -This is done by a two-step algorithm. -In the first step a candidate set of groups (a candidate basis) is created by finding cliques if the thresholded input graph. -In the second step these the graph is projected on the candidate basis, + This is done by a two-step algorithm. + In the first step a candidate set of groups (a candidate basis) is created by finding cliques if the thresholded input graph. + In the second step these the graph is projected on the candidate basis, resulting a weight coefficient for each clique in the candidate basis. } \details{ igraph contains three functions for performing the graph decomponsition of a graph. -The first is \code{graphlets()}, which performed both steps on the method and returns a list of subgraphs, with their corresponding weights. -The second and third functions correspond to the first and second steps of the algorithm, + The first is \code{graphlets()}, which performed both steps on the method and returns a list of subgraphs, with their corresponding weights. + The second and third functions correspond to the first and second steps of the algorithm, and they are useful if the user wishes to perform them individually: \code{graphlet_basis()} and \code{graphlet_proj()}. } \section{Related documentation in the C library}{ diff --git a/man/graphlets.candidate.basis.Rd b/man/graphlets.candidate.basis.Rd index 686c8400d54..56ed4d41aa6 100644 --- a/man/graphlets.candidate.basis.Rd +++ b/man/graphlets.candidate.basis.Rd @@ -8,10 +8,10 @@ graphlets.candidate.basis(graph, weights = NULL) } \arguments{ \item{graph}{The input graph, edge directions are ignored. -Only simple graph (i.e. graphs without self-loops and multiple edges) are supported.} + Only simple graph (i.e. graphs without self-loops and multiple edges) are supported.} \item{weights}{Edge weights. -If the graph has a \code{weight} edge attribute and this argument is \code{NULL} (the default), then the \code{weight} edge attribute is used.} + If the graph has a \code{weight} edge attribute and this argument is \code{NULL} (the default), then the \code{weight} edge attribute is used.} } \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/graphlets.project.Rd b/man/graphlets.project.Rd index ab77aef46a7..be655a64f94 100644 --- a/man/graphlets.project.Rd +++ b/man/graphlets.project.Rd @@ -14,17 +14,17 @@ graphlets.project( } \arguments{ \item{graph}{The input graph, edge directions are ignored. -Only simple graph (i.e. graphs without self-loops and multiple edges) are supported.} + Only simple graph (i.e. graphs without self-loops and multiple edges) are supported.} \item{weights}{Edge weights. -If the graph has a \code{weight} edge attribute and this argument is \code{NULL} (the default), then the \code{weight} edge attribute is used.} + If the graph has a \code{weight} edge attribute and this argument is \code{NULL} (the default), then the \code{weight} edge attribute is used.} \item{cliques}{A list of vertex IDs, the graphlet basis to use for the projection.} \item{niter}{Integer scalar, the number of iterations to perform.} \item{Mu}{Starting weights for the projection. -The default \code{NULL} uses a weight of one for each clique.} + The default \code{NULL} uses a weight of one for each clique.} } \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/greedy_vertex_coloring.Rd b/man/greedy_vertex_coloring.Rd index 238bcebed88..a59494dbb81 100644 --- a/man/greedy_vertex_coloring.Rd +++ b/man/greedy_vertex_coloring.Rd @@ -16,8 +16,8 @@ greedy_vertex_coloring( \item{...}{These dots are for future extensions and must be empty.} \item{heuristic}{The selection heuristic for the next vertex to consider. -Possible values are: \dQuote{colored_neighbors} selects the vertex with the largest number of already colored neighbors. -\dQuote{dsatur} selects the vertex with the largest number of unique colors in its neighborhood, i.e. its "saturation degree"; + Possible values are: \dQuote{colored_neighbors} selects the vertex with the largest number of already colored neighbors. + \dQuote{dsatur} selects the vertex with the largest number of unique colors in its neighborhood, i.e. its "saturation degree"; when there are several maximum saturation degree vertices, the one with the most uncolored neighbors will be selected.} } \value{ @@ -28,9 +28,9 @@ A numeric vector where item \code{i} contains the color index associated to vert } \details{ The goal of vertex coloring is to assign a "color" (represented as a positive integer) to each vertex of the graph such that neighboring vertices never have the same color. -This function solves the problem by considering the vertices one by one according to a heuristic, + This function solves the problem by considering the vertices one by one according to a heuristic, always choosing the smallest color that differs from that of already colored neighbors. -The coloring obtained this way is not necessarily minimum but it can be calculated in linear time. + The coloring obtained this way is not necessarily minimum but it can be calculated in linear time. } \section{Related documentation in the C library}{ \href{https://igraph.org/c/html/0.10.17/igraph-Coloring.html#igraph_vertex_coloring_greedy}{\code{vertex_coloring_greedy()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}} diff --git a/man/groups.Rd b/man/groups.Rd index 4570eafe08b..326ca4d6172 100644 --- a/man/groups.Rd +++ b/man/groups.Rd @@ -10,20 +10,20 @@ groups(x) } \arguments{ \item{x}{Some object that represents a grouping of the vertices. -See details below.} + See details below.} } \value{ A named list of numeric or character vectors. -The names are just numbers that refer to the groups. -The vectors themselves are numeric or symbolic vertex IDs. + The names are just numbers that refer to the groups. + The vectors themselves are numeric or symbolic vertex IDs. } \description{ Create a list of vertex groups from some graph clustering or community structure. } \details{ Currently two methods are defined for this function. -The default method works on the output of \code{\link[=components]{components()}}. -(In fact it works on any object that is a list with an entry called \code{membership}.) + The default method works on the output of \code{\link[=components]{components()}}. + (In fact it works on any object that is a list with an entry called \code{membership}.) The second method works on \code{\link[=communities]{communities()}} objects. } diff --git a/man/growing.random.game.Rd b/man/growing.random.game.Rd index 3175df616fa..1ede4447944 100644 --- a/man/growing.random.game.Rd +++ b/man/growing.random.game.Rd @@ -14,7 +14,7 @@ growing.random.game(n, m = 1, directed = TRUE, citation = FALSE) \item{directed}{Logical, whether to create a directed graph.} \item{citation}{Logical. -If \code{TRUE} a citation graph is created, i.e. in each time step the added edges are originating from the new vertex.} + If \code{TRUE} a citation graph is created, i.e. in each time step the added edges are originating from the new vertex.} } \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/handle_vertex_type_arg.Rd b/man/handle_vertex_type_arg.Rd index d3e7c408808..d53e9be7a30 100644 --- a/man/handle_vertex_type_arg.Rd +++ b/man/handle_vertex_type_arg.Rd @@ -22,7 +22,7 @@ This function takes the \code{types} and \code{graph} arguments from a public ig \details{ When the provided vertex types are NULL and the graph has a \code{types} vertex attribute, then the value of this vertex attribute will be used as vertex types. -Non-logical vertex type vectors are coerced into logical vectors after printing a warning. + Non-logical vertex type vectors are coerced into logical vectors after printing a warning. } \section{Related documentation in the C library}{ \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}} diff --git a/man/harmonic_centrality.Rd b/man/harmonic_centrality.Rd index f521ff41046..c4d0fc8d7d4 100644 --- a/man/harmonic_centrality.Rd +++ b/man/harmonic_centrality.Rd @@ -18,38 +18,38 @@ harmonic_centrality( \item{graph}{The graph to analyze.} \item{vids}{The vertices for which harmonic centrality will be calculated. -The default \code{NULL} selects all vertices.} + The default \code{NULL} selects all vertices.} \item{...}{These dots are for future extensions and must be empty.} \item{mode}{Character string, defining the types of the paths used for measuring the distance in directed graphs. -\dQuote{out} follows paths along the edge directions only, \dQuote{in} traverses the edges in reverse, + \dQuote{out} follows paths along the edge directions only, \dQuote{in} traverses the edges in reverse, while \dQuote{all} ignores edge directions. -This argument is ignored for undirected graphs.} + This argument is ignored for undirected graphs.} \item{weights}{Optional positive weight vector for calculating weighted harmonic centrality. -If the graph has a \code{weight} edge attribute, then this is used by default. -Weights are used for calculating weighted shortest paths, so they are interpreted as distances.} + If the graph has a \code{weight} edge attribute, then this is used by default. + Weights are used for calculating weighted shortest paths, so they are interpreted as distances.} \item{normalized}{Logical, whether to calculate the normalized harmonic centrality. -If true, the result is the mean inverse path length to other vertices, i.e. it is normalized by the number of vertices minus one. -If false, the result is the sum of inverse path lengths to other vertices.} + If true, the result is the mean inverse path length to other vertices, i.e. it is normalized by the number of vertices minus one. + If false, the result is the sum of inverse path lengths to other vertices.} \item{cutoff}{The maximum path length to consider when calculating the harmonic centrality. -There is no such limit when the cutoff is negative. -Note that zero cutoff means that only paths of at most length 0 are considered.} + There is no such limit when the cutoff is negative. + Note that zero cutoff means that only paths of at most length 0 are considered.} } \value{ Numeric vector with the harmonic centrality scores of all the vertices in \code{v}. } \description{ The harmonic centrality of a vertex is the mean inverse distance to all other vertices. -The inverse distance to an unreachable vertex is considered to be zero. + The inverse distance to an unreachable vertex is considered to be zero. } \details{ The \code{cutoff} argument can be used to restrict the calculation to paths of length \code{cutoff} or smaller only; this can be used for larger graphs to speed up the calculation. -If \code{cutoff} is negative (which is the default), then the function calculates the exact harmonic centrality scores. + If \code{cutoff} is negative (which is the default), then the function calculates the exact harmonic centrality scores. } \section{Related documentation in the C library}{ \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_harmonic_centrality_cutoff}{\code{harmonic_centrality_cutoff()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_edges}{\code{edges()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_get_eids}{\code{get_eids()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_ecount}{\code{ecount()}} diff --git a/man/has_eulerian_path.Rd b/man/has_eulerian_path.Rd index 8bbb14c57c2..50282ebbe42 100644 --- a/man/has_eulerian_path.Rd +++ b/man/has_eulerian_path.Rd @@ -21,30 +21,30 @@ eulerian_cycle(graph) \value{ For \code{has_eulerian_path()} and \code{has_eulerian_cycle()}, a logical value that indicates whether the graph contains an Eulerian path or cycle. -For \code{eulerian_path()} and \code{eulerian_cycle()}, a named list with two entries: + For \code{eulerian_path()} and \code{eulerian_cycle()}, a named list with two entries: \describe{ \item{epath}{ A vector containing the edge IDs along the Eulerian path or cycle. -} + } \item{vpath}{ A vector containing the vertex IDs along the Eulerian path or cycle. -} + } } } \description{ \code{has_eulerian_path()} and \code{has_eulerian_cycle()} checks whether there is an Eulerian path or cycle in the input graph. -\code{eulerian_path()} and \code{eulerian_cycle()} return such a path or cycle if it exists, and throws an error otherwise. + \code{eulerian_path()} and \code{eulerian_cycle()} return such a path or cycle if it exists, and throws an error otherwise. } \details{ \code{has_eulerian_path()} decides whether the input graph has an Eulerian \emph{path}, i.e. a path that passes through every edge of the graph exactly once, and returns a logical value as a result. -\code{eulerian_path()} returns a possible Eulerian path, described with its edge and vertex sequence, + \code{eulerian_path()} returns a possible Eulerian path, described with its edge and vertex sequence, or throws an error if no such path exists. \code{has_eulerian_cycle()} decides whether the input graph has an Eulerian \emph{cycle}, i.e. a path that passes through every edge of the graph exactly once and that returns to its starting point, and returns a logical value as a result. -\code{eulerian_cycle()} returns a possible Eulerian cycle, described with its edge and vertex sequence, + \code{eulerian_cycle()} returns a possible Eulerian cycle, described with its edge and vertex sequence, or throws an error if no such cycle exists. } \section{Related documentation in the C library}{ diff --git a/man/head_of.Rd b/man/head_of.Rd index c368735364d..4a53fdceaa7 100644 --- a/man/head_of.Rd +++ b/man/head_of.Rd @@ -16,7 +16,7 @@ A vertex sequence with the head(s) of the edge(s). } \description{ For undirected graphs, head and tail is not defined. -In this case \code{head_of()} returns vertices incident to the supplied edges, and \code{tail_of()} returns the other end(s) of the edge(s). + In this case \code{head_of()} returns vertices incident to the supplied edges, and \code{tail_of()} returns the other end(s) of the edge(s). } \section{Related documentation in the C library}{ \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_edges}{\code{edges()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_get_eids}{\code{get_eids()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_ecount}{\code{ecount()}} diff --git a/man/head_print.Rd b/man/head_print.Rd index 16974412a1e..6cf3b38ffe2 100644 --- a/man/head_print.Rd +++ b/man/head_print.Rd @@ -15,7 +15,7 @@ head_print( } \arguments{ \item{x}{The object to print, or a callback function. -See \code{\link[=printer_callback]{printer_callback()}} for details.} + See \code{\link[=printer_callback]{printer_callback()}} for details.} \item{max_lines}{Maximum number of lines to print, \emph{not} including the header and the footer.} @@ -26,7 +26,7 @@ otherwise printed using \code{cat}.} otherwise printed using \code{cat}.} \item{omitted_footer}{Footer that is only printed if anything is omitted from the printout. -If a function, then it will be called, otherwise printed using \code{cat}.} + If a function, then it will be called, otherwise printed using \code{cat}.} \item{...}{Extra arguments to pass to \code{print()}.} } diff --git a/man/hits_scores.Rd b/man/hits_scores.Rd index 94f5c84868e..b43cc2cbb4a 100644 --- a/man/hits_scores.Rd +++ b/man/hits_scores.Rd @@ -12,33 +12,33 @@ hits_scores(graph, ..., scale = TRUE, weights = NULL, options = NULL) \item{...}{These dots are for future extensions and must be empty.} \item{scale}{Logical, whether to scale the result to have a maximum score of one. -If no scaling is used then the result vector has unit length in the Euclidean norm.} + If no scaling is used then the result vector has unit length in the Euclidean norm.} \item{weights}{Optional positive weight vector for calculating weighted scores. -If the graph has a \code{weight} edge attribute, then this is used by default. -Pass \code{NA} to ignore the weight attribute. -This function interprets edge weights as connection strengths. -The weights of parallel edges are effectively added up.} + If the graph has a \code{weight} edge attribute, then this is used by default. + Pass \code{NA} to ignore the weight attribute. + This function interprets edge weights as connection strengths. + The weights of parallel edges are effectively added up.} \item{options}{A named list, to override some ARPACK options. -See \code{\link[=arpack]{arpack()}} for details. -The default \code{NULL} uses \code{\link[=arpack_defaults]{arpack_defaults()}}.} + See \code{\link[=arpack]{arpack()}} for details. + The default \code{NULL} uses \code{\link[=arpack_defaults]{arpack_defaults()}}.} } \value{ A named list with members: \describe{ \item{hub}{ The hub score of the vertices. -} + } \item{authority}{ The authority score of the vertices. -} + } \item{value}{ The corresponding eigenvalue of the calculated principal eigenvector. -} + } \item{options}{ Some information about the ARPACK computation, it has the same members as the \code{options} member returned by \code{\link[=arpack]{arpack()}}, see that for documentation. -} + } } } \description{ @@ -72,7 +72,7 @@ as IBM Research Report RJ 10076, May 1997. } \seealso{ \code{\link[=eigen_centrality]{eigen_centrality()}} for eigenvector centrality, \code{\link[=page_rank]{page_rank()}} for the Page Rank scores. -\code{\link[=arpack]{arpack()}} for the underlining machinery of the computation. + \code{\link[=arpack]{arpack()}} for the underlining machinery of the computation. Centrality measures: \code{\link[=alpha_centrality]{alpha_centrality()}}, diff --git a/man/hrg-methods.Rd b/man/hrg-methods.Rd index baf842f570c..f96ed6721cc 100644 --- a/man/hrg-methods.Rd +++ b/man/hrg-methods.Rd @@ -8,9 +8,9 @@ Fitting and sampling hierarchical random graph models. } \details{ A hierarchical random graph is an ensemble of undirected graphs with \eqn{n} vertices. -It is defined via a binary tree with \eqn{n} leaf and \eqn{n-1} internal vertices, + It is defined via a binary tree with \eqn{n} leaf and \eqn{n-1} internal vertices, where the internal vertices are labeled with probabilities. -The probability that two vertices are connected in the random graph is given by the probability label at their closest common ancestor. + The probability that two vertices are connected in the random graph is given by the probability label at their closest common ancestor. Please see references below for more about hierarchical random graphs. diff --git a/man/hrg.Rd b/man/hrg.Rd index 25361eb6bf2..812b39e6f97 100644 --- a/man/hrg.Rd +++ b/man/hrg.Rd @@ -16,8 +16,8 @@ hrg(graph, prob) } \description{ \code{hrg()} creates a HRG from an igraph graph. -The igraph graph must be a directed binary tree, with \eqn{n-1} internal and \eqn{n} leaf vertices. -The \code{prob} argument contains the HRG probability labels for each vertex; these are ignored for leaf vertices. + The igraph graph must be a directed binary tree, with \eqn{n-1} internal and \eqn{n} leaf vertices. + The \code{prob} argument contains the HRG probability labels for each vertex; these are ignored for leaf vertices. } \section{Related documentation in the C library}{ \href{https://igraph.org/c/html/0.10.17/igraph-HRG.html#igraph_hrg_create}{\code{hrg_create()}} diff --git a/man/hrg.consensus.Rd b/man/hrg.consensus.Rd index d29c812e16c..1359133b16c 100644 --- a/man/hrg.consensus.Rd +++ b/man/hrg.consensus.Rd @@ -10,7 +10,7 @@ hrg.consensus(graph, hrg = NULL, start = FALSE, num.samples = 10000) \item{graph}{The graph the models were fitted to.} \item{hrg}{A hierarchical random graph model, in the form of an \code{igraphHRG} object. -\code{consensus_tree()} allows this to be \code{NULL} as well, then a HRG is fitted to the graph first, from a random starting point.} + \code{consensus_tree()} allows this to be \code{NULL} as well, then a HRG is fitted to the graph first, from a random starting point.} \item{start}{Logical, whether to start the fitting/sampling from the supplied \code{igraphHRG} object, or from a random starting point.} diff --git a/man/hrg.fit.Rd b/man/hrg.fit.Rd index ca1af17da48..8ab52a6c60f 100644 --- a/man/hrg.fit.Rd +++ b/man/hrg.fit.Rd @@ -8,15 +8,15 @@ hrg.fit(graph, hrg = NULL, start = FALSE, steps = 0) } \arguments{ \item{graph}{The graph to fit the model to. -Edge directions are ignored in directed graphs.} + Edge directions are ignored in directed graphs.} \item{hrg}{A hierarchical random graph model, in the form of an \code{igraphHRG} object. -\code{fit_hrg()} allows this to be \code{NULL}, in which case a random starting point is used for the fitting.} + \code{fit_hrg()} allows this to be \code{NULL}, in which case a random starting point is used for the fitting.} \item{start}{Logical, whether to start the fitting/sampling from the supplied \code{igraphHRG} object, or from a random starting point.} \item{steps}{The number of MCMC steps to make. -If this is zero, then the MCMC procedure is performed until convergence.} + If this is zero, then the MCMC procedure is performed until convergence.} } \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/hrg.predict.Rd b/man/hrg.predict.Rd index 779a876c372..2af2e218ff9 100644 --- a/man/hrg.predict.Rd +++ b/man/hrg.predict.Rd @@ -14,17 +14,17 @@ hrg.predict( } \arguments{ \item{graph}{The graph to fit the model to. -Edge directions are ignored in directed graphs.} + Edge directions are ignored in directed graphs.} \item{hrg}{A hierarchical random graph model, in the form of an \code{igraphHRG} object. -\code{predict_edges()} allow this to be \code{NULL} as well, then a HRG is fitted to the graph first, from a random starting point.} + \code{predict_edges()} allow this to be \code{NULL} as well, then a HRG is fitted to the graph first, from a random starting point.} \item{start}{Logical, whether to start the fitting/sampling from the supplied \code{igraphHRG} object, or from a random starting point.} \item{num.samples}{Number of samples to use for consensus generation or missing edge prediction.} \item{num.bins}{Number of bins for the edge probabilities. -Give a higher number for a more accurate prediction.} + Give a higher number for a more accurate prediction.} } \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/hub.score.Rd b/man/hub.score.Rd index eb23bb65e95..afe14916974 100644 --- a/man/hub.score.Rd +++ b/man/hub.score.Rd @@ -10,15 +10,15 @@ hub.score(graph, scale = TRUE, weights = NULL, options = arpack_defaults()) \item{graph}{The input graph.} \item{scale}{Logical, whether to scale the result to have a maximum score of one. -If no scaling is used then the result vector has unit length in the Euclidean norm.} + If no scaling is used then the result vector has unit length in the Euclidean norm.} \item{weights}{Optional positive weight vector for calculating weighted scores. -If the graph has a \code{weight} edge attribute, then this is used by default. -This function interprets edge weights as connection strengths. -In the random surfer model, an edge with a larger weight is more likely to be selected by the surfer.} + If the graph has a \code{weight} edge attribute, then this is used by default. + This function interprets edge weights as connection strengths. + In the random surfer model, an edge with a larger weight is more likely to be selected by the surfer.} \item{options}{A named list, to override some ARPACK options. -See \code{\link[=arpack]{arpack()}} for details.} + See \code{\link[=arpack]{arpack()}} for details.} } \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/hub_score.Rd b/man/hub_score.Rd index 41e7660c94d..8157ff8a598 100644 --- a/man/hub_score.Rd +++ b/man/hub_score.Rd @@ -18,15 +18,15 @@ hub_score(graph, scale = TRUE, weights = NULL, options = arpack_defaults()) \item{graph}{The input graph.} \item{scale}{Logical, whether to scale the result to have a maximum score of one. -If no scaling is used then the result vector has unit length in the Euclidean norm.} + If no scaling is used then the result vector has unit length in the Euclidean norm.} \item{weights}{Optional positive weight vector for calculating weighted scores. -If the graph has a \code{weight} edge attribute, then this is used by default. -This function interprets edge weights as connection strengths. -In the random surfer model, an edge with a larger weight is more likely to be selected by the surfer.} + If the graph has a \code{weight} edge attribute, then this is used by default. + This function interprets edge weights as connection strengths. + In the random surfer model, an edge with a larger weight is more likely to be selected by the surfer.} \item{options}{A named list, to override some ARPACK options. -See \code{\link[=arpack]{arpack()}} for details.} + See \code{\link[=arpack]{arpack()}} for details.} } \description{ Kleinberg's authority centrality scores. diff --git a/man/identical_graphs.Rd b/man/identical_graphs.Rd index 6ead78497c7..dcbc41d576a 100644 --- a/man/identical_graphs.Rd +++ b/man/identical_graphs.Rd @@ -19,7 +19,7 @@ Logical scalar \description{ Two graphs are considered identical by this function if and only if they are represented in exactly the same way in the internal R representation. -This means that the two graphs must have the same list of vertices and edges, in exactly the same order, with same directedness, + This means that the two graphs must have the same list of vertices and edges, in exactly the same order, with same directedness, and the two graphs must also have identical graph, vertex and edge attributes. } \details{ diff --git a/man/igraph-attribute-combination.Rd b/man/igraph-attribute-combination.Rd index ff15f7b94fb..96aba285c36 100644 --- a/man/igraph-attribute-combination.Rd +++ b/man/igraph-attribute-combination.Rd @@ -7,11 +7,11 @@ \description{ Many times, when the structure of a graph is modified, vertices/edges map of the original graph map to vertices/edges in the newly created (modified) graph. -For example \code{\link[=simplify]{simplify()}} maps multiple edges to single edges. igraph provides a flexible mechanism to specify what to do with the vertex/edge attributes in these cases. + For example \code{\link[=simplify]{simplify()}} maps multiple edges to single edges. igraph provides a flexible mechanism to specify what to do with the vertex/edge attributes in these cases. } \details{ The functions that support the combination of attributes have one or two extra arguments called \code{vertex.attr.comb} and/or \code{edge.attr.comb} that specify how to perform the mapping of the attributes. -E.g. \code{\link[=contract]{contract()}} contracts many vertices into a single one, + E.g. \code{\link[=contract]{contract()}} contracts many vertices into a single one, the attributes of the vertices can be combined and stores as the vertex attributes of the new graph. The specification of the combination of (vertex or edge) attributes can be @@ -19,18 +19,18 @@ given as \enumerate{ \item a character scalar, \item a function object or \item a list of character scalars and/or function objects. -} + } If it is a character scalar, then it refers to one of the predefined combinations, see their list below. If it is a function, then the given function is expected to perform the combination. -It will be called once for each new vertex/edge in the graph, with a single argument: + It will be called once for each new vertex/edge in the graph, with a single argument: the attribute values of the vertices that map to that single vertex. The third option, a list can be used to specify different combination methods for different attributes. -A named entry of the list corresponds to the attribute with the same name. -An unnamed entry (i.e. if the name is the empty string) of the list specifies the default combination method. -I.e. + A named entry of the list corresponds to the attribute with the same name. + An unnamed entry (i.e. if the name is the empty string) of the list specifies the default combination method. + I.e. \preformatted{list(weight="sum", "ignore")} specifies that the weight of the new edge should be sum of the weights of the corresponding edges in the old graph; and that the rest of the attributes should be ignored (=dropped). @@ -41,60 +41,60 @@ behaviors are predefined: \describe{ \item{"ignore"}{ The attribute is ignored and dropped. -} + } \item{"sum"}{ The sum of the attributes is calculated. -This does not work for character attributes and works for complex attributes + This does not work for character attributes and works for complex attributes only if they have a \code{sum} generic defined. -(E.g. it works for sparse matrices from the \code{Matrix} package, + (E.g. it works for sparse matrices from the \code{Matrix} package, because they have a \code{sum} method.) -} + } \item{"prod"}{ The product of the attributes is calculated. -This does not work for character attributes and works for complex attributes + This does not work for character attributes and works for complex attributes only if they have a \code{prod} function defined. -} + } \item{"min"}{ The minimum of the attributes is calculated and returned. -For character and complex attributes the standard R \code{min} function is used. -} + For character and complex attributes the standard R \code{min} function is used. + } \item{"max"}{ The maximum of the attributes is calculated and returned. -For character and complex attributes the standard R \code{max} function is used. -} + For character and complex attributes the standard R \code{max} function is used. + } \item{"random"}{ Chooses one of the supplied attribute values, uniformly randomly. -For character and complex attributes this is implemented by calling \code{sample}. -} + For character and complex attributes this is implemented by calling \code{sample}. + } \item{"first"}{ Always chooses the first attribute value. -It is implemented by calling the \code{\link[=head]{head()}} function. -} + It is implemented by calling the \code{\link[=head]{head()}} function. + } \item{"last"}{ Always chooses the last attribute value. -It is implemented by calling the \code{\link[=tail]{tail()}} function. -} + It is implemented by calling the \code{\link[=tail]{tail()}} function. + } \item{"mean"}{ The mean of the attributes is calculated and returned. -For character and complex attributes this simply calls the \code{\link[=mean]{mean()}} function. -} + For character and complex attributes this simply calls the \code{\link[=mean]{mean()}} function. + } \item{"median"}{ The median of the attributes is selected. -Calls the R \code{\link[=median]{median()}} function for all attribute types. -} + Calls the R \code{\link[=median]{median()}} function for all attribute types. + } \item{"concat"}{ Concatenate the attributes, using the \code{\link[=c]{c()}} function. -This results almost always a complex attribute. -} + This results almost always a complex attribute. + } \item{"rename"}{ Keep clashing attributes side-by-side under disambiguated names by appending \verb{_1}, \verb{_2}, ... suffixes. -For example, if two graphs each have an attribute called \code{group}, the resulting graph will have attributes \code{group_1} and \code{group_2}, + For example, if two graphs each have an attribute called \code{group}, the resulting graph will have attributes \code{group_1} and \code{group_2}, corresponding to the first and second input graph, respectively. -This is the default for the graph operators \code{\link[=union]{union()}}, \code{\link[=intersection]{intersection()}}, \code{\link[=compose]{compose()}} and \code{\link[=disjoint_union]{disjoint_union()}} + This is the default for the graph operators \code{\link[=union]{union()}}, \code{\link[=intersection]{intersection()}}, \code{\link[=compose]{compose()}} and \code{\link[=disjoint_union]{disjoint_union()}} and preserves their historical behaviour. -Only those operators accept \code{"rename"}; \code{\link[=simplify]{simplify()}} and \code{\link[=contract]{contract()}} will reject it because the rename strategy has no per-element interpretation + Only those operators accept \code{"rename"}; \code{\link[=simplify]{simplify()}} and \code{\link[=contract]{contract()}} will reject it because the rename strategy has no per-element interpretation when many input values collapse into one. -} + } } } @@ -131,7 +131,7 @@ simplify(g, edge.attr.comb = list( } \seealso{ \code{\link[=graph_attr]{graph_attr()}}, \code{\link[=vertex_attr]{vertex_attr()}}, \code{\link[=edge_attr]{edge_attr()}} on how to use graph/vertex/edge attributes in general. -\code{\link[=igraph_options]{igraph_options()}} on igraph parameters. + \code{\link[=igraph_options]{igraph_options()}} on igraph parameters. Vertex, edge and graph attributes: \code{\link[=delete_edge_attr]{delete_edge_attr()}}, diff --git a/man/igraph-dollar.Rd b/man/igraph-dollar.Rd index 707256a14c8..203b93ca3d1 100644 --- a/man/igraph-dollar.Rd +++ b/man/igraph-dollar.Rd @@ -19,7 +19,7 @@ } \description{ The \code{$} operator is a shortcut to get and and set graph attributes. -It is shorter and just as readable as \code{\link[=graph_attr]{graph_attr()}} and \code{\link[=set_graph_attr]{set_graph_attr()}}. + It is shorter and just as readable as \code{\link[=graph_attr]{graph_attr()}} and \code{\link[=set_graph_attr]{set_graph_attr()}}. } \examples{ g <- make_ring(10) diff --git a/man/igraph-es-attributes.Rd b/man/igraph-es-attributes.Rd index 572eeda6136..9be9c92a795 100644 --- a/man/igraph-es-attributes.Rd +++ b/man/igraph-es-attributes.Rd @@ -21,7 +21,7 @@ E(x, path = NULL, P = NULL, directed = NULL) <- value } \arguments{ \item{x}{An edge sequence. -For \verb{E<-} it is a graph.} + For \verb{E<-} it is a graph.} \item{i}{Index.} @@ -32,13 +32,13 @@ For \verb{E<-} it is a graph.} \item{path}{Select edges along a path, given by a vertex sequence See \code{\link[=E]{E()}}.} \item{P}{Select edges via pairs of vertices. -See \code{\link[=E]{E()}}.} + See \code{\link[=E]{E()}}.} \item{directed}{Whether to use edge directions for the \code{path} or \code{P} arguments.} } \value{ A vector or list, containing the values of the attribute \code{name} for the edges in the sequence. -For numeric, character or logical attributes, it is a vector of the appropriate type, otherwise it is a list. + For numeric, character or logical attributes, it is a vector of the appropriate type, otherwise it is a list. } \description{ The \code{$} operator is a syntactic sugar to query and set edge attributes, for edges in an edge sequence. diff --git a/man/igraph-es-indexing.Rd b/man/igraph-es-indexing.Rd index 06248ca6dcc..8911f19af94 100644 --- a/man/igraph-es-indexing.Rd +++ b/man/igraph-es-indexing.Rd @@ -26,7 +26,7 @@ with some extras. When using multiple indices within the bracket, all of them are evaluated independently, and then the results are concatenated using the \code{c()} function. -E.g. \code{E(g)[1, 2, .inc(1)]} is equivalent to \code{c(E(g)[1], E(g)[2], E(g)[.inc(1)])}. + E.g. \code{E(g)[1, 2, .inc(1)]} is equivalent to \code{c(E(g)[1], E(g)[2], E(g)[.inc(1)])}. } \section{Index types}{ @@ -35,32 +35,32 @@ Edge sequences can be indexed with positive numeric vectors, negative numeric vectors, logical vectors, character vectors: \itemize{ \item When indexed with positive numeric vectors, the edges at the given positions in the sequence are selected. -This is the same as indexing a regular R atomic vector with positive numeric vectors. -\item When indexed with negative numeric vectors, the edges at the given positions in the sequence are omitted. -Again, this is the same as indexing a regular R atomic vector. -\item When indexed with a logical vector, the lengths of the edge sequence and the index must match, and the edges for + This is the same as indexing a regular R atomic vector with positive numeric vectors. + \item When indexed with negative numeric vectors, the edges at the given positions in the sequence are omitted. + Again, this is the same as indexing a regular R atomic vector. + \item When indexed with a logical vector, the lengths of the edge sequence and the index must match, and the edges for which the index is \code{TRUE} are selected. -\item Named graphs can be indexed with character vectors, to select edges with the given names. -Note that a graph may have edge names and vertex names, and both can be used to select edges. -Edge names are simply used as names of the numeric edge ID vector. -Vertex names effectively only work in graphs without multiple edges, and must be separated with a \code{|} bar character to select an edges + \item Named graphs can be indexed with character vectors, to select edges with the given names. + Note that a graph may have edge names and vertex names, and both can be used to select edges. + Edge names are simply used as names of the numeric edge ID vector. + Vertex names effectively only work in graphs without multiple edges, and must be separated with a \code{|} bar character to select an edges that incident to the two given vertices. -See examples below. -} + See examples below. + } } \section{Edge attributes}{ When indexing edge sequences, edge attributes can be referred to simply by using their names. -E.g. if a graph has a \code{weight} edge attribute, then \code{E(G)[weight > 1]} selects all edges with a weight larger than one. -See more examples below. -Note that attribute names mask the names of variables present in the calling environment; + E.g. if a graph has a \code{weight} edge attribute, then \code{E(G)[weight > 1]} selects all edges with a weight larger than one. + See more examples below. + Note that attribute names mask the names of variables present in the calling environment; if you need to look up a variable and you do not want a similarly named edge attribute to mask it, use the \code{.env} pronoun to perform the name lookup in the calling environment. -In other words, + In other words, use \code{E(g)[.env$weight > 1]} to make sure that \code{weight} is looked up from the calling environment even if there is an edge attribute with the same name. -Similarly, you can use \code{.data} to match attribute names only. + Similarly, you can use \code{.data} to match attribute names only. } \section{Special functions}{ @@ -69,28 +69,28 @@ There are some special igraph functions that can be used only in expressions ind \describe{ \item{\code{.inc}}{ takes a vertex sequence, and selects all edges that have at least one incident vertex in the vertex sequence. -} + } \item{\code{.from}}{ similar to \code{.inc()}, but only the tails of the edges are considered. -} + } \item{\code{.to}}{ is similar to \code{.inc()}, but only the heads of the edges are considered. -} + } \item{\verb{\\\%--\\\%}}{ a special operator that can be used to select all edges between two sets of vertices. -It ignores the edge directions in directed graphs. -} + It ignores the edge directions in directed graphs. + } \item{\verb{\\\%->\\\%}}{ similar to \verb{\\\%--\\\%}, but edges \emph{from} the left hand side argument, pointing \emph{to} the right hand side argument, are selected, in directed graphs. -} + } \item{\verb{\\\%<-\\\%}}{ similar to \verb{\\\%--\\\%}, but edges \emph{to} the left hand side argument, pointing \emph{from} the right hand side argument, are selected, in directed graphs. -} + } } Note that multiple special functions can be used together, or with regular indices, and then their results are concatenated. -See more examples below. + See more examples below. } \examples{ diff --git a/man/igraph-es-indexing2.Rd b/man/igraph-es-indexing2.Rd index cb93eb0537f..8f54ec47e7c 100644 --- a/man/igraph-es-indexing2.Rd +++ b/man/igraph-es-indexing2.Rd @@ -14,7 +14,7 @@ } \value{ Another edge sequence, with metadata printing turned on. -See details below. + See details below. } \description{ The double bracket operator can be used on edge sequences, to print the meta-data (edge attributes) of the edges in the sequence. diff --git a/man/igraph-minus.Rd b/man/igraph-minus.Rd index 130c579f0a8..aaea8786108 100644 --- a/man/igraph-minus.Rd +++ b/man/igraph-minus.Rd @@ -20,23 +20,23 @@ Delete vertices or edges from a graph } \details{ The minus operator (\sQuote{\code{-}}) can be used to remove vertices or edges from the graph. -The operation performed is selected based on the type of the right hand side argument: + The operation performed is selected based on the type of the right hand side argument: \itemize{ \item If it is an igraph graph object, then the difference of the two graphs is calculated, see \code{\link[=difference]{difference()}}. -\item If it is a numeric or character vector, then it is interpreted + \item If it is a numeric or character vector, then it is interpreted as a vector of vertex IDs and the specified vertices will be deleted from the graph. Example: \preformatted{ g <- make_ring(10) V(g)$name <- letters[1:10] g <- g - c("a", "b")} \item If \code{e2} is a vertex sequence (e.g. created by the \code{\link[=V]{V()}} function), then these vertices will be deleted from the graph. -\item If it is an edge sequence (e.g. created by the \code{\link[=E]{E()}} function), then these edges will be deleted from the graph. -\item If it is an object created with the \code{\link[=vertex]{vertex()}} (or the \code{\link[=vertices]{vertices()}}) function, then all arguments of \code{\link[=vertices]{vertices()}} are concatenated + \item If it is an edge sequence (e.g. created by the \code{\link[=E]{E()}} function), then these edges will be deleted from the graph. + \item If it is an object created with the \code{\link[=vertex]{vertex()}} (or the \code{\link[=vertices]{vertices()}}) function, then all arguments of \code{\link[=vertices]{vertices()}} are concatenated and the result is interpreted as a vector of vertex IDs. -These vertices will be removed from the graph. -\item If it is an object created with the \code{\link[=edge]{edge()}} (or the \code{\link[=edges]{edges()}}) function, then all arguments of \code{\link[=edges]{edges()}} are concatenated and + These vertices will be removed from the graph. + \item If it is an object created with the \code{\link[=edge]{edge()}} (or the \code{\link[=edges]{edges()}}) function, then all arguments of \code{\link[=edges]{edges()}} are concatenated and then interpreted as edges to be removed from the graph. -Example: \preformatted{ g <- make_ring(10) + Example: \preformatted{ g <- make_ring(10) V(g)$name <- letters[1:10] E(g)$name <- LETTERS[1:10] g <- g - edge("e|f") @@ -44,7 +44,7 @@ g <- g - edge("H")} \item If it is an object created with the \code{\link[=path]{path()}} function, then all \code{\link[=path]{path()}} arguments are concatenated and then interpreted as a path along which edges will be removed from the graph. -Example: \preformatted{ g <- make_ring(10) + Example: \preformatted{ g <- make_ring(10) V(g)$name <- letters[1:10] g <- g - path("a", "b", "c", "d")} } diff --git a/man/igraph-vs-attributes.Rd b/man/igraph-vs-attributes.Rd index 554dcfbe0f1..f34059a6cb6 100644 --- a/man/igraph-vs-attributes.Rd +++ b/man/igraph-vs-attributes.Rd @@ -21,7 +21,7 @@ V(x) <- value } \arguments{ \item{x}{A vertex sequence. -For \verb{V<-} it is a graph.} + For \verb{V<-} it is a graph.} \item{i}{Index.} @@ -31,7 +31,7 @@ For \verb{V<-} it is a graph.} } \value{ A vector or list, containing the values of attribute \code{name} for the vertices in the vertex sequence. -For numeric, character or logical attributes, it is a vector of the appropriate type, otherwise it is a list. + For numeric, character or logical attributes, it is a vector of the appropriate type, otherwise it is a list. } \description{ The \code{$} operator is a syntactic sugar to query and set the attributes of the vertices in a vertex sequence. diff --git a/man/igraph-vs-indexing.Rd b/man/igraph-vs-indexing.Rd index a3c8ba4ba5b..0f47e407859 100644 --- a/man/igraph-vs-indexing.Rd +++ b/man/igraph-vs-indexing.Rd @@ -23,13 +23,13 @@ with some extras. } \details{ Vertex sequences can be indexed using both the single bracket and the double bracket operators, and they both work the same way. -The only difference between them is that the double bracket operator marks the result for printing vertex attributes. + The only difference between them is that the double bracket operator marks the result for printing vertex attributes. } \section{Multiple indices}{ When using multiple indices within the bracket, all of them are evaluated independently, and then the results are concatenated using the \code{c()} function (except for the \code{na_ok} argument, which is special an must be named. -E.g. \code{V(g)[1, 2, .nei(1)]} is equivalent to \code{c(V(g)[1], V(g)[2], V(g)[.nei(1)])}. + E.g. \code{V(g)[1, 2, .nei(1)]} is equivalent to \code{c(V(g)[1], V(g)[2], V(g)[.nei(1)])}. } \section{Index types}{ @@ -38,27 +38,27 @@ Vertex sequences can be indexed with positive numeric vectors, negative numeric vectors, logical vectors, character vectors: \itemize{ \item When indexed with positive numeric vectors, the vertices at the given positions in the sequence are selected. -This is the same as indexing a regular R atomic vector with positive numeric vectors. -\item When indexed with negative numeric vectors, the vertices at the given positions in the sequence are omitted. -Again, this is the same as indexing a regular R atomic vector. -\item When indexed with a logical vector, the lengths of the vertex sequence and the index must match, and the vertices for + This is the same as indexing a regular R atomic vector with positive numeric vectors. + \item When indexed with negative numeric vectors, the vertices at the given positions in the sequence are omitted. + Again, this is the same as indexing a regular R atomic vector. + \item When indexed with a logical vector, the lengths of the vertex sequence and the index must match, and the vertices for which the index is \code{TRUE} are selected. -\item Named graphs can be indexed with character vectors, to select vertices with the given names. -} + \item Named graphs can be indexed with character vectors, to select vertices with the given names. + } } \section{Vertex attributes}{ When indexing vertex sequences, vertex attributes can be referred to simply by using their names. -E.g. if a graph has a \code{name} vertex attribute, then \code{V(g)[name == "foo"]} is equivalent to \code{V(g)[V(g)$name == "foo"]}. -See more examples below. -Note that attribute names mask the names of variables present in the calling environment; + E.g. if a graph has a \code{name} vertex attribute, then \code{V(g)[name == "foo"]} is equivalent to \code{V(g)[V(g)$name == "foo"]}. + See more examples below. + Note that attribute names mask the names of variables present in the calling environment; if you need to look up a variable and you do not want a similarly named vertex attribute to mask it, use the \code{.env} pronoun to perform the name lookup in the calling environment. -In other words, + In other words, use \code{V(g)[.env$name == "foo"]} to make sure that \code{name} is looked up from the calling environment even if there is a vertex attribute with the same name. -Similarly, you can use \code{.data} to match attribute names only. + Similarly, you can use \code{.data} to match attribute names only. } \section{Special functions}{ @@ -68,26 +68,26 @@ There are some special igraph functions that can be used only in expressions ind \item{\code{.nei}}{ takes a vertex sequence as its argument and selects neighbors of these vertices. -An optional \code{mode} argument can be used to select successors (\code{mode="out"}), + An optional \code{mode} argument can be used to select successors (\code{mode="out"}), or predecessors (\code{mode="in"}) in directed graphs. -} + } \item{\code{.inc}}{ Takes an edge sequence as an argument, and selects vertices that have at least one incident edge in this edge sequence. -} + } \item{\code{.from}}{ Similar to \code{.inc}, but only considers the tails of the edges. -} + } \item{\code{.to}}{ Similar to \code{.inc}, but only considers the heads of the edges. -} + } \item{\code{.innei}, \code{.outnei}}{ \code{.innei(v)} is a shorthand for \code{.nei(v, mode = "in")}, and \code{.outnei(v)} is a shorthand for \code{.nei(v, mode = "out")}. -} + } } Note that multiple special functions can be used together, or with regular indices, and then their results are concatenated. -See more examples below. + See more examples below. } \examples{ diff --git a/man/igraph-vs-indexing2.Rd b/man/igraph-vs-indexing2.Rd index 9a99377a7e9..2b724db8e78 100644 --- a/man/igraph-vs-indexing2.Rd +++ b/man/igraph-vs-indexing2.Rd @@ -14,7 +14,7 @@ } \value{ The double bracket operator returns another vertex sequence, with meta-data (attribute) printing turned on. -See details below. + See details below. } \description{ The double bracket operator can be used on vertex sequences, to print the meta-data (vertex attributes) of the vertices in the sequence. diff --git a/man/igraph.from.graphNEL.Rd b/man/igraph.from.graphNEL.Rd index c4ca4dbb28b..55be6e02e83 100644 --- a/man/igraph.from.graphNEL.Rd +++ b/man/igraph.from.graphNEL.Rd @@ -12,7 +12,7 @@ igraph.from.graphNEL(graphNEL, name = TRUE, weight = TRUE, unlist.attrs = TRUE) \item{name}{Logical, whether to add graphNEL vertex names as an igraph vertex attribute called \sQuote{\code{name}}.} \item{weight}{Logical, whether to add graphNEL edge weights as an igraph edge attribute called \sQuote{\code{weight}}. -(graphNEL graphs are always weighted.)} + (graphNEL graphs are always weighted.)} \item{unlist.attrs}{Logical. graphNEL attribute query functions return the values of the attributes in R lists, if this argument is \code{TRUE} (the default) these will be converted to atomic vectors, whenever possible, diff --git a/man/igraph.options.Rd b/man/igraph.options.Rd index 52a9a701c67..09db6e4e19b 100644 --- a/man/igraph.options.Rd +++ b/man/igraph.options.Rd @@ -9,7 +9,7 @@ igraph.options(...) \arguments{ \item{...}{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.} + See the Value and Details sections for explanation.} } \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/igraph_opt.Rd b/man/igraph_opt.Rd index dabc09c4a9f..9e563412977 100644 --- a/man/igraph_opt.Rd +++ b/man/igraph_opt.Rd @@ -12,7 +12,7 @@ igraph_opt(x, ..., default = NULL) \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.} + 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. @@ -28,7 +28,7 @@ igraph_options(verbose = oldval) } \seealso{ Similar to \code{\link[=getOption]{getOption()}}. -See \code{\link[=igraph_options]{igraph_options()}} to set options. + See \code{\link[=igraph_options]{igraph_options()}} to set options. Other igraph options: \code{\link[=igraph_options]{igraph_options()}}, diff --git a/man/igraph_options.Rd b/man/igraph_options.Rd index 68e3b98502c..64b7e745d08 100644 --- a/man/igraph_options.Rd +++ b/man/igraph_options.Rd @@ -9,15 +9,15 @@ igraph_options(...) \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.} + See the Value and Details sections for explanation.} } \value{ A list with the old values of the updated parameters, invisibly. -Without any arguments, it returns the values of all options. + Without any arguments, it returns the values of all options. } \description{ igraph has some parameters which (usually) affect the behavior of many functions. -These can be set for the whole session via \code{igraph_options()}. + These can be set for the whole session via \code{igraph_options()}. } \details{ The parameter values set via a call to the \code{igraph_options()} function will remain in effect for the rest of the session, @@ -31,74 +31,74 @@ The currently used parameters in alphabetical order: \item{add.params}{ Logical scalar, whether to add model parameter to the graphs that are created by the various graph constructors. -By default it is \code{TRUE}. -} + By default it is \code{TRUE}. + } \item{add.vertex.names}{ Logical scalar, whether to add vertex names to node level indices, like degree, betweenness scores, etc. By default it is \code{TRUE}. -} + } \item{annotate.plot}{ Logical scalar, whether to annotate igraph plots with the graph's name (\code{name} graph attribute, if present) as \code{main}, and with the number of vertices and edges as \code{xlab}. -Defaults to \code{FALSE}. -} + Defaults to \code{FALSE}. + } \item{dend.plot.type}{ The plotting function to use when plotting community structure dendrograms via \code{\link[=plot_dendrogram]{plot_dendrogram()}}. -Possible values are \sQuote{auto} (the default), \sQuote{phylo}, \sQuote{hclust} and \sQuote{dendrogram}. -See \code{\link[=plot_dendrogram]{plot_dendrogram()}} for details. -} + Possible values are \sQuote{auto} (the default), \sQuote{phylo}, \sQuote{hclust} and \sQuote{dendrogram}. + See \code{\link[=plot_dendrogram]{plot_dendrogram()}} for details. + } \item{edge.attr.comb}{ Specifies what to do with the edge attributes if the graph is modified. -The default value is \code{list(weight="sum", name="concat", "ignore")}. -See \code{\link[=attribute.combination]{attribute.combination()}} for details on this. -} + The default value is \code{list(weight="sum", name="concat", "ignore")}. + See \code{\link[=attribute.combination]{attribute.combination()}} for details on this. + } \item{graph.attr.comb}{ Specifies what to do with the graph attributes when graphs are combined, e.g. via \code{\link[=union]{union()}}, \code{\link[=intersection]{intersection()}}, \code{\link[=disjoint_union]{disjoint_union()}} or \code{\link[=compose]{compose()}}. -The default value is \code{"rename"}, which resolves any name clash by appending \verb{_1}, \verb{_2}, ... suffixes. -See \code{\link[=attribute.combination]{attribute.combination()}} for details on this. -} + The default value is \code{"rename"}, which resolves any name clash by appending \verb{_1}, \verb{_2}, ... suffixes. + See \code{\link[=attribute.combination]{attribute.combination()}} for details on this. + } \item{print.edge.attributes}{ Logical constant, whether to print edge attributes when printing graphs. -Defaults to \code{FALSE}. -} + Defaults to \code{FALSE}. + } \item{print.full}{ Logical scalar, whether \code{\link[=print.igraph]{print.igraph()}} should show the graph structure as well, or only a summary of the graph. -} + } \item{print.graph.attributes}{ Logical constant, whether to print graph attributes when printing graphs. Defaults to \code{FALSE}. -} + } \item{print.vertex.attributes}{ Logical constant, whether to print vertex attributes when printing graphs. Defaults to \code{FALSE}. -} + } \item{print.style}{ Character string controlling the visual style used by \code{\link[=print.igraph]{print.igraph()}}, \code{\link[=summary.igraph]{summary.igraph()}}, \code{\link[=print.igraph.vs]{print.igraph.vs()}} and \code{\link[=print.igraph.es]{print.igraph.es()}}. -Possible values are \code{"cli"} (default, a cli-styled output with section rules, Unicode arrows for edges and typed attribute listings) and \code{"classic"} (the historical \verb{IGRAPH ... DNW-} header relied on by tutorials and parsers). -} + Possible values are \code{"cli"} (default, a cli-styled output with section rules, Unicode arrows for edges and typed attribute listings) and \code{"classic"} (the historical \verb{IGRAPH ... DNW-} header relied on by tutorials and parsers). + } \item{return.vs.es}{ Whether functions that return a set or sequence of vertices/edges should return formal vertex/edge sequence objects. -This option was introduced in igraph version 1.0.0 and defaults to TRUE. -If your package requires the old behavior, you can set it to FALSE in the \code{.onLoad} function of your package, + This option was introduced in igraph version 1.0.0 and defaults to TRUE. + If your package requires the old behavior, you can set it to FALSE in the \code{.onLoad} function of your package, without affecting other packages. -} + } \item{sparsematrices}{ Whether to use the \code{Matrix} package for (sparse) matrices. -It is recommended, if the user works with larger graphs. -} + It is recommended, if the user works with larger graphs. + } \item{verbose}{ Logical constant, whether igraph functions should talk more than minimal. -E.g. if \code{TRUE} then some functions will use progress bars while computing. Defaults to \code{FALSE}. -} + E.g. if \code{TRUE} then some functions will use progress bars while computing. Defaults to \code{FALSE}. + } \item{vertex.attr.comb}{ Specifies what to do with the vertex attributes if the graph is modified. -The default value is \code{list(name="concat", "ignore")}. -See \code{\link[=attribute.combination]{attribute.combination()}} for details on this. -} + The default value is \code{list(name="concat", "ignore")}. + See \code{\link[=attribute.combination]{attribute.combination()}} for details on this. + } } } \examples{ @@ -116,7 +116,7 @@ igraph_opt("verbose") } \seealso{ Similar to \code{\link[=options]{options()}}. -See \code{\link[=igraph_opt]{igraph_opt()}} to retrieve the value of a single option. + See \code{\link[=igraph_opt]{igraph_opt()}} to retrieve the value of a single option. Other igraph options: \code{\link[=igraph_opt]{igraph_opt()}}, diff --git a/man/incident.Rd b/man/incident.Rd index 50400d01511..72e465fd3f4 100644 --- a/man/incident.Rd +++ b/man/incident.Rd @@ -14,7 +14,7 @@ incident(graph, v, ..., mode = c("all", "out", "in", "total")) \item{...}{These dots are for future extensions and must be empty.} \item{mode}{Whether to query outgoing (\sQuote{out}), incoming (\sQuote{in}) edges, or both types (\sQuote{all}). -This is ignored for undirected graphs.} + This is ignored for undirected graphs.} } \value{ An edge sequence containing the incident edges of the input vertex. diff --git a/man/incident_edges.Rd b/man/incident_edges.Rd index 3c0620a9fcc..74176fe8144 100644 --- a/man/incident_edges.Rd +++ b/man/incident_edges.Rd @@ -14,7 +14,7 @@ incident_edges(graph, v, ..., mode = c("out", "in", "all", "total")) \item{...}{These dots are for future extensions and must be empty.} \item{mode}{Whether to query outgoing (\sQuote{out}), incoming (\sQuote{in}) edges, or both types (\sQuote{all}). -This is ignored for undirected graphs.} + This is ignored for undirected graphs.} } \value{ A list of edge sequences. diff --git a/man/indent_print.Rd b/man/indent_print.Rd index 28c120812a6..d847dd9ea38 100644 --- a/man/indent_print.Rd +++ b/man/indent_print.Rd @@ -12,7 +12,7 @@ indent_print(..., .indent = " ", .printer = NULL) \item{.indent}{Character scalar, indent the printout with this.} \item{.printer}{The printing function. -The default \code{NULL} uses \link{print}.} + The default \code{NULL} uses \link{print}.} } \value{ The first element in \code{...}, invisibly. diff --git a/man/independent.vertex.sets.Rd b/man/independent.vertex.sets.Rd index 89ee9c70c05..cacf8c96255 100644 --- a/man/independent.vertex.sets.Rd +++ b/man/independent.vertex.sets.Rd @@ -10,10 +10,10 @@ independent.vertex.sets(graph, min = NULL, max = NULL) \item{graph}{The input graph.} \item{min}{Numeric constant, limit for the minimum size of the independent vertex sets to find. -\code{NULL} means no limit.} + \code{NULL} means no limit.} \item{max}{Numeric constant, limit for the maximum size of the independent vertex sets to find. -\code{NULL} means no limit.} + \code{NULL} means no limit.} } \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/induced.subgraph.Rd b/man/induced.subgraph.Rd index fc94b434c00..7ed6a2ba64f 100644 --- a/man/induced.subgraph.Rd +++ b/man/induced.subgraph.Rd @@ -16,9 +16,9 @@ induced.subgraph( \item{vids}{Numeric vector, the vertices of the original graph which will form the subgraph.} \item{impl}{Character scalar, to choose between two implementation of the subgraph calculation. -\sQuote{\code{copy_and_delete}} copies the graph first, and then deletes the vertices and edges that are not included in the result graph. -\sQuote{\code{create_from_scratch}} searches for all vertices and edges that must be kept and then uses them to create the graph from scratch. -\sQuote{\code{auto}} chooses between the two implementations automatically, + \sQuote{\code{copy_and_delete}} copies the graph first, and then deletes the vertices and edges that are not included in the result graph. + \sQuote{\code{create_from_scratch}} searches for all vertices and edges that must be kept and then uses them to create the graph from scratch. + \sQuote{\code{auto}} chooses between the two implementations automatically, using heuristics based on the size of the original and the result graph.} } \description{ diff --git a/man/infomap.community.Rd b/man/infomap.community.Rd index 83335eb70cc..98c62f61c8e 100644 --- a/man/infomap.community.Rd +++ b/man/infomap.community.Rd @@ -14,19 +14,19 @@ infomap.community( } \arguments{ \item{graph}{The input graph. -Edge directions will be taken into account.} + Edge directions will be taken into account.} \item{e.weights}{Numeric vector of edge weights. -The length must match the number of edges in the graph. -By default (\code{NULL}) the \sQuote{\code{weight}} edge attribute is used as weights. -If it is not present, then all edges are considered to have the same weight. -Larger edge weights correspond to stronger connections.} + The length must match the number of edges in the graph. + By default (\code{NULL}) the \sQuote{\code{weight}} edge attribute is used as weights. + If it is not present, then all edges are considered to have the same weight. + Larger edge weights correspond to stronger connections.} \item{v.weights}{Numeric vector of vertex weights. -The length must match the number of vertices in the graph. -By default (\code{NULL}) the \sQuote{\code{weight}} vertex attribute is used as weights. -If it is not present, then all vertices are considered to have the same weight. -A larger vertex weight means a larger probability that the random surfer jumps to that vertex.} + The length must match the number of vertices in the graph. + By default (\code{NULL}) the \sQuote{\code{weight}} vertex attribute is used as weights. + If it is not present, then all vertices are considered to have the same weight. + A larger vertex weight means a larger probability that the random surfer jumps to that vertex.} \item{nb.trials}{The number of attempts to partition the network (can be any integer value equal or larger than 1).} diff --git a/man/intersection.Rd b/man/intersection.Rd index 6f6d3895762..7801ebcd475 100644 --- a/man/intersection.Rd +++ b/man/intersection.Rd @@ -14,9 +14,9 @@ Depends on the function that implements this method. } \description{ This is an S3 generic function. -See \code{methods("intersection")} for the actual implementations for various S3 classes. -Initially it is implemented for igraph graphs and igraph vertex and edge sequences. -See \code{\link[=intersection.igraph]{intersection.igraph()}}, and \code{\link[=intersection.igraph.vs]{intersection.igraph.vs()}}. + See \code{methods("intersection")} for the actual implementations for various S3 classes. + Initially it is implemented for igraph graphs and igraph vertex and edge sequences. + See \code{\link[=intersection.igraph]{intersection.igraph()}}, and \code{\link[=intersection.igraph.vs]{intersection.igraph.vs()}}. } \seealso{ Other functions for manipulating graph structure: diff --git a/man/intersection.igraph.Rd b/man/intersection.igraph.Rd index 2a4de25d3e7..e419039c66e 100644 --- a/man/intersection.igraph.Rd +++ b/man/intersection.igraph.Rd @@ -18,39 +18,39 @@ \item{\dots}{Graph objects or lists of graph objects.} \item{byname}{A Logical, or the character scalar \code{auto}. -Whether to perform the operation based on symbolic vertex names. -If it is \code{auto}, that means \code{TRUE} if all graphs are named and \code{FALSE} otherwise. -A warning is generated if \code{auto} and some (but not all) graphs are named.} + Whether to perform the operation based on symbolic vertex names. + If it is \code{auto}, that means \code{TRUE} if all graphs are named and \code{FALSE} otherwise. + A warning is generated if \code{auto} and some (but not all) graphs are named.} \item{keep.all.vertices}{Logical, whether to keep vertices that only appear in a subset of the input graphs.} \item{graph.attr.comb, vertex.attr.comb, edge.attr.comb}{Specification for combining clashing graph, vertex and edge attributes. -\code{vertex.attr.comb} and \code{edge.attr.comb} default to \code{"rename"}; + \code{vertex.attr.comb} and \code{edge.attr.comb} default to \code{"rename"}; \code{graph.attr.comb} defaults to the \code{graph.attr.comb} igraph option (\code{"rename"} unless changed via \code{\link[=igraph_options]{igraph_options()}}). -See \link{igraph-attribute-combination} for the available combiners.} + See \link{igraph-attribute-combination} for the available combiners.} } \value{ A new graph object. } \description{ The intersection of two or more graphs are created. -The graphs may have identical or overlapping vertex sets. + The graphs may have identical or overlapping vertex sets. } \details{ \code{intersection()} creates the intersection of two or more graphs: only edges present in all graphs will be included. -The corresponding operator is \verb{\%s\%}. + The corresponding operator is \verb{\%s\%}. If the \code{byname} argument is \code{TRUE} (or \code{auto} and all graphs are named), then the operation is performed on symbolic vertex names instead of the internal numeric vertex IDs. \code{intersection()} keeps the attributes of all graphs. -All graph, vertex and edge attributes are copied to the result. -By default, if an attribute is present in multiple graphs and would result in a name clash, that attribute is renamed by adding suffixes: + All graph, vertex and edge attributes are copied to the result. + By default, if an attribute is present in multiple graphs and would result in a name clash, that attribute is renamed by adding suffixes: \verb{_1}, \verb{_2}, etc. Pass \code{graph.attr.comb}, \code{vertex.attr.comb} or \code{edge.attr.comb} to combine clashing attributes instead; see \link{igraph-attribute-combination} for the available combiners. The \code{name} vertex attribute is treated specially if the operation is performed based on symbolic vertex names. -In this case \code{name} must be present in all graphs, and it is not renamed in the result graph. + In this case \code{name} must be present in all graphs, and it is not renamed in the result graph. An error is generated if some input graphs are directed and others are undirected. } diff --git a/man/intersection.igraph.es.Rd b/man/intersection.igraph.es.Rd index a6a5dacebc5..0317b528821 100644 --- a/man/intersection.igraph.es.Rd +++ b/man/intersection.igraph.es.Rd @@ -17,7 +17,7 @@ Intersection of edge sequences } \details{ They must belong to the same graph. -Note that this function has \sQuote{set} semantics and the multiplicity of edges is lost in the result. + Note that this function has \sQuote{set} semantics and the multiplicity of edges is lost in the result. } \examples{ g <- make_(ring(10), with_vertex_(name = LETTERS[1:10])) diff --git a/man/intersection.igraph.vs.Rd b/man/intersection.igraph.vs.Rd index 7fde62b682a..5b88e4b2722 100644 --- a/man/intersection.igraph.vs.Rd +++ b/man/intersection.igraph.vs.Rd @@ -17,7 +17,7 @@ Intersection of vertex sequences } \details{ They must belong to the same graph. -Note that this function has \sQuote{set} semantics and the multiplicity of vertices is lost in the result. + Note that this function has \sQuote{set} semantics and the multiplicity of vertices is lost in the result. } \examples{ g <- make_(ring(10), with_vertex_(name = LETTERS[1:10])) diff --git a/man/invalidate_cache.Rd b/man/invalidate_cache.Rd index be5a2abd4af..e9d48436711 100644 --- a/man/invalidate_cache.Rd +++ b/man/invalidate_cache.Rd @@ -11,15 +11,15 @@ invalidate_cache(graph) } \value{ The graph with its cache invalidated. -Since the graph is modified in place in R as well, you can also ignore the return value. + Since the graph is modified in place in R as well, you can also ignore the return value. } \description{ igraph graphs cache some basic properties (such as whether the graph is a DAG or whether it is simple) in an internal data structure for faster repeated queries. -This function invalidates the cache, forcing a recalculation of the cached properties the next time they are needed. + This function invalidates the cache, forcing a recalculation of the cached properties the next time they are needed. } \details{ You should not need to call this function during normal usage; however, it may be useful for debugging cache-related issues. -A tell-tale sign of an invalid cache entry is + A tell-tale sign of an invalid cache entry is when the result of a cached function (such as \code{\link{is_dag}()} or \code{\link{is_simple}()}) changes after calling this function. } \section{Related documentation in the C library}{ diff --git a/man/is.chordal.Rd b/man/is.chordal.Rd index cc5618a4bdd..ac1489fb7b7 100644 --- a/man/is.chordal.Rd +++ b/man/is.chordal.Rd @@ -14,13 +14,13 @@ is.chordal( } \arguments{ \item{graph}{The input graph. -It may be directed, but edge directions are ignored, as the algorithm is defined for undirected graphs.} + It may be directed, but edge directions are ignored, as the algorithm is defined for undirected graphs.} \item{alpha}{Numeric vector, the maximal chardinality ordering of the vertices. -If it is \code{NULL}, then it is automatically calculated by calling \code{\link[=max_cardinality]{max_cardinality()}}, or from \code{alpham1} if that is given..} + If it is \code{NULL}, then it is automatically calculated by calling \code{\link[=max_cardinality]{max_cardinality()}}, or from \code{alpham1} if that is given..} \item{alpham1}{Numeric vector, the inverse of \code{alpha}. -If it is \code{NULL}, then it is automatically calculated by calling \code{\link[=max_cardinality]{max_cardinality()}}, or from \code{alpha}.} + If it is \code{NULL}, then it is automatically calculated by calling \code{\link[=max_cardinality]{max_cardinality()}}, or from \code{alpha}.} \item{fillin}{Logical, whether to calculate the fill-in edges.} diff --git a/man/is.connected.Rd b/man/is.connected.Rd index 46f1754b691..813e769ad28 100644 --- a/man/is.connected.Rd +++ b/man/is.connected.Rd @@ -10,9 +10,9 @@ is.connected(graph, mode = c("weak", "strong")) \item{graph}{The graph to analyze.} \item{mode}{Character string, either \dQuote{weak} or \dQuote{strong}. -For directed graphs \dQuote{weak} implies weakly, + For directed graphs \dQuote{weak} implies weakly, \dQuote{strong} strongly connected components to search. -It is ignored for undirected graphs.} + It is ignored for undirected graphs.} } \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/is.dag.Rd b/man/is.dag.Rd index d30b1161fe6..3bdeaa68fb7 100644 --- a/man/is.dag.Rd +++ b/man/is.dag.Rd @@ -8,7 +8,7 @@ is.dag(graph) } \arguments{ \item{graph}{The input graph. -It may be undirected, in which case \code{FALSE} is reported.} + It may be undirected, in which case \code{FALSE} is reported.} } \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/is.degree.sequence.Rd b/man/is.degree.sequence.Rd index d2a543fa0ec..e0f0a907bdb 100644 --- a/man/is.degree.sequence.Rd +++ b/man/is.degree.sequence.Rd @@ -10,8 +10,8 @@ is.degree.sequence(out.deg, in.deg = NULL) \item{out.deg}{Integer vector, the degree sequence for undirected graphs, or the out-degree sequence for directed graphs.} \item{in.deg}{\code{NULL} or an integer vector. -For undirected graphs, it should be \code{NULL}. -For directed graphs it specifies the in-degrees.} + For undirected graphs, it should be \code{NULL}. + For directed graphs it specifies the in-degrees.} } \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/is.graphical.degree.sequence.Rd b/man/is.graphical.degree.sequence.Rd index 89f13670cb1..402f10a4d39 100644 --- a/man/is.graphical.degree.sequence.Rd +++ b/man/is.graphical.degree.sequence.Rd @@ -14,14 +14,14 @@ is.graphical.degree.sequence( \item{out.deg}{Integer vector, the degree sequence for undirected graphs, or the out-degree sequence for directed graphs.} \item{in.deg}{\code{NULL} or an integer vector. -For undirected graphs, it should be \code{NULL}. -For directed graphs it specifies the in-degrees.} + For undirected graphs, it should be \code{NULL}. + For directed graphs it specifies the in-degrees.} \item{allowed.edge.types}{The allowed edge types in the graph. -\sQuote{simple} means that neither loop nor multiple edges are allowed (i.e. the graph must be simple). -\sQuote{loops} means that loop edges are allowed but mutiple edges are not. -\sQuote{multi} means that multiple edges are allowed but loop edges are not. -\sQuote{all} means that both loop edges and multiple edges are allowed.} + \sQuote{simple} means that neither loop nor multiple edges are allowed (i.e. the graph must be simple). + \sQuote{loops} means that loop edges are allowed but mutiple edges are not. + \sQuote{multi} means that multiple edges are allowed but loop edges are not. + \sQuote{all} means that both loop edges and multiple edges are allowed.} } \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/is.loop.Rd b/man/is.loop.Rd index 51396c91b34..c3755ba0b49 100644 --- a/man/is.loop.Rd +++ b/man/is.loop.Rd @@ -10,7 +10,7 @@ is.loop(graph, eids = E(graph)) \item{graph}{The input graph.} \item{eids}{The edges to which the query is restricted. -The default \code{NULL} selects all edges.} + The default \code{NULL} selects all edges.} } \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/is.matching.Rd b/man/is.matching.Rd index 0eddf3e52cf..eed3250ba3a 100644 --- a/man/is.matching.Rd +++ b/man/is.matching.Rd @@ -8,14 +8,14 @@ is.matching(graph, matching, types = NULL) } \arguments{ \item{graph}{The input graph. -It might be directed, but edge directions will be ignored.} + It might be directed, but edge directions will be ignored.} \item{matching}{A potential matching. -An integer vector that gives the pair in the matching for each vertex. -For vertices without a pair, supply \code{NA} here.} + An integer vector that gives the pair in the matching for each vertex. + For vertices without a pair, supply \code{NA} here.} \item{types}{Vertex types, if the graph is bipartite. -By default they are taken from the \sQuote{\code{type}} vertex attribute, if present.} + By default they are taken from the \sQuote{\code{type}} vertex attribute, if present.} } \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/is.maximal.matching.Rd b/man/is.maximal.matching.Rd index 14c5b54e2e4..c3677f10b9f 100644 --- a/man/is.maximal.matching.Rd +++ b/man/is.maximal.matching.Rd @@ -8,14 +8,14 @@ is.maximal.matching(graph, matching, types = NULL) } \arguments{ \item{graph}{The input graph. -It might be directed, but edge directions will be ignored.} + It might be directed, but edge directions will be ignored.} \item{matching}{A potential matching. -An integer vector that gives the pair in the matching for each vertex. -For vertices without a pair, supply \code{NA} here.} + An integer vector that gives the pair in the matching for each vertex. + For vertices without a pair, supply \code{NA} here.} \item{types}{Vertex types, if the graph is bipartite. -By default they are taken from the \sQuote{\code{type}} vertex attribute, if present.} + By default they are taken from the \sQuote{\code{type}} vertex attribute, if present.} } \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/is.minimal.separator.Rd b/man/is.minimal.separator.Rd index be2701ab971..8ca8aaa6abd 100644 --- a/man/is.minimal.separator.Rd +++ b/man/is.minimal.separator.Rd @@ -8,7 +8,7 @@ is.minimal.separator(graph, candidate) } \arguments{ \item{graph}{The input graph. -It may be directed, but edge directions are ignored.} + It may be directed, but edge directions are ignored.} \item{candidate}{A numeric vector giving the vertex IDs of the candidate separator.} } diff --git a/man/is.multiple.Rd b/man/is.multiple.Rd index c1198d14cf9..b24687a3ddf 100644 --- a/man/is.multiple.Rd +++ b/man/is.multiple.Rd @@ -10,7 +10,7 @@ is.multiple(graph, eids = E(graph)) \item{graph}{The input graph.} \item{eids}{The edges to which the query is restricted. -The default \code{NULL} selects all edges.} + The default \code{NULL} selects all edges.} } \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/is.mutual.Rd b/man/is.mutual.Rd index a93fd9a9a7b..360456d9adf 100644 --- a/man/is.mutual.Rd +++ b/man/is.mutual.Rd @@ -10,7 +10,7 @@ is.mutual(graph, eids = E(graph), loops = TRUE) \item{graph}{The input graph.} \item{eids}{Edge sequence, the edges that will be probed. -The default \code{NULL} includes all edges in the order of their IDs.} + The default \code{NULL} includes all edges in the order of their IDs.} \item{loops}{Logical, whether to consider directed self-loops to be mutual.} } diff --git a/man/is.separator.Rd b/man/is.separator.Rd index 6e6c884df9e..626194c5d31 100644 --- a/man/is.separator.Rd +++ b/man/is.separator.Rd @@ -8,7 +8,7 @@ is.separator(graph, candidate) } \arguments{ \item{graph}{The input graph. -It may be directed, but edge directions are ignored.} + It may be directed, but edge directions are ignored.} \item{candidate}{A numeric vector giving the vertex IDs of the candidate separator.} } diff --git a/man/is_acyclic.Rd b/man/is_acyclic.Rd index 494e6695a80..3d7dc782864 100644 --- a/man/is_acyclic.Rd +++ b/man/is_acyclic.Rd @@ -17,7 +17,7 @@ This function tests whether the given graph is free of cycles. } \details{ This function looks for directed cycles in directed graphs and undirected cycles in undirected graphs. -Use \code{\link[=find_cycle]{find_cycle()}} to return a specific cycle. + Use \code{\link[=find_cycle]{find_cycle()}} to return a specific cycle. } \section{Related documentation in the C library}{ \href{https://igraph.org/c/html/0.10.17/igraph-Cycles.html#igraph_is_acyclic}{\code{is_acyclic()}} diff --git a/man/is_biconnected.Rd b/man/is_biconnected.Rd index de34160ed38..8453d32389a 100644 --- a/man/is_biconnected.Rd +++ b/man/is_biconnected.Rd @@ -8,7 +8,7 @@ is_biconnected(graph) } \arguments{ \item{graph}{The input graph. -Edge directions are ignored.} + Edge directions are ignored.} } \value{ Logical, \code{TRUE} if the graph is biconnected. diff --git a/man/is_bipartite.Rd b/man/is_bipartite.Rd index 3da675212be..43476d2c094 100644 --- a/man/is_bipartite.Rd +++ b/man/is_bipartite.Rd @@ -11,7 +11,7 @@ is_bipartite(graph) } \description{ It does not check whether the graph is bipartite in the mathematical sense. -Use \code{\link[=bipartite_mapping]{bipartite_mapping()}} for that. + Use \code{\link[=bipartite_mapping]{bipartite_mapping()}} for that. } \section{Related documentation in the C library}{ \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}} diff --git a/man/is_chordal.Rd b/man/is_chordal.Rd index c2bf3ecb854..0caed7feded 100644 --- a/man/is_chordal.Rd +++ b/man/is_chordal.Rd @@ -15,15 +15,15 @@ is_chordal( } \arguments{ \item{graph}{The input graph. -It may be directed, but edge directions are ignored, as the algorithm is defined for undirected graphs.} + It may be directed, but edge directions are ignored, as the algorithm is defined for undirected graphs.} \item{...}{These dots are for future extensions and must be empty.} \item{alpha}{Numeric vector, the maximal chardinality ordering of the vertices. -If it is \code{NULL}, then it is automatically calculated by calling \code{\link[=max_cardinality]{max_cardinality()}}, or from \code{alpham1} if that is given..} + If it is \code{NULL}, then it is automatically calculated by calling \code{\link[=max_cardinality]{max_cardinality()}}, or from \code{alpham1} if that is given..} \item{alpham1}{Numeric vector, the inverse of \code{alpha}. -If it is \code{NULL}, then it is automatically calculated by calling \code{\link[=max_cardinality]{max_cardinality()}}, or from \code{alpha}.} + If it is \code{NULL}, then it is automatically calculated by calling \code{\link[=max_cardinality]{max_cardinality()}}, or from \code{alpha}.} \item{fillin}{Logical, whether to calculate the fill-in edges.} @@ -34,19 +34,19 @@ A list with three members: \describe{ \item{chordal}{ Logical, it is \code{TRUE} iff the input graph is chordal. -} + } \item{fillin}{ If requested, then a numeric vector giving the fill-in edges. \code{NULL} otherwise. -} + } \item{newgraph}{ If requested, then the triangulated graph, an \code{igraph} object. \code{NULL} otherwise. -} + } } } \description{ A graph is chordal (or triangulated) if each of its cycles of four or more nodes has a chord, which is an edge joining two nodes that are not adjacent in the cycle. -An equivalent definition is that any chordless cycles have at most three nodes. + An equivalent definition is that any chordless cycles have at most three nodes. } \details{ The chordality of the graph is decided by first performing maximum cardinality search on it (if the \code{alpha} and \code{alpham1} arguments are \code{NULL}), diff --git a/man/is_dag.Rd b/man/is_dag.Rd index c113d7db772..4bbbee215a7 100644 --- a/man/is_dag.Rd +++ b/man/is_dag.Rd @@ -8,7 +8,7 @@ is_dag(graph) } \arguments{ \item{graph}{The input graph. -It may be undirected, in which case \code{FALSE} is reported.} + It may be undirected, in which case \code{FALSE} is reported.} } \value{ A logical vector of length one. @@ -18,7 +18,7 @@ This function tests whether the given graph is a DAG, a directed acyclic graph. } \details{ \code{is_dag()} checks whether there is a directed cycle in the graph. -If not, the graph is a DAG. + If not, the graph is a DAG. } \section{Related documentation in the C library}{ \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_is_dag}{\code{is_dag()}} diff --git a/man/is_degseq.Rd b/man/is_degseq.Rd index 3636780e21c..2d7059db21c 100644 --- a/man/is_degseq.Rd +++ b/man/is_degseq.Rd @@ -10,18 +10,18 @@ is_degseq(out.deg, in.deg = NULL) \item{out.deg}{Integer vector, the degree sequence for undirected graphs, or the out-degree sequence for directed graphs.} \item{in.deg}{\code{NULL} or an integer vector. -For undirected graphs, it should be \code{NULL}. -For directed graphs it specifies the in-degrees.} + For undirected graphs, it should be \code{NULL}. + For directed graphs it specifies the in-degrees.} } \value{ A logical scalar. } \description{ \code{is_degseq()} checks whether the given vertex degrees (in- and out-degrees for directed graphs) can be realized by a graph. -Note that the graph does not have to be simple, it may contain loop and multiple edges. -For undirected graphs, it also checks whether the sum of degrees is even. -For directed graphs, the function checks whether the lengths of the two degree vectors are equal and whether their sums are also equal. -These are known sufficient and necessary conditions for a degree sequence to be valid. + Note that the graph does not have to be simple, it may contain loop and multiple edges. + For undirected graphs, it also checks whether the sum of degrees is even. + For directed graphs, the function checks whether the lengths of the two degree vectors are equal and whether their sums are also equal. + These are known sufficient and necessary conditions for a degree sequence to be valid. } \section{Related documentation in the C library}{ \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_is_graphical}{\code{is_graphical()}} diff --git a/man/is_forest.Rd b/man/is_forest.Rd index f8de1d23a48..d57cd4d5ff2 100644 --- a/man/is_forest.Rd +++ b/man/is_forest.Rd @@ -12,21 +12,21 @@ is_forest(graph, ..., mode = c("out", "in", "all", "total"), details = FALSE) \item{...}{These dots are for future extensions and must be empty.} \item{mode}{Whether to consider edge directions in a directed graph. -\sQuote{all} ignores edge directions; \sQuote{out} requires edges to be oriented outwards from the root, + \sQuote{all} ignores edge directions; \sQuote{out} requires edges to be oriented outwards from the root, \sQuote{in} requires edges to be oriented towards the root.} \item{details}{Whether to return only whether the graph is a tree (\code{FALSE}) or also a possible root (\code{TRUE})} } \value{ When \code{details} is \code{FALSE}, a logical value that indicates whether the graph is a tree. -When \code{details} is \code{TRUE}, a named list with two entries: + When \code{details} is \code{TRUE}, a named list with two entries: \describe{ \item{res}{ Logical value that indicates whether the graph is a tree. -} + } \item{root}{ The root vertex of the tree; undefined if the graph is not a tree. -} + } } } \description{ @@ -34,9 +34,9 @@ The root vertex of the tree; undefined if the graph is not a tree. } \details{ An undirected graph is a forest if it has no cycles. -In the directed case, + In the directed case, a possible additional requirement is that edges in each tree are oriented away from the root (out-trees or arborescences) or all edges are oriented towards the root (in-trees or anti-arborescences). -This test can be controlled using the mode parameter. + This test can be controlled using the mode parameter. By convention, the null graph (i.e. the graph with no vertices) is considered to be a forest. } diff --git a/man/is_graphical.Rd b/man/is_graphical.Rd index 5664258162f..df37fcceae7 100644 --- a/man/is_graphical.Rd +++ b/man/is_graphical.Rd @@ -15,16 +15,16 @@ is_graphical( \item{out.deg}{Integer vector, the degree sequence for undirected graphs, or the out-degree sequence for directed graphs.} \item{in.deg}{\code{NULL} or an integer vector. -For undirected graphs, it should be \code{NULL}. -For directed graphs it specifies the in-degrees.} + For undirected graphs, it should be \code{NULL}. + For directed graphs it specifies the in-degrees.} \item{...}{These dots are for future extensions and must be empty.} \item{allowed.edge.types}{The allowed edge types in the graph. -\sQuote{simple} means that neither loop nor multiple edges are allowed (i.e. the graph must be simple). -\sQuote{loops} means that loop edges are allowed but mutiple edges are not. -\sQuote{multi} means that multiple edges are allowed but loop edges are not. -\sQuote{all} means that both loop edges and multiple edges are allowed.} + \sQuote{simple} means that neither loop nor multiple edges are allowed (i.e. the graph must be simple). + \sQuote{loops} means that loop edges are allowed but mutiple edges are not. + \sQuote{multi} means that multiple edges are allowed but loop edges are not. + \sQuote{all} means that both loop edges and multiple edges are allowed.} } \value{ A logical scalar. @@ -34,7 +34,7 @@ Determine whether the given vertex degrees (in- and out-degrees for directed gra } \details{ The classical concept of graphicality assumes simple graphs. -This function can perform the check also when self-loops, multi-edges, or both are allowed in the graph. + This function can perform the check also when self-loops, multi-edges, or both are allowed in the graph. } \section{Related documentation in the C library}{ \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_is_graphical}{\code{is_graphical()}} diff --git a/man/is_min_separator.Rd b/man/is_min_separator.Rd index 29470d6ed97..b8039127ebb 100644 --- a/man/is_min_separator.Rd +++ b/man/is_min_separator.Rd @@ -8,7 +8,7 @@ is_min_separator(graph, candidate) } \arguments{ \item{graph}{The input graph. -It may be directed, but edge directions are ignored.} + It may be directed, but edge directions are ignored.} \item{candidate}{A numeric vector giving the vertex IDs of the candidate separator.} } @@ -20,7 +20,7 @@ Check whether a given set of vertices is a minimal vertex separator. } \details{ \code{is_min_separator()} decides whether the supplied vertex set is a minimal vertex separator. -A minimal vertex separator is a vertex separator, such that none of its proper subsets are a vertex separator. + A minimal vertex separator is a vertex separator, such that none of its proper subsets are a vertex separator. } \section{Related documentation in the C library}{ \href{https://igraph.org/c/html/0.10.17/igraph-Separators.html#igraph_is_minimal_separator}{\code{is_minimal_separator()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}} diff --git a/man/is_named.Rd b/man/is_named.Rd index e015a35e3e6..7f5bc1adbb3 100644 --- a/man/is_named.Rd +++ b/man/is_named.Rd @@ -17,9 +17,9 @@ An igraph graph is named, if there is a symbolic name associated with its vertic } \details{ In igraph vertices can always be identified and specified via their numeric vertex IDs. -This is, however, not always convenient, and in many cases there exist symbolic IDs that correspond to the vertices. -To allow this more flexible identification of vertices, one can assign a vertex attribute called \sQuote{name} to an igraph graph. -After doing this, the symbolic vertex names can be used in all igraph functions, instead of the numeric IDs. + This is, however, not always convenient, and in many cases there exist symbolic IDs that correspond to the vertices. + To allow this more flexible identification of vertices, one can assign a vertex attribute called \sQuote{name} to an igraph graph. + After doing this, the symbolic vertex names can be used in all igraph functions, instead of the numeric IDs. Note that the uniqueness of vertex names are currently not enforced in igraph, you have to check that for yourself, when assigning the vertex names. diff --git a/man/is_separator.Rd b/man/is_separator.Rd index 479f767472f..7cced36593d 100644 --- a/man/is_separator.Rd +++ b/man/is_separator.Rd @@ -8,7 +8,7 @@ is_separator(graph, candidate) } \arguments{ \item{graph}{The input graph. -It may be directed, but edge directions are ignored.} + It may be directed, but edge directions are ignored.} \item{candidate}{A numeric vector giving the vertex IDs of the candidate separator.} } diff --git a/man/is_tree.Rd b/man/is_tree.Rd index 3c8c7e3b1da..45837422cd8 100644 --- a/man/is_tree.Rd +++ b/man/is_tree.Rd @@ -12,21 +12,21 @@ is_tree(graph, ..., mode = c("out", "in", "all", "total"), details = FALSE) \item{...}{These dots are for future extensions and must be empty.} \item{mode}{Whether to consider edge directions in a directed graph. -\sQuote{all} ignores edge directions; \sQuote{out} requires edges to be oriented outwards from the root, + \sQuote{all} ignores edge directions; \sQuote{out} requires edges to be oriented outwards from the root, \sQuote{in} requires edges to be oriented towards the root.} \item{details}{Whether to return only whether the graph is a tree (\code{FALSE}) or also a possible root (\code{TRUE})} } \value{ When \code{details} is \code{FALSE}, a logical value that indicates whether the graph is a tree. -When \code{details} is \code{TRUE}, a named list with two entries: + When \code{details} is \code{TRUE}, a named list with two entries: \describe{ \item{res}{ Logical value that indicates whether the graph is a tree. -} + } \item{root}{ The root vertex of the tree; undefined if the graph is not a tree. -} + } } } \description{ @@ -34,9 +34,9 @@ The root vertex of the tree; undefined if the graph is not a tree. } \details{ An undirected graph is a tree if it is connected and has no cycles. -In the directed case, + In the directed case, a possible additional requirement is that all edges are oriented away from a root (out-tree or arborescence) or all edges are oriented towards a root (in-tree or anti-arborescence). -This test can be controlled using the mode parameter. + This test can be controlled using the mode parameter. By convention, the null graph (i.e. the graph with no vertices) is considered not to be a tree. } diff --git a/man/is_weighted.Rd b/man/is_weighted.Rd index 95edfe3836b..fede1b19aa9 100644 --- a/man/is_weighted.Rd +++ b/man/is_weighted.Rd @@ -17,11 +17,11 @@ In weighted graphs, a real number is assigned to each (directed or undirected) e } \details{ In igraph edge weights are represented via an edge attribute, called \sQuote{weight}. -The \code{is_weighted()} function only checks that such an attribute exists. -(It does not even checks that it is a numeric edge attribute.) + The \code{is_weighted()} function only checks that such an attribute exists. + (It does not even checks that it is a numeric edge attribute.) Edge weights are used for different purposes by the different functions. -E.g. shortest path functions use it as the cost of the path; + E.g. shortest path functions use it as the cost of the path; community finding methods use it as the strength of the relationship between two vertices, etc. Check the manual pages of the functions working with weighted graphs for details. } diff --git a/man/isomorphic.Rd b/man/isomorphic.Rd index 92acb7413e5..21f8f0fa4b3 100644 --- a/man/isomorphic.Rd +++ b/man/isomorphic.Rd @@ -24,8 +24,8 @@ is_isomorphic_to( \item{graph2}{The second graph.} \item{method}{The method to use. -Possible values: \sQuote{auto}, \sQuote{direct}, \sQuote{vf2}, \sQuote{bliss}. -See their details below.} + Possible values: \sQuote{auto}, \sQuote{direct}, \sQuote{vf2}, \sQuote{bliss}. + See their details below.} \item{...}{Additional arguments, passed to the various methods.} } @@ -38,53 +38,53 @@ Decide if two graphs are isomorphic \section{\sQuote{auto} method}{ It tries to select the appropriate method based on the two graphs. -This is the algorithm it uses: + This is the algorithm it uses: \enumerate{ \item If the two graphs do not agree on their order and size (i.e. number of vertices and edges), then return \code{FALSE}. -\item If the graphs have three or four vertices, then the + \item If the graphs have three or four vertices, then the \sQuote{direct} method is used. -\item If the graphs are directed, then the \sQuote{vf2} method is + \item If the graphs are directed, then the \sQuote{vf2} method is used. -\item Otherwise the \sQuote{bliss} method is used. -} + \item Otherwise the \sQuote{bliss} method is used. + } } \section{\sQuote{direct} method}{ This method only works on graphs with three or four vertices, and it is based on a pre-calculated and stored table. -It does not have any extra arguments. + It does not have any extra arguments. } \section{\sQuote{vf2} method}{ This method uses the VF2 algorithm by Cordella, Foggia et al., see references below. -It supports vertex and edge colors and have the following extra arguments: + It supports vertex and edge colors and have the following extra arguments: \describe{ \item{vertex.color1, vertex.color2}{ Optional integer vectors giving the colors of the vertices for colored graph isomorphism. -If they are not given, but the graph has a \dQuote{color} vertex attribute, then it will be used. -If you want to ignore these attributes, then supply \code{NULL} for both of these arguments. -See also examples below. -} + If they are not given, but the graph has a \dQuote{color} vertex attribute, then it will be used. + If you want to ignore these attributes, then supply \code{NULL} for both of these arguments. + See also examples below. + } \item{edge.color1, edge.color2}{ Optional integer vectors giving the colors of the edges for edge-colored (sub)graph isomorphism. -If they are not given, but the graph has a \dQuote{color} edge attribute, then it will be used. -If you want to ignore these attributes, then supply \code{NULL} for both of these arguments. -} + If they are not given, but the graph has a \dQuote{color} edge attribute, then it will be used. + If you want to ignore these attributes, then supply \code{NULL} for both of these arguments. + } } } \section{\sQuote{bliss} method}{ Uses the BLISS algorithm by Junttila and Kaski, and it works for undirected graphs. -For both graphs the \code{\link[=canonical_permutation]{canonical_permutation()}} and then the \code{\link[=permute]{permute()}} function is called to transfer them into canonical form; + For both graphs the \code{\link[=canonical_permutation]{canonical_permutation()}} and then the \code{\link[=permute]{permute()}} function is called to transfer them into canonical form; finally the canonical forms are compared. -Extra arguments: + Extra arguments: \describe{ \item{sh}{ Character constant, the heuristics to use in the BLISS algorithm for \code{graph1} and \code{graph2}. See the \code{sh} argument of \code{\link[=canonical_permutation]{canonical_permutation()}} for possible values. -} + } } \code{sh} defaults to \sQuote{fm}. } diff --git a/man/isomorphism_class.Rd b/man/isomorphism_class.Rd index c6396c4202d..994a1443f2b 100644 --- a/man/isomorphism_class.Rd +++ b/man/isomorphism_class.Rd @@ -12,15 +12,15 @@ isomorphism_class(graph, v) \item{graph}{The input graph.} \item{v}{Optionally a vertex sequence. -If not missing, then an induced subgraph of the input graph, consisting of this vertices, is used.} + If not missing, then an induced subgraph of the input graph, consisting of this vertices, is used.} } \value{ An integer number. } \description{ The isomorphism class is a non-negative integer number. -Graphs (with the same number of vertices) having the same isomorphism class are isomorphic and isomorphic graphs always have the same isomorphism class. -Currently it can handle directed graphs with 3 or 4 vertices and undirected graphs with 3 to 6 vertices. + Graphs (with the same number of vertices) having the same isomorphism class are isomorphic and isomorphic graphs always have the same isomorphism class. + Currently it can handle directed graphs with 3 or 4 vertices and undirected graphs with 3 to 6 vertices. } \section{Related documentation in the C library}{ \href{https://igraph.org/c/html/0.10.17/igraph-Isomorphism.html#igraph_isoclass_subgraph}{\code{isoclass_subgraph()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Isomorphism.html#igraph_isoclass}{\code{isoclass()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}} diff --git a/man/isomorphisms.Rd b/man/isomorphisms.Rd index 72a80eddacd..a6e5aa94991 100644 --- a/man/isomorphisms.Rd +++ b/man/isomorphisms.Rd @@ -17,20 +17,20 @@ isomorphisms(graph1, graph2, method = "vf2", ..., callback = NULL) \item{...}{Extra arguments, passed to the various methods.} \item{callback}{Optional callback function to call for each isomorphism found. -If provided, the function should accept two arguments: + If provided, the function should accept two arguments: \code{map12} (integer vector mapping vertex IDs from graph1 to graph2, 1-based indexing) and \code{map21} (integer vector mapping vertex IDs from graph2 to graph1, 1-based indexing). -The function should return \code{FALSE} to continue the search or \code{TRUE} to stop it. -If \code{NULL} (the default), all isomorphisms are collected and returned as a list. -Only supported for \code{method = "vf2"}. + The function should return \code{FALSE} to continue the search or \code{TRUE} to stop it. + If \code{NULL} (the default), all isomorphisms are collected and returned as a list. + Only supported for \code{method = "vf2"}. \strong{Important limitation:} Callback functions must NOT call any igraph functions (including simple queries like \code{vcount()} or \code{ecount()}). -Doing so will cause R to crash due to reentrancy issues. -Extract any needed graph information before calling the function with a callback, + Doing so will cause R to crash due to reentrancy issues. + Extract any needed graph information before calling the function with a callback, or use collector mode (the default) and process results afterward.} } \value{ If \code{callback} is \code{NULL}, returns a list of vertex sequences, corresponding to all mappings from the first graph to the second. -If \code{callback} is provided, returns \code{NULL} invisibly. + If \code{callback} is provided, returns \code{NULL} invisibly. } \description{ Calculate all isomorphic mappings between the vertices of two graphs diff --git a/man/ivs.Rd b/man/ivs.Rd index e7c2e8f2ff1..78f726580b6 100644 --- a/man/ivs.Rd +++ b/man/ivs.Rd @@ -25,10 +25,10 @@ is_ivs(graph, candidate) \item{graph}{The input graph.} \item{min}{Numeric constant, limit for the minimum size of the independent vertex sets to find. -\code{NULL} means no limit.} + \code{NULL} means no limit.} \item{max}{Numeric constant, limit for the maximum size of the independent vertex sets to find. -\code{NULL} means no limit.} + \code{NULL} means no limit.} \item{candidate}{The vertex set to test for being an independent set.} } @@ -42,17 +42,17 @@ each list element is an independent vertex set. } \description{ A vertex set is called independent if there no edges between any two vertices in it. -These functions find independent vertex sets in undirected graphs + These functions find independent vertex sets in undirected graphs } \details{ \code{ivs()} finds all independent vertex sets in the network, obeying the size limitations given in the \code{min} and \code{max} arguments. \code{largest_ivs()} finds the largest independent vertex sets in the graph. -An independent vertex set is largest if there is no independent vertex set with more vertices. + An independent vertex set is largest if there is no independent vertex set with more vertices. \code{max_ivs()} finds the maximal independent vertex sets in the graph. -An independent vertex set is maximal if it cannot be extended to a larger independent vertex set. -The largest independent vertex sets are maximal, but the opposite is not always true. + An independent vertex set is maximal if it cannot be extended to a larger independent vertex set. + The largest independent vertex sets are maximal, but the opposite is not always true. \code{ivs_size()} calculate the size of the largest independent vertex set(s). diff --git a/man/k_shortest_paths.Rd b/man/k_shortest_paths.Rd index d7932afa9dd..a4cc6b26856 100644 --- a/man/k_shortest_paths.Rd +++ b/man/k_shortest_paths.Rd @@ -22,20 +22,20 @@ k_shortest_paths( \item{to}{The target vertex of the shortest paths.} \item{k}{The number of paths to find. -They will be returned in order of increasing length.} + They will be returned in order of increasing length.} \item{...}{These dots are for future extensions and must be empty.} \item{weights}{Possibly a numeric vector giving edge weights. -If this is \code{NULL} and the graph has a \code{weight} edge attribute, then the attribute is used. -If this is \code{NA} then no weights are used (even if the graph has a \code{weight} attribute). -In a weighted graph, the length of a path is the sum of the weights of its constituent edges.} + If this is \code{NULL} and the graph has a \code{weight} edge attribute, then the attribute is used. + If this is \code{NA} then no weights are used (even if the graph has a \code{weight} attribute). + In a weighted graph, the length of a path is the sum of the weights of its constituent edges.} \item{mode}{Character constant, gives whether the shortest paths to or from the given vertices should be calculated for directed graphs. -If \code{out} then the shortest paths \emph{from} the vertex, if \verb{in} then \emph{to} it will be considered. -If \code{all}, the default, then the graph is treated as undirected, i.e. edge directions are not taken into account. -This argument is ignored for undirected graphs.} + If \code{out} then the shortest paths \emph{from} the vertex, if \verb{in} then \emph{to} it will be considered. + If \code{all}, the default, then the graph is treated as undirected, i.e. edge directions are not taken into account. + This argument is ignored for undirected graphs.} } \value{ A named list with two components is returned: @@ -50,7 +50,7 @@ The list of \eqn{k} shortest paths in terms of edges } \description{ Finds the \eqn{k} shortest paths between the given source and target vertex in order of increasing length. -Currently this function uses Yen's algorithm. + Currently this function uses Yen's algorithm. } \section{Related documentation in the C library}{ \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_get_k_shortest_paths}{\code{get_k_shortest_paths()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_edges}{\code{edges()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_get_eids}{\code{get_eids()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_ecount}{\code{ecount()}} @@ -60,7 +60,7 @@ Currently this function uses Yen's algorithm. Yen, Jin Y.: An algorithm for finding shortest routes from all source nodes to a given destination in general networks. -Quarterly of Applied Mathematics. 27 (4): 526–530. (1970) + Quarterly of Applied Mathematics. 27 (4): 526–530. (1970) \doi{10.1090/qam/253822} } \seealso{ diff --git a/man/keeping_degseq.Rd b/man/keeping_degseq.Rd index e4024e8f3cc..9ae09a9199a 100644 --- a/man/keeping_degseq.Rd +++ b/man/keeping_degseq.Rd @@ -18,7 +18,7 @@ while preserving the original graph's degree distribution. \details{ The rewiring algorithm chooses two arbitrary edges in each step ((a,b) and (c,d)) and substitutes them with (a,d) and (c,b), if they not already exists in the graph. -The algorithm does not create multiple edges. + The algorithm does not create multiple edges. } \examples{ g <- make_ring(10) diff --git a/man/knn.Rd b/man/knn.Rd index cc51e5db074..8eeb0535f23 100644 --- a/man/knn.Rd +++ b/man/knn.Rd @@ -15,36 +15,36 @@ knn( } \arguments{ \item{graph}{The input graph. -It may be directed.} + It may be directed.} \item{vids}{The vertices for which the calculation is performed. -The default \code{NULL} includes all vertices. -Note, that if not all vertices are given here, + The default \code{NULL} includes all vertices. + Note, that if not all vertices are given here, then both \sQuote{\code{knn}} and \sQuote{\code{knnk}} will be calculated based on the given vertices only.} \item{...}{These dots are for future extensions and must be empty.} \item{mode}{Character constant to indicate the type of neighbors to consider in directed graphs. -\code{out} considers out-neighbors, \verb{in} considers in-neighbors and \code{all} ignores edge directions.} + \code{out} considers out-neighbors, \verb{in} considers in-neighbors and \code{all} ignores edge directions.} \item{neighbor.degree.mode}{The type of degree to average in directed graphs. -\code{out} averages out-degrees, \verb{in} averages in-degrees and \code{all} ignores edge directions for the degree calculation.} + \code{out} averages out-degrees, \verb{in} averages in-degrees and \code{all} ignores edge directions for the degree calculation.} \item{weights}{Weight vector. -If the graph has a \code{weight} edge attribute, then this is used by default. -If this argument is given, then vertex strength (see \code{\link[=strength]{strength()}}) is used instead of vertex degree. -But note that \code{knnk} is still given in the function of the normal vertex degree. -Weights are are used to calculate a weighted degree (also called \code{\link[=strength]{strength()}}) instead of the degree.} + If the graph has a \code{weight} edge attribute, then this is used by default. + If this argument is given, then vertex strength (see \code{\link[=strength]{strength()}}) is used instead of vertex degree. + But note that \code{knnk} is still given in the function of the normal vertex degree. + Weights are are used to calculate a weighted degree (also called \code{\link[=strength]{strength()}}) instead of the degree.} } \value{ A list with two members: \describe{ \item{knn}{ A numeric vector giving the average nearest neighbor degree for all vertices in \code{vids}. -} + } \item{knnk}{ A numeric vector, its length is the maximum (total) vertex degree in the graph. -The first element is the average nearest neighbor degree of vertices with degree one, etc. + The first element is the average nearest neighbor degree of vertices with degree one, etc. } } } @@ -60,8 +60,8 @@ The weighted version computes a weighted average of the neighbor degrees as \deqn{k_{nn,u} = \frac{1}{s_u} \sum_v w_{uv} k_v,}{k_nn_u = 1/s_u sum_v w_uv k_v,} where \eqn{s_u = \sum_v w_{uv}}{s_u = sum_v w_uv} is the sum of the incident edge weights of vertex \code{u}, i.e. its strength. -The sum runs over the neighbors \code{v} of vertex \code{u} as indicated by \code{mode}. -\eqn{w_{uv}}{w_uv} denotes the weighted adjacency matrix and \eqn{k_v}{k_v} is the neighbors' degree, + The sum runs over the neighbors \code{v} of vertex \code{u} as indicated by \code{mode}. + \eqn{w_{uv}}{w_uv} denotes the weighted adjacency matrix and \eqn{k_v}{k_v} is the neighbors' degree, specified by \code{neighbor_degree_mode}. } \section{Related documentation in the C library}{ @@ -92,7 +92,7 @@ knn(g5) \references{ Alain Barrat, Marc Barthelemy, Romualdo Pastor-Satorras, Alessandro Vespignani: The architecture of complex weighted networks, Proc. -Natl. Acad. Sci. USA 101, 3747 (2004) + Natl. Acad. Sci. USA 101, 3747 (2004) } \seealso{ Other structural.properties: diff --git a/man/label.propagation.community.Rd b/man/label.propagation.community.Rd index d3074d644b7..bcf1d05cd6e 100644 --- a/man/label.propagation.community.Rd +++ b/man/label.propagation.community.Rd @@ -15,33 +15,33 @@ label.propagation.community( } \arguments{ \item{graph}{The input graph. -Note that the algorithm was originally defined for undirected graphs. -You are advised to set \sQuote{mode} to \code{all} if you pass a directed graph here to treat it as undirected.} + Note that the algorithm was originally defined for undirected graphs. + You are advised to set \sQuote{mode} to \code{all} if you pass a directed graph here to treat it as undirected.} \item{weights}{The weights of the edges. -It must be a positive numeric vector, \code{NULL} or \code{NA}. -If it is \code{NULL} and the input graph has a \sQuote{weight} edge attribute, then that attribute will be used. -If \code{NULL} and no such attribute is present, then the edges will have equal weights. -Set this to \code{NA} if the graph was a \sQuote{weight} edge attribute, but you don't want to use it for community detection. -A larger edge weight means a stronger connection for this function.} + It must be a positive numeric vector, \code{NULL} or \code{NA}. + If it is \code{NULL} and the input graph has a \sQuote{weight} edge attribute, then that attribute will be used. + If \code{NULL} and no such attribute is present, then the edges will have equal weights. + Set this to \code{NA} if the graph was a \sQuote{weight} edge attribute, but you don't want to use it for community detection. + A larger edge weight means a stronger connection for this function.} \item{...}{These dots are for future extensions and must be empty.} \item{mode}{Logical, whether to consider edge directions for the label propagation, and if so, in which direction the labels should propagate. -Ignored for undirected graphs. -"all" means to ignore edge directions (even in directed graphs). -"out" means to propagate labels along the natural direction of the edges. -"in" means to propagate labels backwards (i.e. from head to tail).} + Ignored for undirected graphs. + "all" means to ignore edge directions (even in directed graphs). + "out" means to propagate labels along the natural direction of the edges. + "in" means to propagate labels backwards (i.e. from head to tail).} \item{initial}{The initial state. -If \code{NULL}, every vertex will have a different label at the beginning. -Otherwise it must be a vector with an entry for each vertex. -Non-negative values denote different labels, negative entries denote vertices without labels.} + If \code{NULL}, every vertex will have a different label at the beginning. + Otherwise it must be a vector with an entry for each vertex. + Non-negative values denote different labels, negative entries denote vertices without labels.} \item{fixed}{Logical vector denoting which labels are fixed. -Of course this makes sense only if you provided an initial state, otherwise this element will be ignored. -Also note that vertices without labels cannot be fixed.} + Of course this makes sense only if you provided an initial state, otherwise this element will be ignored. + Also note that vertices without labels cannot be fixed.} } \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/laplacian_matrix.Rd b/man/laplacian_matrix.Rd index ed285c78269..62dbf06a94e 100644 --- a/man/laplacian_matrix.Rd +++ b/man/laplacian_matrix.Rd @@ -16,14 +16,14 @@ laplacian_matrix( \item{graph}{The input graph.} \item{weights}{An optional vector giving edge weights for weighted Laplacian matrix. -If this is \code{NULL} and the graph has an edge attribute called \code{weight}, then it will be used automatically. -Set this to \code{NA} if you want the unweighted Laplacian on a graph that has a \code{weight} edge attribute.} + If this is \code{NULL} and the graph has an edge attribute called \code{weight}, then it will be used automatically. + Set this to \code{NA} if you want the unweighted Laplacian on a graph that has a \code{weight} edge attribute.} \item{sparse}{Logical, whether to return the result as a sparse matrix. -The \code{Matrix} package is required for sparse matrices.} + The \code{Matrix} package is required for sparse matrices.} \item{normalization}{The normalization method to use when calculating the Laplacian matrix. -See the "Normalization methods" section on this page.} + See the "Normalization methods" section on this page.} \item{normalized}{Deprecated, use \code{normalization} instead.} } @@ -38,12 +38,12 @@ The Laplacian Matrix of a graph is a symmetric matrix having the same number of the degree of vertex i if if i==j, -1 if i!=j and there is an edge between vertices i and j and 0 otherwise. The Laplacian matrix can also be normalized, with several conventional normalization methods. -See the "Normalization methods" section on this page. + See the "Normalization methods" section on this page. The weighted version of the Laplacian simply works with the weighted degree instead of the plain degree. -I.e. (i,j) is d[i], the weighted degree of vertex i if if i==j, -w if i!=j and there is an edge between vertices i and j with weight w, + I.e. (i,j) is d[i], the weighted degree of vertex i if if i==j, -w if i!=j and there is an edge between vertices i and j with weight w, and 0 otherwise. -The weighted degree of a vertex is the sum of the weights of its adjacent edges. + The weighted degree of a vertex is the sum of the weights of its adjacent edges. } \section{Normalization methods}{ diff --git a/man/lastcit.game.Rd b/man/lastcit.game.Rd index 96330b64dca..e25aa5a541a 100644 --- a/man/lastcit.game.Rd +++ b/man/lastcit.game.Rd @@ -18,10 +18,10 @@ lastcit.game( \item{edges}{Number of edges per step.} \item{agebins}{Number of aging bins. -The default \code{NULL} uses \code{n / 7100}.} + The default \code{NULL} uses \code{n / 7100}.} \item{pref}{Vector (\code{sample_last_cit()} and \code{sample_cit_types()} or matrix (\code{sample_cit_cit_types()}) giving the (unnormalized) citation probabilities for the different vertex types. -The default \code{NULL} uses \code{(1:(agebins + 1))^-3} for \code{sample_last_cit()} and all-one probabilities for the other two.} + The default \code{NULL} uses \code{(1:(agebins + 1))^-3} for \code{sample_last_cit()} and all-one probabilities for the other two.} \item{directed}{Logical, whether to generate directed networks.} } diff --git a/man/layout.bipartite.Rd b/man/layout.bipartite.Rd index ebd840b09d1..d7127ea72b5 100644 --- a/man/layout.bipartite.Rd +++ b/man/layout.bipartite.Rd @@ -8,17 +8,17 @@ layout.bipartite(graph, types = NULL, hgap = 1, vgap = 1, maxiter = 100) } \arguments{ \item{graph}{The bipartite input graph. -It should have a logical \sQuote{\code{type}} vertex attribute, or the \code{types} argument must be given.} + It should have a logical \sQuote{\code{type}} vertex attribute, or the \code{types} argument must be given.} \item{types}{A logical vector, the vertex types. -If this argument is \code{NULL} (the default), then the \sQuote{\code{type}} vertex attribute is used.} + If this argument is \code{NULL} (the default), then the \sQuote{\code{type}} vertex attribute is used.} \item{hgap}{Real scalar, the minimum horizontal gap between vertices in the same layer.} \item{vgap}{Real scalar, the distance between the two layers.} \item{maxiter}{Integer scalar, the maximum number of iterations in the crossing minimization stage. -100 is a reasonable default; if you feel that you have too many edge crossings, increase this.} + 100 is a reasonable default; if you feel that you have too many edge crossings, increase this.} } \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.davidson.harel.Rd b/man/layout.davidson.harel.Rd index f99d8c88bb8..8d649a5ede8 100644 --- a/man/layout.davidson.harel.Rd +++ b/man/layout.davidson.harel.Rd @@ -19,31 +19,31 @@ layout.davidson.harel( } \arguments{ \item{graph}{The graph to lay out. -Edge directions are ignored.} + Edge directions are ignored.} \item{coords}{Optional starting positions for the vertices. -If this argument is not \code{NULL} then it should be an appropriate matrix of starting coordinates.} + If this argument is not \code{NULL} then it should be an appropriate matrix of starting coordinates.} \item{maxiter}{Number of iterations to perform in the first phase.} \item{fineiter}{Number of iterations in the fine tuning phase. -The default \code{NULL} uses \code{max(10, log2(vcount(graph)))}.} + The default \code{NULL} uses \code{max(10, log2(vcount(graph)))}.} \item{cool.fact}{Cooling factor.} \item{weight.node.dist}{Weight for the node-node distances component of the energy function.} \item{weight.border}{Weight for the distance from the border component of the energy function. -It can be set to zero, if vertices are allowed to sit on the border.} + It can be set to zero, if vertices are allowed to sit on the border.} \item{weight.edge.lengths}{Weight for the edge length component of the energy function. -The default \code{NULL} uses \code{edge_density(graph) / 10}.} + The default \code{NULL} uses \code{edge_density(graph) / 10}.} \item{weight.edge.crossings}{Weight for the edge crossing component of the energy function. -The default \code{NULL} uses \code{1 - sqrt(edge_density(graph))}.} + The default \code{NULL} uses \code{1 - sqrt(edge_density(graph))}.} \item{weight.node.edge.dist}{Weight for the node-edge distance component of the energy function. -The default \code{NULL} uses \code{0.2 * (1 - edge_density(graph))}.} + The default \code{NULL} uses \code{0.2 * (1 - edge_density(graph))}.} } \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.drl.Rd b/man/layout.drl.Rd index b79757f04a1..a542860e9b8 100644 --- a/man/layout.drl.Rd +++ b/man/layout.drl.Rd @@ -19,22 +19,22 @@ layout.drl( \item{use.seed}{Logical, whether to use the coordinates given in the \code{seed} argument as a starting point.} \item{seed}{A matrix with two columns, the starting coordinates for the vertices is \code{use.seed} is \code{TRUE}. -It is ignored otherwise. -The default \code{NULL} draws uniformly random starting coordinates.} + It is ignored otherwise. + The default \code{NULL} draws uniformly random starting coordinates.} \item{options}{Options for the layout generator, a named list. -See details below. -The default \code{NULL} uses \code{drl_defaults$default}.} + See details below. + The default \code{NULL} uses \code{drl_defaults$default}.} \item{weights}{The weights of the edges. -It must be a positive numeric vector, \code{NULL} or \code{NA}. -If it is \code{NULL} and the input graph has a \sQuote{weight} edge attribute, then that attribute will be used. -If \code{NULL} and no such attribute is present, then the edges will have equal weights. -Set this to \code{NA} if the graph was a \sQuote{weight} edge attribute, but you don't want to use it for the layout. -Larger edge weights correspond to stronger connections.} + It must be a positive numeric vector, \code{NULL} or \code{NA}. + If it is \code{NULL} and the input graph has a \sQuote{weight} edge attribute, then that attribute will be used. + If \code{NULL} and no such attribute is present, then the edges will have equal weights. + Set this to \code{NA} if the graph was a \sQuote{weight} edge attribute, but you don't want to use it for the layout. + Larger edge weights correspond to stronger connections.} \item{dim}{Either \sQuote{2} or \sQuote{3}, it specifies whether we want a two dimensional or a three dimensional layout. -Note that because of the nature of the DrL algorithm, the three dimensional layout takes significantly longer to compute.} + Note that because of the nature of the DrL algorithm, the three dimensional layout takes significantly longer to compute.} } \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.gem.Rd b/man/layout.gem.Rd index 9d214936e8d..71be2c1ff4d 100644 --- a/man/layout.gem.Rd +++ b/man/layout.gem.Rd @@ -15,25 +15,25 @@ layout.gem( } \arguments{ \item{graph}{The input graph. -Edge directions are ignored.} + Edge directions are ignored.} \item{coords}{Starting coordinates in a two or three column matrix, depending on the \code{dim} argument. -Default: \code{NULL}.} + Default: \code{NULL}.} \item{maxiter}{The maximum number of iterations to perform. -Updating a single vertex counts as an iteration. -The default \code{NULL} uses 40 * n * n, where n is the number of vertices. -The original paper suggests 4 * n * n, but this usually only works if the other parameters are set up carefully.} + Updating a single vertex counts as an iteration. + The default \code{NULL} uses 40 * n * n, where n is the number of vertices. + The original paper suggests 4 * n * n, but this usually only works if the other parameters are set up carefully.} \item{temp.max}{The maximum allowed local temperature. -The default \code{NULL} uses the number of vertices.} + The default \code{NULL} uses the number of vertices.} \item{temp.min}{The global temperature at which the algorithm terminates (even before reaching \code{maxiter} iterations). -A reasonable default is 1/10.} + A reasonable default is 1/10.} \item{temp.init}{Initial local temperature of all vertices. -The default \code{NULL} uses the square root of the number of vertices.} + The default \code{NULL} uses the square root of the number of vertices.} } \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.graphopt.Rd b/man/layout.graphopt.Rd index ea86d7757f1..982f394f982 100644 --- a/man/layout.graphopt.Rd +++ b/man/layout.graphopt.Rd @@ -19,28 +19,28 @@ layout.graphopt( \item{graph}{The input graph.} \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 algorithm. -If not given, then a random starting matrix is used.} + This matrix will be used as starting positions for the algorithm. + If not given, then a random starting matrix is used.} \item{niter}{Integer scalar, the number of iterations to perform. -Should be a couple of hundred in general. -If you have a large graph then you might want to only do a few iterations and then check the result. -If it is not good enough you can feed it in again in the \code{start} argument. -The default value is 500.} + Should be a couple of hundred in general. + If you have a large graph then you might want to only do a few iterations and then check the result. + If it is not good enough you can feed it in again in the \code{start} argument. + The default value is 500.} \item{charge}{The charge of the vertices, used to calculate electric repulsion. -The default is 0.001.} + The default is 0.001.} \item{mass}{The mass of the vertices, used for the spring forces. -The default is 30.} + The default is 30.} \item{spring.length}{The length of the springs, an integer number. -The default value is zero.} + The default value is zero.} \item{spring.constant}{The spring constant, the default value is one.} \item{max.sa.movement}{Real constant, it gives the maximum amount of movement allowed in a single step along a single axis. -The default value is 5.} + The default value is 5.} } \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.grid.Rd b/man/layout.grid.Rd index b5b32ca9b88..05a5d140adc 100644 --- a/man/layout.grid.Rd +++ b/man/layout.grid.Rd @@ -10,15 +10,15 @@ layout.grid(graph, width = 0, height = 0, dim = 2) \item{graph}{The input graph.} \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 square root of the number of vertices in the graph, + If this is zero or negative, then for 2d layouts the width of the grid will be the square root of the number of vertices in the graph, rounded up to the next integer. -Similarly, it will be the cube root for 3d layouts.} + Similarly, it will be the cube root for 3d layouts.} \item{height}{The number of vertices in a single column of the grid, for three dimensional layouts. -If this is zero or negative, then it is determinted automatically.} + If this is zero or negative, then it is determinted automatically.} \item{dim}{Two or three. -Whether to make 2d or a 3d layout.} + Whether to make 2d or a 3d layout.} } \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.mds.Rd b/man/layout.mds.Rd index b2e10322397..feb38563b46 100644 --- a/man/layout.mds.Rd +++ b/man/layout.mds.Rd @@ -10,7 +10,7 @@ layout.mds(graph, dist = NULL, dim = 2, options = arpack_defaults()) \item{graph}{The input graph.} \item{dist}{The distance matrix for the multidimensional scaling. -If \code{NULL} (the default), + If \code{NULL} (the default), then the unweighted shortest path matrix is used.} \item{dim}{\code{layout_with_mds()} supports dimensions up to the number of nodes minus one, but only if the graph is connected; @@ -18,7 +18,7 @@ for unconnected graphs, the only possible value is 2. This is because \code{merg \item{options}{\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} This argument is not supported from igraph version 1.6.0, as ARPACK is not used any more for solving the eigenproblem. -Supplying it raises an error.} + Supplying it raises an error.} } \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.merge.Rd b/man/layout.merge.Rd index e98c89858a5..31b9abea735 100644 --- a/man/layout.merge.Rd +++ b/man/layout.merge.Rd @@ -12,7 +12,7 @@ layout.merge(graphs, layouts, method = "dla") \item{layouts}{A list of two-column matrices.} \item{method}{Character constant giving the method to use. -Right now only \code{dla} is implemented.} + Right now only \code{dla} is implemented.} } \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.star.Rd b/man/layout.star.Rd index adee115aa05..cda62265894 100644 --- a/man/layout.star.Rd +++ b/man/layout.star.Rd @@ -10,10 +10,10 @@ layout.star(graph, center = V(graph)[1], order = NULL) \item{graph}{The graph to layout.} \item{center}{The ID of the vertex to put in the center. -The default \code{NULL} uses the first vertex.} + The default \code{NULL} uses the first vertex.} \item{order}{Numeric vector, the order of the vertices along the perimeter. -The default ordering is given by the vertex IDs.} + The default ordering is given by the vertex IDs.} } \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.sugiyama.Rd b/man/layout.sugiyama.Rd index eedbee60251..7fc30148970 100644 --- a/man/layout.sugiyama.Rd +++ b/man/layout.sugiyama.Rd @@ -18,25 +18,25 @@ layout.sugiyama( \item{graph}{The input graph.} \item{layers}{A numeric vector of the layer indices of the vertices. -Layers are numbered from one. -Default: \code{NULL}, igraph calculates the layers automatically.} + Layers are numbered from one. + Default: \code{NULL}, igraph calculates the layers automatically.} \item{hgap}{Real scalar, the minimum horizontal gap between vertices in the same layer.} \item{vgap}{Real scalar, the distance between layers.} \item{maxiter}{Integer scalar, the maximum number of iterations in the crossing minimization stage. -100 is a reasonable default; if you feel that you have too many edge crossings, increase this.} + 100 is a reasonable default; if you feel that you have too many edge crossings, increase this.} \item{weights}{Optional edge weight vector. -If \code{NULL}, then the 'weight' edge attribute is used, if there is one. -Supply \code{NA} here and igraph ignores the edge weights. -These are used only if the graph contains cycles; igraph will tend to reverse edges with smaller weights when breaking the cycles.} + If \code{NULL}, then the 'weight' edge attribute is used, if there is one. + Supply \code{NA} here and igraph ignores the edge weights. + These are used only if the graph contains cycles; igraph will tend to reverse edges with smaller weights when breaking the cycles.} \item{attributes}{Which graph/vertex/edge attributes to keep in the extended graph. -\sQuote{default} keeps the \sQuote{size}, \sQuote{size2}, \sQuote{shape}, + \sQuote{default} keeps the \sQuote{size}, \sQuote{size2}, \sQuote{shape}, \sQuote{label} and \sQuote{color} vertex attributes and the \sQuote{arrow.mode} and \sQuote{arrow.size} edge attributes. -\sQuote{all} keep all graph, vertex and edge attributes, \sQuote{none} keeps none of them.} + \sQuote{all} keep all graph, vertex and edge attributes, \sQuote{none} keeps none of 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/layout_.Rd b/man/layout_.Rd index 86b6ee49a93..0f70ae69d1b 100644 --- a/man/layout_.Rd +++ b/man/layout_.Rd @@ -17,64 +17,64 @@ layout_(graph, layout, ...) \item{graph}{The input graph.} \item{layout}{The layout specification. -It must be a call to a layout specification function.} + It must be a call to a layout specification function.} \item{...}{Further modifiers, see a complete list below. -For the \code{\link[=print]{print()}} methods, it is ignored.} + For the \code{\link[=print]{print()}} methods, it is ignored.} \item{x}{The layout specification} } \value{ The return value of the layout function, usually a two column matrix. -For 3D layouts a three column matrix. + For 3D layouts a three column matrix. } \description{ This is a generic function to apply a layout function to a graph. } \details{ There are two ways to calculate graph layouts in igraph. -The first way is to call a layout function (they all have prefix \code{layout_()} on a graph, to get the vertex coordinates. + The first way is to call a layout function (they all have prefix \code{layout_()} on a graph, to get the vertex coordinates. The second way (new in igraph 0.8.0), has two steps, and it is more flexible. -First you call a layout specification function (the one without the \code{layout_()} prefix, + First you call a layout specification function (the one without the \code{layout_()} prefix, and then \code{layout_()} (or \code{\link[=add_layout_]{add_layout_()}}) to perform the layouting. The second way is preferred, as it is more flexible. -It allows operations before and after the layouting. -E.g. using the \code{component_wise()} argument, the layout can be calculated separately for each component, + It allows operations before and after the layouting. + E.g. using the \code{component_wise()} argument, the layout can be calculated separately for each component, and then merged to get the final results. } \section{Modifiers}{ Modifiers modify how a layout calculation is performed. -Modifiers are applied in the order they are specified as arguments to \code{layout_()}. + Modifiers are applied in the order they are specified as arguments to \code{layout_()}. There are two types of modifiers: \itemize{ \item \strong{Pre-layout modifiers} affect how the layout is calculated. -Only one pre-layout modifier can be used at a time. -\item \strong{Post-layout modifiers} transform the resulting coordinates. -Multiple post-layout modifiers can be chained together. -} + Only one pre-layout modifier can be used at a time. + \item \strong{Post-layout modifiers} transform the resulting coordinates. + Multiple post-layout modifiers can be chained together. + } Currently implemented modifiers: \itemize{ \item \code{component_wise()} (pre-layout) calculates the layout separately for each component of the graph, and then merges them. -\item \code{normalize()} (post-layout) scales the layout to a square. -} + \item \code{normalize()} (post-layout) scales the layout to a square. + } Custom modifiers can be created using the \code{layout_modifier()} function. -A custom modifier must specify: + A custom modifier must specify: \itemize{ \item \code{id}: A unique identifier string for the modifier \item \code{type}: Either \code{"pre"} for pre-layout or \code{"post"} for post-layout \item \code{args}: A list of arguments to pass to the apply function \item \code{apply}: A function with signature \verb{function(graph, layout, modifier_args)} that performs the modification. -For pre-layout modifiers, \code{layout} is the layout specification. -For post-layout modifiers, \code{layout} is the coordinate matrix to transform. -} + For pre-layout modifiers, \code{layout} is the layout specification. + For post-layout modifiers, \code{layout} is the coordinate matrix to transform. + } } \examples{ diff --git a/man/layout_as_bipartite.Rd b/man/layout_as_bipartite.Rd index d19123652b8..0eb94de7cf3 100644 --- a/man/layout_as_bipartite.Rd +++ b/man/layout_as_bipartite.Rd @@ -15,10 +15,10 @@ layout_as_bipartite( } \arguments{ \item{graph}{The bipartite input graph. -It should have a logical \sQuote{\code{type}} vertex attribute, or the \code{types} argument must be given.} + It should have a logical \sQuote{\code{type}} vertex attribute, or the \code{types} argument must be given.} \item{types}{A logical vector, the vertex types. -If this argument is \code{NULL} (the default), then the \sQuote{\code{type}} vertex attribute is used.} + If this argument is \code{NULL} (the default), then the \sQuote{\code{type}} vertex attribute is used.} \item{...}{These dots are for future extensions and must be empty.} @@ -27,7 +27,7 @@ If this argument is \code{NULL} (the default), then the \sQuote{\code{type}} ver \item{vgap}{Real scalar, the distance between the two layers.} \item{maxiter}{Integer scalar, the maximum number of iterations in the crossing minimization stage. -100 is a reasonable default; if you feel that you have too many edge crossings, increase this.} + 100 is a reasonable default; if you feel that you have too many edge crossings, increase this.} } \value{ A matrix with two columns and as many rows as the number of vertices in the input graph. @@ -37,7 +37,7 @@ Minimize edge-crossings in a simple two-row (or column) layout for bipartite gra } \details{ The layout is created by first placing the vertices in two rows, according to their types. -Then the positions within the rows are optimized to minimize edge crossings, using the Sugiyama algorithm (see \code{\link[=layout_with_sugiyama]{layout_with_sugiyama()}}). + Then the positions within the rows are optimized to minimize edge crossings, using the Sugiyama algorithm (see \code{\link[=layout_with_sugiyama]{layout_with_sugiyama()}}). } \section{Related documentation in the C library}{ \href{https://igraph.org/c/html/0.10.17/igraph-Layout.html#igraph_layout_bipartite}{\code{layout_bipartite()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}} @@ -59,7 +59,7 @@ g \%>\% } \seealso{ \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_()}}. + 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_()}}, diff --git a/man/layout_as_star.Rd b/man/layout_as_star.Rd index c8922cab6c9..17fbc7a723a 100644 --- a/man/layout_as_star.Rd +++ b/man/layout_as_star.Rd @@ -12,10 +12,10 @@ layout_as_star(graph, ..., center = NULL, order = NULL) \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.} + The default \code{NULL} uses the first vertex.} \item{order}{Numeric vector, the order of the vertices along the perimeter. -The default ordering is given by the vertex IDs.} + The default ordering is given by the vertex IDs.} } \value{ A matrix with two columns and as many rows as the number of vertices in the input graph. @@ -41,7 +41,7 @@ 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. -See \code{\link[=as_star]{as_star()}} to build a lazy layout specification for \code{\link[=add_layout_]{add_layout_()}}. + 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_()}}, diff --git a/man/layout_as_tree.Rd b/man/layout_as_tree.Rd index aacb428913f..542a5d36171 100644 --- a/man/layout_as_tree.Rd +++ b/man/layout_as_tree.Rd @@ -20,30 +20,30 @@ 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 trees + If this is a non-empty vector then the supplied vertex IDs are used as the roots of the trees (or a single tree if the graph is connected). -If it is an empty vector, + If it is an empty vector, then the root vertices are automatically calculated based on topological sorting, performed with the opposite mode than the \code{mode} argument. -After the vertices have been sorted, one is selected from each component.} + After the vertices have been sorted, one is selected from each component.} \item{circular}{Logical, whether to plot the tree in a circular fashion. -Defaults to \code{FALSE}, so the tree branches are going bottom-up (or top-down, see the \code{flip.y} argument.} + Defaults to \code{FALSE}, so the tree branches are going bottom-up (or top-down, see the \code{flip.y} argument.} \item{rootlevel}{This argument can be useful when drawing forests which are not trees (i.e. they are unconnected and have tree components). -It specifies the level of the root vertices for every tree in the forest. -It is only considered if the \code{roots} argument is not an empty vector.} + It specifies the level of the root vertices for every tree in the forest. + It is only considered if the \code{roots} argument is not an empty vector.} \item{mode}{Specifies which edges to consider when building the tree. -If it is \sQuote{out}, then only the outgoing, + If it is \sQuote{out}, then only the outgoing, if it is \sQuote{in}, then only the incoming edges of a parent are considered. -If it is \sQuote{all} then all edges are used (this was the behavior in igraph 0.5 and before). -This parameter also influences how the root vertices are calculated, if they are not given. -See the \code{roots} parameter.} + If it is \sQuote{all} then all edges are used (this was the behavior in igraph 0.5 and before). + This parameter also influences how the root vertices are calculated, if they are not given. + See the \code{roots} parameter.} \item{flip.y}{Logical, whether to flip the \sQuote{y} coordinates. -The default is flipping because that puts the root vertex on the top.} + The default is flipping because that puts the root vertex on the top.} } \value{ A numeric matrix with two columns, and one row for each vertex. @@ -53,8 +53,8 @@ A tree-like layout, it is perfect for trees, acceptable for graphs with not too } \details{ Arranges the nodes in a tree where the given node is used as the root. -The tree is directed downwards and the parents are centered above its children. -For the exact algorithm, the reference below. + The tree is directed downwards and the parents are centered above its children. + For the exact algorithm, the reference below. If the given graph is not a tree, a breadth-first search is executed first to obtain a possible spanning tree. } @@ -78,7 +78,7 @@ plot(tree2, layout = layout_as_tree(tree2, } \references{ Reingold, E and Tilford, J (1981). Tidier drawing of trees. -\emph{IEEE Trans. on Softw. Eng.}, SE-7(2):223--228. + \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_()}}. diff --git a/man/layout_in_circle.Rd b/man/layout_in_circle.Rd index c892fabc0e1..cadb6ccf4f6 100644 --- a/man/layout_in_circle.Rd +++ b/man/layout_in_circle.Rd @@ -10,8 +10,8 @@ layout_in_circle(graph, order = NULL) \item{graph}{The input graph.} \item{order}{The vertices to place on the circle, in the order of their 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.} + 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.} } \value{ A numeric matrix with two columns, and one row for each vertex. diff --git a/man/layout_modifier.Rd b/man/layout_modifier.Rd index b108e847aff..56fa03bcc2a 100644 --- a/man/layout_modifier.Rd +++ b/man/layout_modifier.Rd @@ -8,7 +8,7 @@ layout_modifier(...) } \arguments{ \item{...}{Named arguments that define the modifier. -Must include: + Must include: \describe{ \item{ID}{A unique identifier string for the modifier} \item{type}{Either \code{"pre"} for pre-layout or \code{"post"} for post-layout} @@ -22,7 +22,7 @@ An object of class \code{igraph_layout_modifier}. } \description{ This is a constructor function for creating custom layout modifiers. -Layout modifiers can be used with \code{\link[=layout_]{layout_()}} to modify how layouts are calculated or to transform the resulting coordinates. + Layout modifiers can be used with \code{\link[=layout_]{layout_()}} to modify how layouts are calculated or to transform the resulting coordinates. } \examples{ # Create a custom post-layout modifier that scales coordinates diff --git a/man/layout_nicely.Rd b/man/layout_nicely.Rd index 41e1b4c008e..807d4515beb 100644 --- a/man/layout_nicely.Rd +++ b/man/layout_nicely.Rd @@ -18,11 +18,11 @@ A numeric matrix with two or three columns. } \description{ This function tries to choose an appropriate graph layout algorithm for the graph, automatically, based on a simple algorithm. -See details below. + See details below. } \details{ \code{layout_nicely()} tries to choose an appropriate layout function for the supplied graph, and uses that to generate the layout. -The current implementation works like this: + The current implementation works like this: \enumerate{ \item If the graph has a graph attribute called \sQuote{layout}, then this is used. If this attribute is an R function, then it is called, with the graph and any other extra arguments. @@ -36,19 +36,19 @@ additional \sQuote{z} vertex attribute, that is also used. \item Otherwise, if the graph is connected and has less than 1000 vertices, the Fruchterman-Reingold layout is used, by calling \code{layout_with_fr()}. -\item Otherwise the DrL layout is used, \code{layout_with_drl()} is called. } + \item Otherwise the DrL layout is used, \code{layout_with_drl()} is called. } In layout algorithm implementations, an argument named \sQuote{weights} is typically used to specify the weights of the edges if the layout algorithm supports them. -In this case, + In this case, omitting \sQuote{weights} or setting it to \code{NULL} will make igraph use the 'weight' edge attribute from the graph if it is present. -However, most layout algorithms do not support non-positive weights, + However, most layout algorithms do not support non-positive weights, so \code{layout_nicely()} would fail if you simply called it on your graph without specifying explicit weights and the weights happened to include non-positive numbers. -We strive to ensure that \code{layout_nicely()} works out-of-the-box for most graphs, + We strive to ensure that \code{layout_nicely()} works out-of-the-box for most graphs, so the rule is that if you omit \sQuote{weights} or set it to \code{NULL} and \code{layout_nicely()} would end up calling \code{layout_with_fr()} or \code{layout_with_drl()}, we do not forward the weights to these functions and issue a warning about this. -You can use \code{weights = NA} to silence the warning. + You can use \code{weights = NA} to silence the warning. } \section{Related documentation in the C library}{ \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Layout.html#igraph_layout_align}{\code{layout_align()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_is_forest}{\code{is_forest()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_edges}{\code{edges()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_get_eids}{\code{get_eids()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_ecount}{\code{ecount()}} @@ -56,7 +56,7 @@ You can use \code{weights = NA} to silence the warning. \seealso{ \code{\link[=plot.igraph]{plot.igraph()}}. -See \code{\link[=nicely]{nicely()}} to build a lazy layout specification for \code{\link[=add_layout_]{add_layout_()}}. + 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_()}}, diff --git a/man/layout_on_grid.Rd b/man/layout_on_grid.Rd index ba705c52fab..b907dc60c51 100644 --- a/man/layout_on_grid.Rd +++ b/man/layout_on_grid.Rd @@ -12,15 +12,15 @@ layout_on_grid(graph, ..., width = 0, height = 0, dim = 2) \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 square root of the number of vertices in the graph, + If this is zero or negative, then for 2d layouts the width of the grid will be the square root of the number of vertices in the graph, rounded up to the next integer. -Similarly, it will be the cube root for 3d layouts.} + Similarly, it will be the cube root for 3d layouts.} \item{height}{The number of vertices in a single column of the grid, for three dimensional layouts. -If this is zero or negative, then it is determinted automatically.} + If this is zero or negative, then it is determinted automatically.} \item{dim}{Two or three. -Whether to make 2d or a 3d layout.} + Whether to make 2d or a 3d layout.} } \value{ A two-column or three-column matrix. @@ -30,7 +30,7 @@ This layout places vertices on a rectangular grid, in two or three dimensions. } \details{ The function places the vertices on a simple rectangular grid, one after the other. -If you want to change the order of the vertices, then see the \code{\link[=permute]{permute()}} function. + If you want to change the order of the vertices, then see the \code{\link[=permute]{permute()}} function. } \section{Related documentation in the C library}{ \href{https://igraph.org/c/html/0.10.17/igraph-Layout.html#igraph_layout_grid_3d}{\code{layout_grid_3d()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Layout.html#igraph_layout_grid}{\code{layout_grid()}} @@ -51,7 +51,7 @@ if (interactive() && requireNamespace("rgl", quietly = TRUE)) { } \seealso{ \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_()}}. + 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_()}}, diff --git a/man/layout_on_sphere.Rd b/man/layout_on_sphere.Rd index e6ed319b018..f65d355fa22 100644 --- a/man/layout_on_sphere.Rd +++ b/man/layout_on_sphere.Rd @@ -17,7 +17,7 @@ Place vertices on a sphere, approximately uniformly, in the order of their verte } \details{ \code{layout_on_sphere()} places the vertices (approximately) uniformly on the surface of a sphere, this is thus a 3d layout. -It is not clear however what \dQuote{uniformly on a sphere} means. + It is not clear however what \dQuote{uniformly on a sphere} means. If you want to order the vertices differently, then permute them using the \code{\link[=permute]{permute()}} function. } diff --git a/man/layout_randomly.Rd b/man/layout_randomly.Rd index d632e4deb6f..f1bed5acc7c 100644 --- a/man/layout_randomly.Rd +++ b/man/layout_randomly.Rd @@ -12,7 +12,7 @@ layout_randomly(graph, ..., dim = c(2, 3)) \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.} + It must be 2 or 3.} } \value{ A numeric matrix with two or three columns. @@ -22,7 +22,7 @@ This function uniformly randomly places the vertices of the graph in two or thre } \details{ Randomly places vertices on a [-1,1] square (in 2d) or in a cube (in 3d). -It is probably a useless layout, but it can use as a starting point for other layout generators. + It is probably a useless layout, but it can use as a starting point for other layout generators. } \section{Related documentation in the C library}{ \href{https://igraph.org/c/html/0.10.17/igraph-Layout.html#igraph_layout_random_3d}{\code{layout_random_3d()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Layout.html#igraph_layout_random}{\code{layout_random()}} diff --git a/man/layout_spec.Rd b/man/layout_spec.Rd index 5d9a08b9ab4..819afc7eba9 100644 --- a/man/layout_spec.Rd +++ b/man/layout_spec.Rd @@ -62,13 +62,13 @@ 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[=layout_]{layout_()}} or \code{\link[=add_layout_]{add_layout_()}}. -The specification is only evaluated when the layout is actually computed, + 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{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_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()}}. } diff --git a/man/layout_with_dh.Rd b/man/layout_with_dh.Rd index 7217876157a..4be51809fb6 100644 --- a/man/layout_with_dh.Rd +++ b/man/layout_with_dh.Rd @@ -20,43 +20,43 @@ layout_with_dh( } \arguments{ \item{graph}{The graph to lay out. -Edge directions are ignored.} + Edge directions are ignored.} \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 coordinates.} + If this argument is not \code{NULL} then it should be an appropriate matrix of starting coordinates.} \item{maxiter}{Number of iterations to perform in the first phase.} \item{fineiter}{Number of iterations in the fine tuning phase. -The default \code{NULL} uses \code{max(10, log2(vcount(graph)))}.} + The default \code{NULL} uses \code{max(10, log2(vcount(graph)))}.} \item{cool.fact}{Cooling factor.} \item{weight.node.dist}{Weight for the node-node distances component of the energy function.} \item{weight.border}{Weight for the distance from the border component of the energy function. -It can be set to zero, if vertices are allowed to sit on the border.} + It can be set to zero, if vertices are allowed to sit on the border.} \item{weight.edge.lengths}{Weight for the edge length component of the energy function. -The default \code{NULL} uses \code{edge_density(graph) / 10}.} + The default \code{NULL} uses \code{edge_density(graph) / 10}.} \item{weight.edge.crossings}{Weight for the edge crossing component of the energy function. -The default \code{NULL} uses \code{1 - sqrt(edge_density(graph))}.} + The default \code{NULL} uses \code{1 - sqrt(edge_density(graph))}.} \item{weight.node.edge.dist}{Weight for the node-edge distance component of the energy function. -The default \code{NULL} uses \code{0.2 * (1 - edge_density(graph))}.} + The default \code{NULL} uses \code{0.2 * (1 - edge_density(graph))}.} } \value{ A matrix with two columns, containing the x and y coordinates of the vertices: \describe{ \item{x}{ The x-coordinate of the vertex. -} + } \item{y}{ The y-coordinate of the vertex. -} + } } } \description{ @@ -65,17 +65,17 @@ Place vertices of a graph on the plane, according to the simulated annealing alg \details{ This function implements the algorithm by Davidson and Harel, see Ron Davidson, David Harel: Drawing Graphs Nicely Using Simulated Annealing. -ACM Transactions on Graphics 15(4), pp. 301-331, 1996. + ACM Transactions on Graphics 15(4), pp. 301-331, 1996. The algorithm uses simulated annealing and a sophisticated energy function, which is unfortunately hard to parameterize for different graphs. -The original publication did not disclose any parameter values, and the ones below were determined by experimentation. + The original publication did not disclose any parameter values, and the ones below were determined by experimentation. The algorithm consists of two phases, an annealing phase, and a fine-tuning phase. -There is no simulated annealing in the second phase. + There is no simulated annealing in the second phase. Our implementation tries to follow the original publication, as much as possible. -The only major difference is that coordinates are explicitly kept within the bounds of the rectangle of the layout. + The only major difference is that coordinates are explicitly kept within the bounds of the rectangle of the layout. } \section{Related documentation in the C library}{ \href{https://igraph.org/c/html/0.10.17/igraph-Layout.html#igraph_layout_davidson_harel}{\code{layout_davidson_harel()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_density}{\code{density()}} @@ -142,7 +142,7 @@ 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. -See \code{\link[=with_dh]{with_dh()}} to build a lazy layout specification for \code{\link[=add_layout_]{add_layout_()}}. + 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_()}}, diff --git a/man/layout_with_drl.Rd b/man/layout_with_drl.Rd index 66db0c5bf57..441b6e707e8 100644 --- a/man/layout_with_drl.Rd +++ b/man/layout_with_drl.Rd @@ -28,22 +28,22 @@ layout_with_drl( \item{use.seed}{Logical, whether to use the coordinates given in the \code{seed} argument as a starting point.} \item{seed}{A matrix with two columns, the starting coordinates for the vertices is \code{use.seed} is \code{TRUE}. -It is ignored otherwise. -The default \code{NULL} draws uniformly random starting coordinates.} + It is ignored otherwise. + The default \code{NULL} draws uniformly random starting coordinates.} \item{options}{Options for the layout generator, a named list. -See details below. -The default \code{NULL} uses \code{drl_defaults$default}.} + See details below. + The default \code{NULL} uses \code{drl_defaults$default}.} \item{weights}{The weights of the edges. -It must be a positive numeric vector, \code{NULL} or \code{NA}. -If it is \code{NULL} and the input graph has a \sQuote{weight} edge attribute, then that attribute will be used. -If \code{NULL} and no such attribute is present, then the edges will have equal weights. -Set this to \code{NA} if the graph was a \sQuote{weight} edge attribute, but you don't want to use it for the layout. -Larger edge weights correspond to stronger connections.} + It must be a positive numeric vector, \code{NULL} or \code{NA}. + If it is \code{NULL} and the input graph has a \sQuote{weight} edge attribute, then that attribute will be used. + If \code{NULL} and no such attribute is present, then the edges will have equal weights. + Set this to \code{NA} if the graph was a \sQuote{weight} edge attribute, but you don't want to use it for the layout. + Larger edge weights correspond to stronger connections.} \item{dim}{Either \sQuote{2} or \sQuote{3}, it specifies whether we want a two dimensional or a three dimensional layout. -Note that because of the nature of the DrL algorithm, the three dimensional layout takes significantly longer to compute.} + Note that because of the nature of the DrL algorithm, the three dimensional layout takes significantly longer to compute.} } \value{ A numeric matrix with two columns. @@ -59,81 +59,81 @@ The generator has the following parameters: \describe{ \item{edge.cut}{ Edge cutting is done in the late stages of the algorithm in order to achieve less dense layouts. -Edges are cut if there is a lot of stress on them (a large value in the objective function sum). -The edge cutting parameter is a value between 0 and 1 with 0 representing no edge cutting and 1 representing maximal edge cutting. -} + Edges are cut if there is a lot of stress on them (a large value in the objective function sum). + The edge cutting parameter is a value between 0 and 1 with 0 representing no edge cutting and 1 representing maximal edge cutting. + } \item{init.iterations}{ Number of iterations in the first phase. -} + } \item{init.temperature}{ Start temperature, first phase. -} + } \item{init.attraction}{ Attraction, first phase. -} + } \item{init.damping.mult}{ Damping, first phase. -} + } \item{liquid.iterations}{ Number of iterations, liquid phase. -} + } \item{liquid.temperature}{ Start temperature, liquid phase. -} + } \item{liquid.attraction}{ Attraction, liquid phase. -} + } \item{liquid.damping.mult}{ Damping, liquid phase. -} + } \item{expansion.iterations}{ Number of iterations, expansion phase. -} + } \item{expansion.temperature}{ Start temperature, expansion phase. -} + } \item{expansion.attraction}{ Attraction, expansion phase. -} + } \item{expansion.damping.mult}{ Damping, expansion phase. -} + } \item{cooldown.iterations}{ Number of iterations, cooldown phase. -} + } \item{cooldown.temperature}{ Start temperature, cooldown phase. -} + } \item{cooldown.attraction}{ Attraction, cooldown phase. -} + } \item{cooldown.damping.mult}{ Damping, cooldown phase. -} + } \item{crunch.iterations}{ Number of iterations, crunch phase. -} + } \item{crunch.temperature}{ Start temperature, crunch phase. -} + } \item{crunch.attraction}{ Attraction, crunch phase. -} + } \item{crunch.damping.mult}{ Damping, crunch phase. -} + } \item{simmer.iterations}{ Number of iterations, simmer phase. -} + } \item{simmer.temperature}{ Start temperature, simmer phase. -} + } \item{simmer.attraction}{ Attraction, simmer phase. -} + } \item{simmer.damping.mult}{ Damping, simmer phase. -} + } } There are five pre-defined parameter settings as well, these are called \code{drl_defaults$default}, \code{drl_defaults$coarsen}, @@ -157,7 +157,7 @@ Reports, 2008. 2936: p. 1-10. } \seealso{ \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_()}}. + 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 5ea21d89697..641acee4b28 100644 --- a/man/layout_with_fr.Rd +++ b/man/layout_with_fr.Rd @@ -28,36 +28,36 @@ layout_with_fr( } \arguments{ \item{graph}{The graph to lay out. -Edge directions are ignored.} + Edge directions are ignored.} \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 coordinates.} + If this argument is not \code{NULL} then it should be an appropriate matrix of starting coordinates.} \item{dim}{Integer scalar, 2 or 3, the dimension of the layout. -Two dimensional layouts are places on a plane, + Two dimensional layouts are places on a plane, three dimensional ones in the 3d space.} \item{niter}{Integer scalar, the number of iterations to perform.} \item{start.temp}{Real scalar, the start temperature. -This is the maximum amount of movement alloved along one axis, within one step, for a vertex. -Currently it is decreased linearly to zero during the iteration. -The default \code{NULL} uses \code{sqrt(vcount(graph))}.} + This is the maximum amount of movement alloved along one axis, within one step, for a vertex. + Currently it is decreased linearly to zero during the iteration. + The default \code{NULL} uses \code{sqrt(vcount(graph))}.} \item{grid}{Character scalar, whether to use the faster, but less accurate grid based implementation of the algorithm. -By default (\dQuote{auto}), the grid-based implementation is used if the graph has more than one thousand vertices.} + By default (\dQuote{auto}), the grid-based implementation is used if the graph has more than one thousand vertices.} \item{weights}{A vector giving edge weights. -The \code{weight} edge attribute is used by default, if present. -If weights are given, then the attraction along the edges will be multiplied by the given edge weights. -This places vertices connected with a highly weighted edge closer to each other. -Weights must be positive.} + The \code{weight} edge attribute is used by default, if present. + If weights are given, then the attraction along the edges will be multiplied by the given edge weights. + This places vertices connected with a highly weighted edge closer to each other. + Weights must be positive.} \item{minx}{Numeric vector that gives lower boundaries for the \sQuote{x} coordinates of the vertices. -The length of the vector must match the number of vertices in the graph. -Default: \code{NULL}.} + The length of the vector must match the number of vertices in the graph. + Default: \code{NULL}.} \item{maxx}{Similar to \code{minx}, but gives the upper boundaries.} @@ -117,7 +117,7 @@ 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. -See \code{\link[=with_fr]{with_fr()}} to build a lazy layout specification for \code{\link[=add_layout_]{add_layout_()}}. + 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_()}}, diff --git a/man/layout_with_gem.Rd b/man/layout_with_gem.Rd index f59b74e60b5..47efa3d1d8a 100644 --- a/man/layout_with_gem.Rd +++ b/man/layout_with_gem.Rd @@ -16,27 +16,27 @@ layout_with_gem( } \arguments{ \item{graph}{The input graph. -Edge directions are ignored.} + Edge directions are ignored.} \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. -Default: \code{NULL}.} + Default: \code{NULL}.} \item{maxiter}{The maximum number of iterations to perform. -Updating a single vertex counts as an iteration. -The default \code{NULL} uses 40 * n * n, where n is the number of vertices. -The original paper suggests 4 * n * n, but this usually only works if the other parameters are set up carefully.} + Updating a single vertex counts as an iteration. + The default \code{NULL} uses 40 * n * n, where n is the number of vertices. + The original paper suggests 4 * n * n, but this usually only works if the other parameters are set up carefully.} \item{temp.max}{The maximum allowed local temperature. -The default \code{NULL} uses the number of vertices.} + The default \code{NULL} uses the number of vertices.} \item{temp.min}{The global temperature at which the algorithm terminates (even before reaching \code{maxiter} iterations). -A reasonable default is 1/10.} + A reasonable default is 1/10.} \item{temp.init}{Initial local temperature of all vertices. -The default \code{NULL} uses the square root of the number of vertices.} + The default \code{NULL} uses the square root of the number of vertices.} } \value{ A numeric matrix with two columns, and as many rows as the number of vertices. @@ -65,7 +65,7 @@ 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()}}. -See \code{\link[=with_gem]{with_gem()}} to build a lazy layout specification for \code{\link[=add_layout_]{add_layout_()}}. + 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_()}}, diff --git a/man/layout_with_graphopt.Rd b/man/layout_with_graphopt.Rd index b4ed5201080..f4bf1076925 100644 --- a/man/layout_with_graphopt.Rd +++ b/man/layout_with_graphopt.Rd @@ -22,28 +22,28 @@ 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 algorithm. -If not given, then a random starting matrix is used.} + This matrix will be used as starting positions for the algorithm. + If not given, then a random starting matrix is used.} \item{niter}{Integer scalar, the number of iterations to perform. -Should be a couple of hundred in general. -If you have a large graph then you might want to only do a few iterations and then check the result. -If it is not good enough you can feed it in again in the \code{start} argument. -The default value is 500.} + Should be a couple of hundred in general. + If you have a large graph then you might want to only do a few iterations and then check the result. + If it is not good enough you can feed it in again in the \code{start} argument. + The default value is 500.} \item{charge}{The charge of the vertices, used to calculate electric repulsion. -The default is 0.001.} + The default is 0.001.} \item{mass}{The mass of the vertices, used for the spring forces. -The default is 30.} + The default is 30.} \item{spring.length}{The length of the springs, an integer number. -The default value is zero.} + The default value is zero.} \item{spring.constant}{The spring constant, the default value is one.} \item{max.sa.movement}{Real constant, it gives the maximum amount of movement allowed in a single step along a single axis. -The default value is 5.} + The default value is 5.} } \value{ A numeric matrix with two columns, and a row for each vertex. @@ -55,7 +55,7 @@ A force-directed layout algorithm, that scales relatively well to large graphs. \code{layout_with_graphopt()} is a port of the graphopt layout algorithm by Michael Schmuhl. graphopt version 0.4.1 was rewritten in C and the support for layers was removed (might be added later) and a code was a bit reorganized to avoid some unnecessary steps is the node charge (see below) is zero. graphopt uses physical analogies for defining attracting and repelling forces among the vertices and then the physical system is simulated until it reaches an equilibrium. -(There is no simulated annealing or anything like that, so a stable fixed point is not guaranteed.) + (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_()}}. diff --git a/man/layout_with_kk.Rd b/man/layout_with_kk.Rd index a947cedbbb7..4a9c84e3d46 100644 --- a/man/layout_with_kk.Rd +++ b/man/layout_with_kk.Rd @@ -28,35 +28,35 @@ layout_with_kk( } \arguments{ \item{graph}{The input graph. -Edge directions are ignored.} + Edge directions are ignored.} \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. -Default: \code{NULL}.} + Default: \code{NULL}.} \item{dim}{Integer scalar, 2 or 3, the dimension of the layout. -Two dimensional layouts are places on a plane, + Two dimensional layouts are places on a plane, three dimensional ones in the 3d space.} \item{maxiter}{The maximum number of iterations to perform. -The algorithm might terminate earlier, see the \code{epsilon} argument. -The default \code{NULL} uses \code{50 * vcount(graph)}.} + The algorithm might terminate earlier, see the \code{epsilon} argument. + The default \code{NULL} uses \code{50 * vcount(graph)}.} \item{epsilon}{Numeric scalar, the algorithm terminates, if the maximal delta is less than this. -(See the reference below for what delta means.) If you set this to zero, then the function always performs \code{maxiter} iterations.} + (See the reference below for what delta means.) If you set this to zero, then the function always performs \code{maxiter} iterations.} \item{kkconst}{Numeric scalar, the Kamada-Kawai vertex attraction constant. -The default \code{NULL} uses the number of vertices.} + The default \code{NULL} uses the number of vertices.} \item{weights}{Edge weights, larger values will result in longer edges. -Note that this is the opposite of \code{\link[=layout_with_fr]{layout_with_fr()}}, which produces shorter edges for larger weights. -Weights must be positive.} + Note that this is the opposite of \code{\link[=layout_with_fr]{layout_with_fr()}}, which produces shorter edges for larger weights. + Weights must be positive.} \item{minx}{Numeric vector that gives lower boundaries for the \sQuote{x} coordinates of the vertices. -The length of the vector must match the number of vertices in the graph. -Default: \code{NULL}.} + The length of the vector must match the number of vertices in the graph. + Default: \code{NULL}.} \item{maxx}{Similar to \code{minx}, but gives the upper boundaries.} @@ -101,7 +101,7 @@ 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()}}. -See \code{\link[=with_kk]{with_kk()}} to build a lazy layout specification for \code{\link[=add_layout_]{add_layout_()}}. + 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_()}}, diff --git a/man/layout_with_lgl.Rd b/man/layout_with_lgl.Rd index 28316e50934..7fd758c8628 100644 --- a/man/layout_with_lgl.Rd +++ b/man/layout_with_lgl.Rd @@ -24,22 +24,22 @@ layout_with_lgl( \item{maxiter}{The maximum number of iterations to perform (150).} \item{maxdelta}{The maximum change for a vertex during an iteration. -The default \code{NULL} uses the number of vertices.} + The default \code{NULL} uses the number of vertices.} \item{area}{The area of the surface on which the vertices are placed. -The default \code{NULL} uses the square of the number of vertices.} + The default \code{NULL} uses the square of the number of vertices.} \item{coolexp}{The cooling exponent of the simulated annealing (1.5).} \item{repulserad}{Cancellation radius for the repulsion. -The default \code{NULL} uses the \code{area} times the number of vertices.} + The default \code{NULL} uses the \code{area} times the number of vertices.} \item{cellsize}{The size of the cells for the grid. -When calculating the repulsion forces between vertices only vertices in the same or neighboring grid cells are taken into account. -The default \code{NULL} uses the square root of the square root of the \code{area}.} + When calculating the repulsion forces between vertices only vertices in the same or neighboring grid cells are taken into account. + The default \code{NULL} uses the square root of the square root of the \code{area}.} \item{root}{The ID of the vertex to place at the middle of the layout. -The default value is -1 which means that a random vertex is selected.} + The default value is -1 which means that a random vertex is selected.} } \value{ A numeric matrix with two columns and as many rows as vertices. diff --git a/man/layout_with_mds.Rd b/man/layout_with_mds.Rd index 2c471523210..f467623a424 100644 --- a/man/layout_with_mds.Rd +++ b/man/layout_with_mds.Rd @@ -10,7 +10,7 @@ layout_with_mds(graph, dist = NULL, dim = 2, options = deprecated()) \item{graph}{The input graph.} \item{dist}{The distance matrix for the multidimensional scaling. -If \code{NULL} (the default), + If \code{NULL} (the default), then the unweighted shortest path matrix is used.} \item{dim}{\code{layout_with_mds()} supports dimensions up to the number of nodes minus one, but only if the graph is connected; @@ -18,7 +18,7 @@ for unconnected graphs, the only possible value is 2. This is because \code{merg \item{options}{\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} This argument is not supported from igraph version 1.6.0, as ARPACK is not used any more for solving the eigenproblem. -Supplying it raises an error.} + Supplying it raises an error.} } \value{ A numeric matrix with \code{dim} columns. @@ -28,7 +28,7 @@ Multidimensional scaling of some distance matrix defined on the vertices of a gr } \details{ \code{layout_with_mds()} uses classical multidimensional scaling (Torgerson scaling) for generating the coordinates. -Multidimensional scaling aims to place points from a higher dimensional space in a (typically) 2 dimensional plane, + Multidimensional scaling aims to place points from a higher dimensional space in a (typically) 2 dimensional plane, so that the distances between the points are kept as much as this is possible. By default igraph uses the shortest path matrix as the distances between the nodes, @@ -55,7 +55,7 @@ Scaling}. Second edition. Chapman and Hall. } \seealso{ \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_()}}. + 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_()}}, diff --git a/man/layout_with_sugiyama.Rd b/man/layout_with_sugiyama.Rd index a68599ffceb..3075dd98666 100644 --- a/man/layout_with_sugiyama.Rd +++ b/man/layout_with_sugiyama.Rd @@ -21,61 +21,61 @@ 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. -Default: \code{NULL}, igraph calculates the layers automatically.} + Layers are numbered from one. + Default: \code{NULL}, igraph calculates the layers automatically.} \item{hgap}{Real scalar, the minimum horizontal gap between vertices in the same layer.} \item{vgap}{Real scalar, the distance between layers.} \item{maxiter}{Integer scalar, the maximum number of iterations in the crossing minimization stage. -100 is a reasonable default; if you feel that you have too many edge crossings, increase this.} + 100 is a reasonable default; if you feel that you have too many edge crossings, increase this.} \item{weights}{Optional edge weight vector. -If \code{NULL}, then the 'weight' edge attribute is used, if there is one. -Supply \code{NA} here and igraph ignores the edge weights. -These are used only if the graph contains cycles; igraph will tend to reverse edges with smaller weights when breaking the cycles.} + If \code{NULL}, then the 'weight' edge attribute is used, if there is one. + Supply \code{NA} here and igraph ignores the edge weights. + These are used only if the graph contains cycles; igraph will tend to reverse edges with smaller weights when breaking the cycles.} \item{attributes}{Which graph/vertex/edge attributes to keep in the extended graph. -\sQuote{default} keeps the \sQuote{size}, \sQuote{size2}, \sQuote{shape}, + \sQuote{default} keeps the \sQuote{size}, \sQuote{size2}, \sQuote{shape}, \sQuote{label} and \sQuote{color} vertex attributes and the \sQuote{arrow.mode} and \sQuote{arrow.size} edge attributes. -\sQuote{all} keep all graph, vertex and edge attributes, \sQuote{none} keeps none of them.} + \sQuote{all} keep all graph, vertex and edge attributes, \sQuote{none} keeps none of them.} } \value{ A list with the components: \describe{ \item{layout}{ The layout, a two-column matrix, for the original graph vertices. -} + } \item{layout.dummy}{ The layout for the dummy vertices, a two column matrix. -} + } \item{extd_graph}{ The original graph, extended with dummy vertices. -The \sQuote{dummy} vertex attribute is set on this graph, + The \sQuote{dummy} vertex attribute is set on this graph, it is a logical attributes, and it tells you whether the vertex is a dummy vertex. -The \sQuote{layout} graph attribute is also set, + The \sQuote{layout} graph attribute is also set, and it is the layout matrix for all (original and dummy) vertices. -} + } } } \description{ Sugiyama layout algorithm for layered directed acyclic graphs. -The algorithm minimized edge crossings. + The algorithm minimized edge crossings. } \details{ This layout algorithm is designed for directed acyclic graphs where each vertex is assigned to a layer. -Layers are indexed from zero, and vertices of the same layer will be placed on the same horizontal line. -The X coordinates of vertices within each layer are decided by the heuristic proposed by Sugiyama et al. to minimize edge crossings. + Layers are indexed from zero, and vertices of the same layer will be placed on the same horizontal line. + The X coordinates of vertices within each layer are decided by the heuristic proposed by Sugiyama et al. to minimize edge crossings. You can also try to lay out undirected graphs, graphs containing cycles, or graphs without an a priori layered assignment with this algorithm. igraph will try to eliminate cycles and assign vertices to layers, but there is no guarantee on the quality of the layout in such cases. The Sugiyama layout may introduce \dQuote{bends} on the edges in order to obtain a visually more pleasing layout. -This is achieved by adding dummy nodes to edges spanning more than one layer. -The resulting layout assigns coordinates not only to the nodes of the original graph but also to the dummy nodes. -The layout algorithm will also return the extended graph with the dummy nodes. + This is achieved by adding dummy nodes to edges spanning more than one layer. + The resulting layout assigns coordinates not only to the nodes of the original graph but also to the dummy nodes. + The layout algorithm will also return the extended graph with the dummy nodes. For more details, see the reference below. } diff --git a/man/leading.eigenvector.community.Rd b/man/leading.eigenvector.community.Rd index b16f0ba5b4a..7f0cde447d1 100644 --- a/man/leading.eigenvector.community.Rd +++ b/man/leading.eigenvector.community.Rd @@ -17,26 +17,26 @@ leading.eigenvector.community( } \arguments{ \item{graph}{The input graph. -Should be undirected as the method needs a symmetric matrix.} + Should be undirected as the method needs a symmetric matrix.} \item{steps}{The number of steps to take, this is actually the number of tries to make a step. -It is not a particularly useful parameter.} + It is not a particularly useful parameter.} \item{weights}{The weights of the edges. -It must be a positive numeric vector, \code{NULL} or \code{NA}. -If it is \code{NULL} and the input graph has a \sQuote{weight} edge attribute, then that attribute will be used. -If \code{NULL} and no such attribute is present, then the edges will have equal weights. -Set this to \code{NA} if the graph was a \sQuote{weight} edge attribute, but you don't want to use it for community detection. -A larger edge weight means a stronger connection for this function.} + It must be a positive numeric vector, \code{NULL} or \code{NA}. + If it is \code{NULL} and the input graph has a \sQuote{weight} edge attribute, then that attribute will be used. + If \code{NULL} and no such attribute is present, then the edges will have equal weights. + Set this to \code{NA} if the graph was a \sQuote{weight} edge attribute, but you don't want to use it for community detection. + A larger edge weight means a stronger connection for this function.} \item{start}{\code{NULL}, or a numeric membership vector, giving the start configuration of the algorithm.} \item{options}{A named list to override some ARPACK options.} \item{callback}{Callback function. -This is called after each iteration, after calculating the leading eigenvector of the modularity matrix. -See details below. -Default: \code{NULL}.} + This is called after each iteration, after calculating the leading eigenvector of the modularity matrix. + See details below. + Default: \code{NULL}.} \item{extra}{Additional argument to supply to the callback function.} diff --git a/man/local_scan.Rd b/man/local_scan.Rd index d7cee4a96e8..53782deb107 100644 --- a/man/local_scan.Rd +++ b/man/local_scan.Rd @@ -21,43 +21,43 @@ local_scan( \item{graph.them}{An igraph object on which the \sQuote{them} statistics is computed, i.e. the neighborhoods calculated from \code{graph.us} are evaluated on \code{graph.them}. -Default: \code{NULL}.} + Default: \code{NULL}.} \item{k}{An integer scalar, the size of the local neighborhood for each vertex. -Should be non-negative.} + Should be non-negative.} \item{FUN}{Character, a function name, or a function object itself, for computing the local statistic in each neighborhood. -If \code{NULL}(the default value), + If \code{NULL}(the default value), \code{ecount()} is used for unweighted graphs (if \code{weighted=FALSE}) and a function that computes the sum of edge weights is used for weighted graphs (if \code{weighted=TRUE}). -This argument is ignored if \code{k} is zero.} + This argument is ignored if \code{k} is zero.} \item{weighted}{Logical, TRUE if the edge weights should be used for computation of the scan statistic. -If TRUE, the graph should be weighted. -Note that this argument is ignored if \code{FUN} is not \code{NULL}, \code{"ecount"} and \code{"sumweights"}.} + If TRUE, the graph should be weighted. + Note that this argument is ignored if \code{FUN} is not \code{NULL}, \code{"ecount"} and \code{"sumweights"}.} \item{mode}{Character scalar, the kind of neighborhoods to use for the calculation. -One of \sQuote{\code{out}}, \sQuote{\verb{in}}, \sQuote{\code{all}} or \sQuote{\code{total}}. -This argument is ignored for undirected graphs.} + One of \sQuote{\code{out}}, \sQuote{\verb{in}}, \sQuote{\code{all}} or \sQuote{\code{total}}. + This argument is ignored for undirected graphs.} \item{neighborhoods}{A list of neighborhoods, one for each vertex, or \code{NULL}. -If it is not \code{NULL}, then the function is evaluated on the induced subgraphs specified by these neighborhoods. + If it is not \code{NULL}, then the function is evaluated on the induced subgraphs specified by these neighborhoods. In theory this could be useful if the same \code{graph.us} graph is used for multiple \code{graph.them} arguments. -Then the neighborhoods can be calculated on \code{graph.us} and used with multiple graphs. -In practice, this is currently slower than simply using \code{graph.them} multiple times.} + Then the neighborhoods can be calculated on \code{graph.us} and used with multiple graphs. + In practice, this is currently slower than simply using \code{graph.them} multiple times.} \item{weights}{Numeric vector, edge weights to use for the scan instead of the edge attribute weight. -If \code{NULL} (the default) the edge weight attribute is used.} + If \code{NULL} (the default) the edge weight attribute is used.} \item{\dots}{Arguments passed to \code{FUN}, the function that computes the local statistics.} } \value{ For \code{local_scan()} typically a numeric vector containing the computed local statistics for each vertex. -In general a list or vector of objects, as returned by \code{FUN}. + In general a list or vector of objects, as returned by \code{FUN}. } \description{ The scan statistic is a summary of the locality statistics that is computed from the local neighborhood of each vertex. -The \code{local_scan()} function computes the local statistics for each vertex for a given neighborhood size and the statistic function. + The \code{local_scan()} function computes the local statistics for each vertex for a given neighborhood size and the statistic function. } \details{ See the given reference below for the details on the local scan statistics. @@ -65,7 +65,7 @@ See the given reference below for the details on the local scan statistics. \code{local_scan()} calculates exact local scan statistics. If \code{graph.them} is \code{NULL}, then \code{local_scan()} computes the \sQuote{us} variant of the scan statistics. -Otherwise, + Otherwise, \code{graph.them} should be an igraph object and the \sQuote{them} variant is computed using \code{graph.us} to extract the neighborhood information, and applying \code{FUN} on these neighborhoods in \code{graph.them}. } diff --git a/man/make_.Rd b/man/make_.Rd index 94880a6a96f..227f045e4b9 100644 --- a/man/make_.Rd +++ b/man/make_.Rd @@ -14,7 +14,7 @@ This is a generic function for creating graphs. } \details{ \code{make_()} is a generic function for creating graphs. -For every graph constructor in igraph that has a \code{make_} prefix, + For every graph constructor in igraph that has a \code{make_} prefix, there is a corresponding function without the prefix: e.g. for \code{\link[=make_ring]{make_ring()}} there is also \code{\link[=ring]{ring()}}, etc. @@ -22,8 +22,8 @@ The same is true for the random graph samplers, i.e. for each constructor with a there is a corresponding function without that prefix. These shorter forms can be used together with \code{make_()}. -The advantage of this form is that the user can specify constructor modifiers which work with all constructors. -E.g. the \code{\link[=with_vertex_]{with_vertex_()}} modifier adds vertex attributes to the newly created graphs. + The advantage of this form is that the user can specify constructor modifiers which work with all constructors. + E.g. the \code{\link[=with_vertex_]{with_vertex_()}} modifier adds vertex attributes to the newly created graphs. See the examples and the various constructor modifiers below. } diff --git a/man/make_bipartite_graph.Rd b/man/make_bipartite_graph.Rd index d7a602ad6c9..ee22f6ca4cb 100644 --- a/man/make_bipartite_graph.Rd +++ b/man/make_bipartite_graph.Rd @@ -11,22 +11,22 @@ bipartite_graph(types, edges, ..., directed = FALSE) } \arguments{ \item{types}{A vector giving the vertex types. -It will be coerced into boolean. -The length of the vector gives the number of vertices in the graph. -When the vector is a named vector, the names will be attached to the graph as the \code{name} vertex attribute.} + It will be coerced into boolean. + The length of the vector gives the number of vertices in the graph. + When the vector is a named vector, the names will be attached to the graph as the \code{name} vertex attribute.} \item{edges}{A vector giving the edges of the graph, the same way as for the regular \code{\link[=make_graph]{make_graph()}} function. -It is checked that the edges indeed connect vertices of different kind, according to the supplied \code{types} vector. -The vector may be a string vector if \code{types} is a named vector.} + It is checked that the edges indeed connect vertices of different kind, according to the supplied \code{types} vector. + The vector may be a string vector if \code{types} is a named vector.} \item{...}{These dots are for future extensions and must be empty.} \item{directed}{Logical, whether to create a directed graph. -Note that by default undirected graphs are created, as this is more common for bipartite graphs.} + Note that by default undirected graphs are created, as this is more common for bipartite graphs.} } \value{ \code{make_bipartite_graph()} returns a bipartite igraph graph. -In other words, an igraph graph that has a vertex attribute named \code{type}. + In other words, an igraph graph that has a vertex attribute named \code{type}. \code{is_bipartite()} returns a Logical. } @@ -38,9 +38,9 @@ Bipartite graphs have a \code{type} vertex attribute in igraph, this is boolean and \code{FALSE} for the vertices of the first kind and \code{TRUE} for vertices of the second kind. \code{make_bipartite_graph()} basically does three things. -First it checks the \code{edges} vector against the vertex \code{types}. -Then it creates a graph using the \code{edges} vector and finally it adds the \code{types} vector as a vertex attribute called \code{type}. -\code{edges} may contain strings as vertex names; in this case, + First it checks the \code{edges} vector against the vertex \code{types}. + Then it creates a graph using the \code{edges} vector and finally it adds the \code{types} vector as a vertex attribute called \code{type}. + \code{edges} may contain strings as vertex names; in this case, \code{types} must be a named vector that specifies the type for each vertex name that occurs in \code{edges}. } \section{Related documentation in the C library}{ diff --git a/man/make_chordal_ring.Rd b/man/make_chordal_ring.Rd index 3b84385b43d..36a47cf175f 100644 --- a/man/make_chordal_ring.Rd +++ b/man/make_chordal_ring.Rd @@ -13,7 +13,7 @@ chordal_ring(n, w, ..., directed = FALSE) \item{n}{The number of vertices.} \item{w}{A matrix which specifies the extended chordal ring. -See details below.} + See details below.} \item{...}{These dots are for future extensions and must be empty.} @@ -24,13 +24,13 @@ An igraph graph. } \description{ \code{make_chordal_ring()} creates an extended chordal ring. -An extended chordal ring is regular graph, each node has the same degree. -It can be obtained from a simple ring by adding some extra edges specified by a matrix. -Let p denote the number of columns in the \sQuote{\code{W}} matrix. -The extra edges of vertex \code{i} are added according to column \verb{i mod p} in \sQuote{\code{W}}. -The number of extra edges is the number of rows in \sQuote{\code{W}}: + An extended chordal ring is regular graph, each node has the same degree. + It can be obtained from a simple ring by adding some extra edges specified by a matrix. + Let p denote the number of columns in the \sQuote{\code{W}} matrix. + The extra edges of vertex \code{i} are added according to column \verb{i mod p} in \sQuote{\code{W}}. + The number of extra edges is the number of rows in \sQuote{\code{W}}: for each row \code{j} an edge \code{i->i+w[ij]} is added if \code{i+w[ij]} is less than the number of total nodes. -See also Kotsis, G: Interconnection Topologies for Parallel Processing Systems, PARS Mitteilungen 11, 1-6, 1993. + See also Kotsis, G: Interconnection Topologies for Parallel Processing Systems, PARS Mitteilungen 11, 1-6, 1993. } \section{Related documentation in the C library}{ \href{https://igraph.org/c/html/0.10.17/igraph-Generators.html#igraph_extended_chordal_ring}{\code{extended_chordal_ring()}} diff --git a/man/make_circulant.Rd b/man/make_circulant.Rd index c8f4bfdc6a9..049e5ddc062 100644 --- a/man/make_circulant.Rd +++ b/man/make_circulant.Rd @@ -27,7 +27,7 @@ A circulant graph \eqn{C_n^{\textrm{shifts}}} consists of \eqn{n} vertices \eqn{ } \details{ The function can generate either directed or undirected graphs. -It does not generate multi-edges or self-loops. + It does not generate multi-edges or self-loops. } \section{Related documentation in the C library}{ \href{https://igraph.org/c/html/0.10.17/igraph-Generators.html#igraph_circulant}{\code{circulant()}} diff --git a/man/make_clusters.Rd b/man/make_clusters.Rd index 50d6fcbe6a4..2f2f6651f78 100644 --- a/man/make_clusters.Rd +++ b/man/make_clusters.Rd @@ -17,7 +17,7 @@ make_clusters( \item{graph}{The graph of the community structure.} \item{membership}{The membership vector of the community structure, a numeric vector denoting the ID of the community for each vertex. -It might be \code{NULL} for hierarchical community structures.} + It might be \code{NULL} for hierarchical community structures.} \item{...}{These dots are for future extensions and must be empty.} @@ -26,23 +26,23 @@ It might be \code{NULL} for hierarchical community structures.} \item{merges}{A merge matrix, for hierarchical community structures (or \code{NULL} otherwise.} \item{modularity}{Modularity value of the community structure. -If this is \code{TRUE} and the membership vector is available, then it the modularity values is calculated automatically.} + If this is \code{TRUE} and the membership vector is available, then it the modularity values is calculated automatically.} } \value{ A \code{communities} object. -\describe{ + \describe{ \item{membership}{ A numeric vector giving the community ID for each vertex. -} + } \item{modularity}{ The modularity score of the partition. -} + } \item{algorithm}{ If known, the algorithm used to obtain the communities. -} + } \item{vcount}{ Number of vertices in the graph. -} + } } } \description{ diff --git a/man/make_de_bruijn_graph.Rd b/man/make_de_bruijn_graph.Rd index 56821a25a7e..57f326052bd 100644 --- a/man/make_de_bruijn_graph.Rd +++ b/man/make_de_bruijn_graph.Rd @@ -11,10 +11,10 @@ de_bruijn_graph(m, n) } \arguments{ \item{m}{Integer scalar, the size of the alphabet. -See details below.} + See details below.} \item{n}{Integer scalar, the length of the labels. -See details below.} + See details below.} } \value{ A graph object. @@ -24,8 +24,8 @@ De Bruijn graphs are labeled graphs representing the overlap of strings. } \details{ A de Bruijn graph represents relationships between strings. -An alphabet of \code{m} letters are used and strings of length \code{n} are considered. -A vertex corresponds to every possible string and there is a directed edge from vertex \code{v} to vertex \code{w} + An alphabet of \code{m} letters are used and strings of length \code{n} are considered. + A vertex corresponds to every possible string and there is a directed edge from vertex \code{v} to vertex \code{w} if the string of \code{v} can be transformed into the string of \code{w} by removing its first letter and appending a letter to it. Please note that the graph will have \code{m} to the power \code{n} vertices and even more edges, diff --git a/man/make_from_prufer.Rd b/man/make_from_prufer.Rd index 019e7a3cf3a..dd47292894f 100644 --- a/man/make_from_prufer.Rd +++ b/man/make_from_prufer.Rd @@ -20,9 +20,9 @@ A graph object. } \details{ The Prüfer sequence of a tree graph with n labeled vertices is a sequence of n-2 numbers, constructed as follows. -If the graph has more than two vertices, find a vertex with degree one, + If the graph has more than two vertices, find a vertex with degree one, remove it from the tree and add the label of the vertex that it was connected to to the sequence. -Repeat until there are only two vertices in the remaining graph. + Repeat until there are only two vertices in the remaining graph. } \section{Related documentation in the C library}{ \href{https://igraph.org/c/html/0.10.17/igraph-Generators.html#igraph_from_prufer}{\code{from_prufer()}} diff --git a/man/make_full_bipartite_graph.Rd b/man/make_full_bipartite_graph.Rd index 3b15e3f7e37..8fd2dc5b545 100644 --- a/man/make_full_bipartite_graph.Rd +++ b/man/make_full_bipartite_graph.Rd @@ -31,16 +31,16 @@ full_bipartite_graph( \item{directed}{Logical, whether the graphs is directed.} \item{mode}{Scalar giving the kind of edges to create for directed graphs. -If this is \sQuote{\code{out}} then all vertices of the first kind are connected to the others; + If this is \sQuote{\code{out}} then all vertices of the first kind are connected to the others; \sQuote{\verb{in}} specifies the opposite direction; \sQuote{\code{all}} creates mutual edges. -This argument is ignored for undirected graphs.x} + This argument is ignored for undirected graphs.x} } \value{ An igraph graph, with the \sQuote{\code{type}} vertex attribute set. } \description{ Bipartite graphs are also called two-mode by some. -This function creates a bipartite graph in which every possible edge is present. + This function creates a bipartite graph in which every possible edge is present. } \details{ Bipartite graphs have a \sQuote{\code{type}} vertex attribute in igraph, diff --git a/man/make_full_citation_graph.Rd b/man/make_full_citation_graph.Rd index 692be8ab128..249a304db5e 100644 --- a/man/make_full_citation_graph.Rd +++ b/man/make_full_citation_graph.Rd @@ -21,8 +21,8 @@ An igraph graph. } \description{ \code{make_full_citation_graph()} creates a full citation graph. -This is a directed graph, where every \code{i->j} edge is present if and only if \eqn{jj} edge is present if and only if \eqn{j1 and n>2. -The Chvatal graph is an example for m=4 and n=12. It has 24 edges. -} + The Chvatal graph is an example for m=4 and n=12. It has 24 edges. + } \item{Coxeter}{ A non-Hamiltonian cubic symmetric graph with 28 vertices and 42 edges. -} + } \item{Cubical}{ The Platonic graph of the cube. A convex regular polyhedron with 8 vertices and 12 edges. -} + } \item{Diamond}{ A graph with 4 vertices and 5 edges, resembles to a schematic diamond if drawn properly. -} + } \item{Dodecahedral, Dodecahedron}{ Another Platonic solid with 20 vertices and 30 edges. -} + } \item{Folkman}{ The semisymmetric graph with minimum number of vertices, 20 and 40 edges. -A semisymmetric graph is regular, edge transitive and not vertex transitive. -} + A semisymmetric graph is regular, edge transitive and not vertex transitive. + } \item{Franklin}{ This is a graph whose embedding to the Klein bottle can be colored with six colors, it is a counterexample to the necessity of the Heawood conjecture on a Klein bottle. -It has 12 vertices and 18 edges. -} + It has 12 vertices and 18 edges. + } \item{Frucht}{ The Frucht Graph is the smallest cubical graph whose automorphism group consists only of the identity element. -It has 12 vertices and 18 edges. -} + It has 12 vertices and 18 edges. + } \item{Grotzsch, Groetzsch}{ The Grötzsch graph is a triangle-free graph with 11 vertices, 20 edges, and chromatic number 4. -It is named after German mathematician Herbert Grötzsch, + It is named after German mathematician Herbert Grötzsch, and its existence demonstrates that the assumption of planarity is necessary in Grötzsch's theorem that every triangle-free planar graph is 3-colorable. -} + } \item{Heawood}{ The Heawood graph is an undirected graph with 14 vertices and 21 edges. -The graph is cubic, and all cycles in the graph have six or more edges. -Every smaller cubic graph has shorter cycles, + The graph is cubic, and all cycles in the graph have six or more edges. + Every smaller cubic graph has shorter cycles, so this graph is the 6-cage, the smallest cubic graph of girth 6. -} + } \item{Herschel}{ The Herschel graph is the smallest nonhamiltonian polyhedral graph. -It is the unique such graph on 11 nodes, and has 18 edges. -} + It is the unique such graph on 11 nodes, and has 18 edges. + } \item{House}{ The house graph is a 5-vertex, 6-edge graph, the schematic draw of a house if drawn properly, basically a triangle of the top of a square. -} + } \item{HouseX}{ The same as the house graph with an X in the square. 5 vertices and 8 edges. -} + } \item{Icosahedral, Icosahedron}{ A Platonic solid with 12 vertices and 30 edges. -} + } \item{Krackhardt kite}{ A social network with 10 vertices and 18 edges. -Krackhardt, D. Assessing the Political Landscape: Structure, Cognition, and Power in Organizations. -Admin. Sci. Quart. 35, 342-369, 1990. -} + Krackhardt, D. Assessing the Political Landscape: Structure, Cognition, and Power in Organizations. + Admin. Sci. Quart. 35, 342-369, 1990. + } \item{Levi}{ The graph is a 4-arc transitive cubic graph, it has 30 vertices and 45 edges. -} + } \item{McGee}{ The McGee graph is the unique 3-regular 7-cage graph, it has 24 vertices and 36 edges. -} + } \item{Meredith}{ The Meredith graph is a quartic graph on 70 nodes and 140 edges that is a counterexample to the conjecture that every 4-regular 4-connected graph is Hamiltonian. -} + } \item{Noperfectmatching}{ A connected graph with 16 vertices and 27 edges containing no perfect matching. -A matching in a graph is a set of pairwise non-adjacent edges; + A matching in a graph is a set of pairwise non-adjacent edges; that is, no two edges share a common vertex. -A perfect matching is a matching which covers all vertices of the graph. -} + A perfect matching is a matching which covers all vertices of the graph. + } \item{Nonline}{ A graph whose connected components are the 9 graphs whose presence as a vertex-induced subgraph in a graph makes a nonline graph. -It has 50 vertices and 72 edges. -} + It has 50 vertices and 72 edges. + } \item{Octahedral, Octahedron}{ Platonic solid with 6 vertices and 12 edges. -} + } \item{Petersen}{ A 3-regular graph with 10 vertices and 15 edges. -It is the smallest hypohamiltonian graph, + It is the smallest hypohamiltonian graph, i.e. it is non-hamiltonian but removing any single vertex from it makes it Hamiltonian. -} + } \item{Robertson}{ The unique (4,5)-cage graph, i.e. a 4-regular graph of girth 5. -It has 19 vertices and 38 edges. -} + It has 19 vertices and 38 edges. + } \item{Smallestcyclicgroup}{ A smallest nontrivial graph whose automorphism group is cyclic. -It has 9 vertices and 15 edges. -} + It has 9 vertices and 15 edges. + } \item{Tetrahedral, Tetrahedron}{ Platonic solid with 4 vertices and 6 edges. -} + } \item{Thomassen}{ The smallest hypotraceable graph, on 34 vertices and 52 edges. -A hypotraceable graph does not contain a Hamiltonian path + A hypotraceable graph does not contain a Hamiltonian path but after removing any single vertex from it the remainder always contains a Hamiltonian path. -A graph containing a Hamiltonian path is called traceable. -} + A graph containing a Hamiltonian path is called traceable. + } \item{Tutte}{ Tait's Hamiltonian graph conjecture states that every 3-connected 3-regular planar graph is Hamiltonian. -This graph is a counterexample. -It has 46 vertices and 69 edges. -} + This graph is a counterexample. + It has 46 vertices and 69 edges. + } \item{Uniquely3colorable}{ Returns a 12-vertex, triangle-free graph with chromatic number 3 that is uniquely 3-colorable. -} + } \item{Walther}{ An identity graph with 25 vertices and 31 edges. -An identity graph has a single graph automorphism, the trivial one. -} + An identity graph has a single graph automorphism, the trivial one. + } \item{Zachary}{ Social network of friendships between 34 members of a karate club at a US university in the 1970s. -See W. W. Zachary, An information flow model for conflict and fission in small groups, + See W. W. Zachary, An information flow model for conflict and fission in small groups, Journal of Anthropological Research 33, 452-473 (1977). -} + } } } diff --git a/man/make_kautz_graph.Rd b/man/make_kautz_graph.Rd index 1953d62b030..cc6b0b6ee33 100644 --- a/man/make_kautz_graph.Rd +++ b/man/make_kautz_graph.Rd @@ -11,10 +11,10 @@ kautz_graph(m, n) } \arguments{ \item{m}{Integer scalar, the size of the alphabet. -See details below.} + See details below.} \item{n}{Integer scalar, the length of the labels. -See details below.} + See details below.} } \value{ A graph object. @@ -25,7 +25,7 @@ Kautz graphs are labeled graphs representing the overlap of strings. \details{ A Kautz graph is a labeled graph, vertices are labeled by strings of length \code{n+1} above an alphabet with \code{m+1} letters, with the restriction that every two consecutive letters in the string must be different. -There is a directed edge from a vertex \code{v} to another vertex \code{w} + There is a directed edge from a vertex \code{v} to another vertex \code{w} if it is possible to transform the string of \code{v} into the string of \code{w} by removing the first letter and appending a letter to it. Kautz graphs have some interesting properties, see e.g. Wikipedia for details. diff --git a/man/make_lattice.Rd b/man/make_lattice.Rd index 9fe1164eca9..d7862a97ce0 100644 --- a/man/make_lattice.Rd +++ b/man/make_lattice.Rd @@ -35,14 +35,14 @@ lattice( \item{dim}{Integer constant, the dimension of the lattice.} \item{nei}{The distance within which (inclusive) the neighbors on the lattice will be connected. -This parameter is not used right now.} + This parameter is not used right now.} \item{directed}{Whether to create a directed lattice.} \item{mutual}{Logical, if \code{TRUE} directed lattices will be mutually connected.} \item{periodic}{Logical vector, defines whether the generated lattice is periodic along each dimension. -This parameter may also be a single logical which will be extended to a logical vector of `dimvector`` length.} + This parameter may also be a single logical which will be extended to a logical vector of `dimvector`` length.} \item{circular}{Deprecated, use \code{periodic} instead.} } @@ -51,9 +51,9 @@ An igraph graph. } \description{ \code{make_lattice()} is a flexible function, it can create lattices of arbitrary dimensions, periodic or aperiodic ones. -It has two forms. -In the first form you only supply \code{dimvector}, but not \code{length} and \code{dim}. -In the second form you omit \code{dimvector} and supply \code{length} and \code{dim}. + It has two forms. + In the first form you only supply \code{dimvector}, but not \code{length} and \code{dim}. + In the second form you omit \code{dimvector} and supply \code{length} and \code{dim}. } \section{Related documentation in the C library}{ \href{https://igraph.org/c/html/0.10.17/igraph-Generators.html#igraph_square_lattice}{\code{square_lattice()}} diff --git a/man/make_line_graph.Rd b/man/make_line_graph.Rd index 274eeef39b8..f29be918633 100644 --- a/man/make_line_graph.Rd +++ b/man/make_line_graph.Rd @@ -20,7 +20,7 @@ This function calculates the line graph of another graph. } \details{ The line graph \code{L(G)} of a \code{G} undirected graph is defined as follows. -\code{L(G)} has one vertex for each edge in \code{G} and two vertices in \code{L(G)} are connected by an edge + \code{L(G)} has one vertex for each edge in \code{G} and two vertices in \code{L(G)} are connected by an edge if their corresponding edges share an end point. The line graph \code{L(G)} of a \code{G} directed graph is slightly different, diff --git a/man/make_ring.Rd b/man/make_ring.Rd index c6ac5a3cdc2..d8d01f23bf3 100644 --- a/man/make_ring.Rd +++ b/man/make_ring.Rd @@ -17,10 +17,10 @@ ring(n, ..., directed = FALSE, mutual = FALSE, circular = TRUE) \item{directed}{Whether the graph is directed.} \item{mutual}{Whether directed edges are mutual. -It is ignored in undirected graphs.} + It is ignored in undirected graphs.} \item{circular}{Whether to create a circular ring. -A non-circular ring is essentially a \dQuote{line}: a tree where every non-leaf vertex has one child.} + A non-circular ring is essentially a \dQuote{line}: a tree where every non-leaf vertex has one child.} } \value{ An igraph graph. diff --git a/man/make_tree.Rd b/man/make_tree.Rd index eccfdfe7d2f..aac4c22acea 100644 --- a/man/make_tree.Rd +++ b/man/make_tree.Rd @@ -14,7 +14,7 @@ make_tree(n, children = 2, ..., mode = c("out", "in", "undirected")) \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 the children, + \code{out} indicates that the edges point from the parent to the children, \verb{in} indicates that they point from the children to their parents, while \code{undirected} creates an undirected graph.} } \value{ diff --git a/man/make_turan.Rd b/man/make_turan.Rd index 1e4b41516b2..9f9a265a653 100644 --- a/man/make_turan.Rd +++ b/man/make_turan.Rd @@ -16,7 +16,7 @@ turan(n, r) } \value{ An igraph graph with a vertex attribute \code{type} storing the partition index of each vertex. -Partition indices start from 1. + Partition indices start from 1. } \description{ Turán graphs are complete multipartite graphs with the property that the sizes of the partitions are as close to equal as possible. @@ -25,8 +25,8 @@ Turán graphs are complete multipartite graphs with the property that the sizes The Turán graph with \code{n} vertices and \code{r} partitions is the densest graph on \code{n} vertices that does not contain a clique of size \code{r+1}. This function generates undirected graphs. -The null graph is returned when the number of vertices is zero. -A complete graph is returned if the number of partitions is greater than the number of vertices. + The null graph is returned when the number of vertices is zero. + A complete graph is returned if the number of partitions is greater than the number of vertices. } \section{Related documentation in the C library}{ \href{https://igraph.org/c/html/0.10.17/igraph-Generators.html#igraph_turan}{\code{turan()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}} diff --git a/man/make_wheel.Rd b/man/make_wheel.Rd index 9c930935fe3..01b61f8cf17 100644 --- a/man/make_wheel.Rd +++ b/man/make_wheel.Rd @@ -15,7 +15,7 @@ wheel(n, ..., mode = c("in", "out", "mutual", "undirected"), center = 1) \item{...}{These dots are for future extensions and must be empty.} \item{mode}{It defines the direction of the edges. -\verb{in}: the edges point \emph{to} the center, \code{out}: the edges point \emph{from} the center, \code{mutual}: + \verb{in}: the edges point \emph{to} the center, \code{out}: the edges point \emph{from} the center, \code{mutual}: a directed wheel is created with mutual edges, \code{undirected}: the edges are undirected.} \item{center}{ID of the center vertex.} @@ -27,8 +27,8 @@ An igraph graph. \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#experimental}{\figure{lifecycle-experimental.svg}{options: alt='[Experimental]'}}}{\strong{[Experimental]}} A wheel graph is created by connecting a center vertex to all vertices of a cycle graph. -A wheel graph on \code{n} vertices can be thought of as a wheel with \code{n - 1} spokes. -The cycle graph part makes up the rim, while the star graph part adds the spokes. + A wheel graph on \code{n} vertices can be thought of as a wheel with \code{n - 1} spokes. + The cycle graph part makes up the rim, while the star graph part adds the spokes. Note that the two and three-vertex wheel graphs are non-simple: The two-vertex wheel graph contains a self-loop, while the three-vertex wheel graph contains parallel edges (a 1-cycle and a 2-cycle, respectively). diff --git a/man/match_vertices.Rd b/man/match_vertices.Rd index d6a4f01cae9..afd6afa28f5 100644 --- a/man/match_vertices.Rd +++ b/man/match_vertices.Rd @@ -13,7 +13,7 @@ match_vertices(A, B, m, start, iteration) \item{B}{a numeric matrix, the adjacency matrix of the second graph} \item{m}{The number of seeds. -The first \code{m} vertices of both graphs are matched.} + The first \code{m} vertices of both graphs are matched.} \item{start}{a numeric matrix, the permutation matrix estimate is initialized with \code{start}} @@ -29,15 +29,15 @@ which correspond to the first \code{m} rows (and columns) of the adjacency matri } \details{ The approximate graph matching problem is to find a bijection between the vertices of two graphs , such that the number of edge disagreements between the corresponding vertex pairs is minimized. -For seeded graph matching, + For seeded graph matching, part of the bijection that consist of known correspondences (the seeds) is known and the problem task is to complete the bijection by estimating the permutation matrix that permutes the rows and columns of the adjacency matrix of the second graph. It is assumed that for the two supplied adjacency matrices \code{A} and \code{B}, both of size \eqn{n\times n}{n*n}, the first \eqn{m} rows(and columns) of \code{A} and \code{B} correspond to the same vertices in both graphs. -That is, the \eqn{n \times n}{n*n} permutation matrix that defines the bijection is \eqn{I_{m} \bigoplus P} for a \eqn{(n-m)\times + That is, the \eqn{n \times n}{n*n} permutation matrix that defines the bijection is \eqn{I_{m} \bigoplus P} for a \eqn{(n-m)\times (n-m)}{(n-m)*(n-m)} permutation matrix \eqn{P} and \eqn{m} times \eqn{m} identity matrix \eqn{I_{m}}. -The function \code{match_vertices()} estimates the permutation matrix \eqn{P} via an optimization algorithm based on the Frank-Wolfe algorithm. + The function \code{match_vertices()} estimates the permutation matrix \eqn{P} via an optimization algorithm based on the Frank-Wolfe algorithm. See references for further details. } @@ -55,8 +55,8 @@ P \references{ Vogelstein, J. T., Conroy, J. M., Podrazik, L. J., Kratzer, S. G., Harley, E. T., Fishkind, D. E.,Vogelstein, R. J., Priebe, C. E. (2011). -Fast Approximate Quadratic Programming for Large (Brain) Graph Matching. -Online: \url{https://arxiv.org/abs/1112.5507} + Fast Approximate Quadratic Programming for Large (Brain) Graph Matching. + Online: \url{https://arxiv.org/abs/1112.5507} Fishkind, D. E., Adali, S., Priebe, C. E. (2012). Seeded Graph Matching Online: \url{https://arxiv.org/abs/1209.0367} diff --git a/man/matching.Rd b/man/matching.Rd index e4960a08965..b98e5c1bba8 100644 --- a/man/matching.Rd +++ b/man/matching.Rd @@ -14,27 +14,27 @@ max_bipartite_match(graph, types = NULL, ..., weights = NULL, eps = NULL) } \arguments{ \item{graph}{The input graph. -It might be directed, but edge directions will be ignored.} + It might be directed, but edge directions will be ignored.} \item{matching}{A potential matching. -An integer vector that gives the pair in the matching for each vertex. -For vertices without a pair, supply \code{NA} here.} + An integer vector that gives the pair in the matching for each vertex. + For vertices without a pair, supply \code{NA} here.} \item{types}{Vertex types, if the graph is bipartite. -By default they are taken from the \sQuote{\code{type}} vertex attribute, if present.} + By default they are taken from the \sQuote{\code{type}} vertex attribute, if present.} \item{...}{These dots are for future extensions and must be empty.} \item{weights}{Potential edge weights. -If the graph has an edge attribute called \sQuote{\code{weight}}, and this argument is \code{NULL}, + If the graph has an edge attribute called \sQuote{\code{weight}}, and this argument is \code{NULL}, then the edge attribute is used automatically. -In weighted matching, the weights of the edges must match as much as possible.} + In weighted matching, the weights of the edges must match as much as possible.} \item{eps}{A small real number used in equality tests in the weighted bipartite matching algorithm. -Two real numbers are considered equal in the algorithm if their difference is smaller than \code{eps}. -This is required to avoid the accumulation of numerical errors. -The default \code{NULL} stands for the smallest \eqn{x}, such that \eqn{1+x \ne 1}{1+x != 1} holds (\code{.Machine$double.eps}). -If you are running the algorithm with no weights, this argument is ignored.} + Two real numbers are considered equal in the algorithm if their difference is smaller than \code{eps}. + This is required to avoid the accumulation of numerical errors. + The default \code{NULL} stands for the smallest \eqn{x}, such that \eqn{1+x \ne 1}{1+x != 1} holds (\code{.Machine$double.eps}). + If you are running the algorithm with no weights, this argument is ignored.} } \value{ \code{is_matching()} and \code{is_max_matching()} return a logical scalar. @@ -43,36 +43,36 @@ If you are running the algorithm with no weights, this argument is ignored.} \describe{ \item{matching_size}{ The size of the matching, i.e. the number of edges connecting the matched vertices. -} + } \item{matching_weight}{ The weights of the matching, if the graph was weighted. -For unweighted graphs this is the same as the size of the matching. -} + For unweighted graphs this is the same as the size of the matching. + } \item{matching}{ The matching itself. -Numeric vertex ID, or vertex names if the graph was named. -Non-matched vertices are denoted by \code{NA}. -} + Numeric vertex ID, or vertex names if the graph was named. + Non-matched vertices are denoted by \code{NA}. + } } } \description{ A matching in a graph means the selection of a set of edges that are pairwise non-adjacent, i.e. they have no common incident vertices. -A matching is maximal if it is not a proper subset of any other matching. + A matching is maximal if it is not a proper subset of any other matching. } \details{ \code{is_matching()} checks a matching vector and verifies whether its length matches the number of vertices in the given graph, its values are between zero (inclusive) and the number of vertices (inclusive), and whether there exists a corresponding edge in the graph for every matched vertex pair. -For bipartite graphs, it also verifies whether the matched vertices are in different parts of the graph. + For bipartite graphs, it also verifies whether the matched vertices are in different parts of the graph. \code{is_max_matching()} checks whether a matching is maximal. -A matching is maximal if and only if there exists no unmatched vertex in a graph such that one of its neighbors is also unmatched. + A matching is maximal if and only if there exists no unmatched vertex in a graph such that one of its neighbors is also unmatched. \code{max_bipartite_match()} calculates a maximum matching in a bipartite graph. -A matching in a bipartite graph is a partial assignment of vertices of the first kind to vertices of the second kind such that each vertex of the first kind is matched to at most one vertex of the second kind and vice versa, and matched vertices must be connected by an edge in the graph. -The size (or cardinality) of a matching is the number of edges. -A matching is a maximum matching if there exists no other matching with larger cardinality. -For weighted graphs, a maximum matching is a matching whose edges have the largest possible total weight among all possible matchings. + A matching in a bipartite graph is a partial assignment of vertices of the first kind to vertices of the second kind such that each vertex of the first kind is matched to at most one vertex of the second kind and vice versa, and matched vertices must be connected by an edge in the graph. + The size (or cardinality) of a matching is the number of edges. + A matching is a maximum matching if there exists no other matching with larger cardinality. + For weighted graphs, a maximum matching is a matching whose edges have the largest possible total weight among all possible matchings. Maximum matchings in bipartite graphs are found by the push-relabel algorithm with greedy initialization and a global relabeling after every \eqn{n/2} steps where \eqn{n} is the number of vertices in the graph. diff --git a/man/max_cardinality.Rd b/man/max_cardinality.Rd index c50674227b1..51489102138 100644 --- a/man/max_cardinality.Rd +++ b/man/max_cardinality.Rd @@ -8,20 +8,20 @@ max_cardinality(graph) } \arguments{ \item{graph}{The input graph. -It may be directed, but edge directions are ignored, as the algorithm is defined for undirected graphs.} + It may be directed, but edge directions are ignored, as the algorithm is defined for undirected graphs.} } \value{ A list with two components: \describe{ \item{alpha}{ Numeric vector. -The 1-based rank of each vertex in the graph such that the vertex with rank 1 is visited first, the vertex with rank 2 is visited second and + The 1-based rank of each vertex in the graph such that the vertex with rank 1 is visited first, the vertex with rank 2 is visited second and so on. -} + } \item{alpham1}{ Numeric vector. The inverse of \code{alpha}. -In other words, the elements of this vector are the vertices in reverse maximum cardinality search order. -} + In other words, the elements of this vector are the vertices in reverse maximum cardinality search order. + } } } \description{ @@ -29,7 +29,7 @@ Maximum cardinality search is a simple ordering a vertices that is useful in det } \details{ Maximum cardinality search visits the vertices in such an order that every time the vertex with the most already visited neighbors is visited. -Ties are broken randomly. + Ties are broken randomly. The algorithm provides a simple basis for deciding whether a graph is chordal, see References below, and also \code{\link[=is_chordal]{is_chordal()}}. } diff --git a/man/max_flow.Rd b/man/max_flow.Rd index 8f5945cacf8..78bb7b8d5df 100644 --- a/man/max_flow.Rd +++ b/man/max_flow.Rd @@ -16,42 +16,42 @@ max_flow(graph, source, target, ..., capacity = NULL) \item{...}{These dots are for future extensions and must be empty.} \item{capacity}{Vector giving the capacity of the edges. -If this is \code{NULL} (the default) then the \code{capacity} edge attribute is used. -Note that the \code{weight} edge attribute is not used by this function.} + If this is \code{NULL} (the default) then the \code{capacity} edge attribute is used. + Note that the \code{weight} edge attribute is not used by this function.} } \value{ A named list with components: \describe{ \item{value}{ A numeric scalar, the value of the maximum flow. -} + } \item{flow}{ A numeric vector, the flow itself, one entry for each edge. -For undirected graphs this entry is bit trickier, + For undirected graphs this entry is bit trickier, since for these the flow direction is not predetermined by the edge direction. -For these graphs the elements of the this vector can be negative, + For these graphs the elements of the this vector can be negative, this means that the flow goes from the bigger vertex ID to the smaller one. -Positive values mean that the flow goes from the smaller vertex ID to the bigger one. -} + Positive values mean that the flow goes from the smaller vertex ID to the bigger one. + } \item{cut}{ A numeric vector of edge IDs, the minimum cut corresponding to the maximum flow. -} + } \item{partition1}{ A numeric vector of vertex IDs, the vertices in the first partition of the minimum cut corresponding to the maximum flow. -} + } \item{partition2}{ A numeric vector of vertex IDs, the vertices in the second partition of the minimum cut corresponding to the maximum flow. -} + } \item{stats}{ A list with some statistics from the push-relabel algorithm. -Five integer values currently: + Five integer values currently: \code{nopush} is the number of push operations, \code{norelabel} the number of relabelings, \code{nogap} is the number of times the gap heuristics was used, \code{nogapnodes} is the total number of gap nodes omitted because of the gap heuristics and \code{nobfs} is the number of times a global breadth-first-search update was performed to assign better height (=distance) values to the vertices. -} + } } } \description{ @@ -59,11 +59,11 @@ In a graph where each edge has a given flow capacity the maximal flow between tw } \details{ \code{max_flow()} calculates the maximum flow between two vertices in a weighted (i.e. valued) graph. -A flow from \code{source} to \code{target} is an assignment of non-negative real numbers to the edges of the graph, satisfying two properties: + A flow from \code{source} to \code{target} is an assignment of non-negative real numbers to the edges of the graph, satisfying two properties: (1) for each edge the flow (i.e. the assigned number) is not more than the capacity of the edge (the \code{capacity} parameter or edge attribute), (2) for every vertex, except the source and the target the incoming flow is the same as the outgoing flow. -The value of the flow is the incoming flow of the \code{target} vertex. -The maximum flow is the flow of maximum value. + The value of the flow is the incoming flow of the \code{target} vertex. + The maximum flow is the flow of maximum value. } \section{Related documentation in the C library}{ \href{https://igraph.org/c/html/0.10.17/igraph-Flows.html#igraph_maxflow}{\code{maxflow()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_edges}{\code{edges()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_ecount}{\code{ecount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_get_eids}{\code{get_eids()}} diff --git a/man/maximal.cliques.Rd b/man/maximal.cliques.Rd index b1a9ac20408..a4bb72c0b2c 100644 --- a/man/maximal.cliques.Rd +++ b/man/maximal.cliques.Rd @@ -10,20 +10,20 @@ maximal.cliques(graph, min = NULL, max = NULL, subset = NULL, file = NULL) \item{graph}{The input graph.} \item{min}{Numeric constant, lower limit on the size of the cliques to find. -\code{NULL} means no limit, i.e. it is the same as 0.} + \code{NULL} means no limit, i.e. it is the same as 0.} \item{max}{Numeric constant, upper limit on the size of the cliques to find. -\code{NULL} means no limit.} + \code{NULL} means no limit.} \item{subset}{If not \code{NULL}, then it must be a vector of vertex IDs, numeric or symbolic if the graph is named. -The algorithm is run from these vertices only, so only a subset of all maximal cliques is returned. -See the Eppstein paper for details. -This argument makes it possible to easily parallelize the finding of maximal cliques.} + The algorithm is run from these vertices only, so only a subset of all maximal cliques is returned. + See the Eppstein paper for details. + This argument makes it possible to easily parallelize the finding of maximal cliques.} \item{file}{If not \code{NULL}, then it must be a file name, i.e. a character scalar. -The output of the algorithm is written to this file. -(If it exists, then it will be overwritten.) -Each clique will be a separate line in the file, given with the numeric IDs of its vertices, separated by whitespace.} + The output of the algorithm is written to this file. + (If it exists, then it will be overwritten.) + Each clique will be a separate line in the file, given with the numeric IDs of its vertices, separated by whitespace.} } \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/maximal.cliques.count.Rd b/man/maximal.cliques.count.Rd index d3bdf01b056..6cc1b02020b 100644 --- a/man/maximal.cliques.count.Rd +++ b/man/maximal.cliques.count.Rd @@ -10,15 +10,15 @@ maximal.cliques.count(graph, min = NULL, max = NULL, subset = NULL) \item{graph}{The input graph.} \item{min}{Numeric constant, lower limit on the size of the cliques to find. -\code{NULL} means no limit, i.e. it is the same as 0.} + \code{NULL} means no limit, i.e. it is the same as 0.} \item{max}{Numeric constant, upper limit on the size of the cliques to find. -\code{NULL} means no limit.} + \code{NULL} means no limit.} \item{subset}{If not \code{NULL}, then it must be a vector of vertex IDs, numeric or symbolic if the graph is named. -The algorithm is run from these vertices only, so only a subset of all maximal cliques is returned. -See the Eppstein paper for details. -This argument makes it possible to easily parallelize the finding of maximal cliques.} + The algorithm is run from these vertices only, so only a subset of all maximal cliques is returned. + See the Eppstein paper for details. + This argument makes it possible to easily parallelize the finding of maximal cliques.} } \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/maximum.bipartite.matching.Rd b/man/maximum.bipartite.matching.Rd index 3c0b848e841..c8092eee244 100644 --- a/man/maximum.bipartite.matching.Rd +++ b/man/maximum.bipartite.matching.Rd @@ -13,21 +13,21 @@ maximum.bipartite.matching( } \arguments{ \item{graph}{The input graph. -It might be directed, but edge directions will be ignored.} + It might be directed, but edge directions will be ignored.} \item{types}{Vertex types, if the graph is bipartite. -By default they are taken from the \sQuote{\code{type}} vertex attribute, if present.} + By default they are taken from the \sQuote{\code{type}} vertex attribute, if present.} \item{weights}{Potential edge weights. -If the graph has an edge attribute called \sQuote{\code{weight}}, and this argument is \code{NULL}, + If the graph has an edge attribute called \sQuote{\code{weight}}, and this argument is \code{NULL}, then the edge attribute is used automatically. -In weighted matching, the weights of the edges must match as much as possible.} + In weighted matching, the weights of the edges must match as much as possible.} \item{eps}{A small real number used in equality tests in the weighted bipartite matching algorithm. -Two real numbers are considered equal in the algorithm if their difference is smaller than \code{eps}. -This is required to avoid the accumulation of numerical errors. -The default \code{NULL} stands for the smallest \eqn{x}, such that \eqn{1+x \ne 1}{1+x != 1} holds (\code{.Machine$double.eps}). -If you are running the algorithm with no weights, this argument is ignored.} + Two real numbers are considered equal in the algorithm if their difference is smaller than \code{eps}. + This is required to avoid the accumulation of numerical errors. + The default \code{NULL} stands for the smallest \eqn{x}, such that \eqn{1+x \ne 1}{1+x != 1} holds (\code{.Machine$double.eps}). + If you are running the algorithm with no weights, this argument is ignored.} } \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/maximum.cardinality.search.Rd b/man/maximum.cardinality.search.Rd index 311c914747a..faa9a19e35c 100644 --- a/man/maximum.cardinality.search.Rd +++ b/man/maximum.cardinality.search.Rd @@ -8,7 +8,7 @@ maximum.cardinality.search(graph) } \arguments{ \item{graph}{The input graph. -It may be directed, but edge directions are ignored, as the algorithm is defined for undirected graphs.} + It may be directed, but edge directions are ignored, as the algorithm is defined for undirected graphs.} } \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/merge_coords.Rd b/man/merge_coords.Rd index 25752752c10..8d65eed71d1 100644 --- a/man/merge_coords.Rd +++ b/man/merge_coords.Rd @@ -15,15 +15,15 @@ layout_components(graph, layout = NULL, ...) \item{layouts}{A list of two-column matrices.} \item{\dots}{For \code{layout_components()}, additional arguments to pass to the \code{layout} layout function. -For \code{merge_coords()}, these dots must be empty.} + For \code{merge_coords()}, these dots must be empty.} \item{method}{Character constant giving the method to use. -Right now only \code{dla} is implemented.} + Right now only \code{dla} is implemented.} \item{graph}{The input graph.} \item{layout}{A function object, the layout function to use. -The default \code{NULL} uses \code{layout_with_kk}.} + The default \code{NULL} uses \code{layout_with_kk}.} } \value{ A matrix with two columns and as many lines as the total number of vertices in the graphs. @@ -33,15 +33,15 @@ Place several graphs on the same layout } \details{ \code{merge_coords()} takes a list of graphs and a list of coordinates and places the graphs in a common layout. -The method to use is chosen via the \code{method} parameter, although right now only the \code{dla} method is implemented. + The method to use is chosen via the \code{method} parameter, although right now only the \code{dla} method is implemented. The \code{dla} method covers the graph with circles. -Then it sorts the graphs based on the number of vertices first and places the largest graph at the center of the layout. -Then the other graphs are placed in decreasing order via a DLA (diffision limited aggregation) algorithm: + Then it sorts the graphs based on the number of vertices first and places the largest graph at the center of the layout. + Then the other graphs are placed in decreasing order via a DLA (diffision limited aggregation) algorithm: the graph is placed randomly on a circle far away from the center and a random walk is conducted until the graph walks into the larger graphs already placed or walks too far from the center of the layout. The \code{layout_components()} function disassembles the graph first into maximal connected components and calls the supplied \code{layout} function for each component separately. -Finally it merges the layouts via calling \code{merge_coords()}. + Finally it merges the layouts via calling \code{merge_coords()}. } \section{Related documentation in the C library}{ \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_decompose}{\code{decompose()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}} diff --git a/man/min_cut.Rd b/man/min_cut.Rd index 78ac95c3993..ef30016dddd 100644 --- a/man/min_cut.Rd +++ b/man/min_cut.Rd @@ -23,33 +23,33 @@ min_cut( \item{...}{These dots are for future extensions and must be empty.} \item{capacity}{Vector giving the capacity of the edges. -If this is \code{NULL} (the default) then the \code{capacity} edge attribute is used.} + If this is \code{NULL} (the default) then the \code{capacity} edge attribute is used.} \item{value.only}{Logical, if \code{TRUE} only the minimum cut value is returned, if \code{FALSE} the edges in the cut and a the two (or more) partitions are also returned.} } \value{ For \code{min_cut()} a nuieric constant, the value of the minimum cut, except if \code{value.only = FALSE}. -In this case a named list with components: + In this case a named list with components: \describe{ \item{value}{ Numeric scalar, the cut value. -} + } \item{cut}{ Numeric vector, the edges in the cut. -} + } \item{partition1}{ The vertices in the first partition after the cut edges are removed. -Note that these vertices might be actually in different components + Note that these vertices might be actually in different components (after the cut edges are removed), as the graph may fall apart into more than two components. -} + } \item{partition2}{ The vertices in the second partition after the cut edges are removed. -Note that these vertices might be actually in different components + Note that these vertices might be actually in different components (after the cut edges are removed), as the graph may fall apart into more than two components. -} + } } } \description{ @@ -59,7 +59,7 @@ as the graph may fall apart into more than two components. The minimum st-cut between \code{source} and \code{target} is the minimum total weight of edges needed to remove to eliminate all paths from \code{source} to \code{target}. The minimum cut of a graph is the minimum total weight of the edges needed to remove to separate the graph into (at least) two components. -(Which is to make the graph \emph{not} strongly connected in the directed case.) + (Which is to make the graph \emph{not} strongly connected in the directed case.) The maximum flow between two vertices in a graph is the same as the minimum st-cut, so \code{max_flow()} and \code{min_cut()} essentially calculate the same quantity, diff --git a/man/min_separators.Rd b/man/min_separators.Rd index dd8ed58de95..e51ca8072e8 100644 --- a/man/min_separators.Rd +++ b/man/min_separators.Rd @@ -8,18 +8,18 @@ min_separators(graph) } \arguments{ \item{graph}{The input graph. -It may be directed, but edge directions are ignored.} + It may be directed, but edge directions are ignored.} } \value{ A list of numeric vectors. -Each numeric vector is a vertex separator. + Each numeric vector is a vertex separator. } \description{ Find all vertex sets of minimal size whose removal separates the graph into more components } \details{ This function implements the Kanevsky algorithm for finding all minimal-size vertex separators in an undirected graph. -See the reference below for the details. + See the reference below for the details. In the special case of a fully connected input graph with \eqn{n} vertices, all subsets of size \eqn{n-1} are listed as the result. diff --git a/man/min_st_separators.Rd b/man/min_st_separators.Rd index 292b6b9d7cb..61c5ccb0c6e 100644 --- a/man/min_st_separators.Rd +++ b/man/min_st_separators.Rd @@ -8,11 +8,11 @@ min_st_separators(graph) } \arguments{ \item{graph}{The input graph. -It may be directed, but edge directions are ignored.} + It may be directed, but edge directions are ignored.} } \value{ A list of numeric vectors. -Each vector contains a vertex set (defined by vertex IDs), each vector is an (s,t) separator of the input graph, + Each vector contains a vertex set (defined by vertex IDs), each vector is an (s,t) separator of the input graph, for some \eqn{s} and \eqn{t}. } \description{ @@ -28,7 +28,7 @@ if none of its proper subsets is an \eqn{(s,t)} vertex separator for the same \e \section{Note}{ Note that the code below returns \verb{\{1, 3\}} despite its subset \code{{1}} being a separator as well. -This is because \verb{\{1, 3\}} is minimal with respect to separating vertices 2 and 4. + This is because \verb{\{1, 3\}} is minimal with respect to separating vertices 2 and 4. \if{html}{\out{
}}\preformatted{g <- make_graph(~ 0-1-2-3-4-1) min_st_separators(g) diff --git a/man/minimal.st.separators.Rd b/man/minimal.st.separators.Rd index 116421f4f67..b83a4a48380 100644 --- a/man/minimal.st.separators.Rd +++ b/man/minimal.st.separators.Rd @@ -8,7 +8,7 @@ minimal.st.separators(graph) } \arguments{ \item{graph}{The input graph. -It may be directed, but edge directions are ignored.} + It may be directed, but edge directions are ignored.} } \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/minimum.size.separators.Rd b/man/minimum.size.separators.Rd index b669204a838..ea056c24a88 100644 --- a/man/minimum.size.separators.Rd +++ b/man/minimum.size.separators.Rd @@ -8,7 +8,7 @@ minimum.size.separators(graph) } \arguments{ \item{graph}{The input graph. -It may be directed, but edge directions are ignored.} + It may be directed, but edge directions are ignored.} } \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/minimum.spanning.tree.Rd b/man/minimum.spanning.tree.Rd index 12340e205da..c1c4efb2158 100644 --- a/man/minimum.spanning.tree.Rd +++ b/man/minimum.spanning.tree.Rd @@ -10,14 +10,14 @@ minimum.spanning.tree(graph, weights = NULL, algorithm = NULL, ...) \item{graph}{The graph object to analyze.} \item{weights}{Numeric vector giving the weights of the edges in the graph. -The order is determined by the edge IDs. -This is ignored if the \code{unweighted} algorithm is chosen. -Edge weights are interpreted as distances.} + The order is determined by the edge IDs. + This is ignored if the \code{unweighted} algorithm is chosen. + Edge weights are interpreted as distances.} \item{algorithm}{The algorithm to use for calculation. -\code{unweighted} can be used for unweighted graphs, + \code{unweighted} can be used for unweighted graphs, and \code{prim} runs Prim's algorithm for weighted graphs. -If this is \code{NULL} then igraph will select the algorithm automatically: + If this is \code{NULL} then igraph will select the algorithm automatically: if the graph has an edge attribute called \code{weight} or the \code{weights} argument is not \code{NULL} then Prim's algorithm is chosen, otherwise the unweighted algorithm is used.} diff --git a/man/mod.matrix.Rd b/man/mod.matrix.Rd index 0651300a09f..c898943cc84 100644 --- a/man/mod.matrix.Rd +++ b/man/mod.matrix.Rd @@ -10,14 +10,14 @@ mod.matrix(graph, membership, weights = NULL, resolution = 1, directed = TRUE) \item{membership}{Numeric vector, one value for each vertex, the membership vector of the community structure.} \item{weights}{Numeric vector giving edge weights. -Default: \code{NULL}.} + Default: \code{NULL}.} \item{resolution}{The resolution parameter. -Must be greater than or equal to + Must be greater than or equal to 0. Set it to 1 to use the classical definition of modularity.} \item{directed}{Whether to use the directed or undirected version of modularity. -Ignored for undirected graphs.} + Ignored for undirected graphs.} } \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/modularity.igraph.Rd b/man/modularity.igraph.Rd index ad76c77dbcd..e4699cc283d 100644 --- a/man/modularity.igraph.Rd +++ b/man/modularity.igraph.Rd @@ -23,17 +23,17 @@ modularity_matrix( \item{membership}{Numeric vector, one value for each vertex, the membership vector of the community structure.} \item{weights}{Numeric vector giving edge weights. -Default: \code{NULL}.} + Default: \code{NULL}.} \item{resolution}{The resolution parameter. -Must be greater than or equal to + Must be greater than or equal to 0. Set it to 1 to use the classical definition of modularity.} \item{directed}{Whether to use the directed or undirected version of modularity. -Ignored for undirected graphs.} + Ignored for undirected graphs.} \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.} + 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 given configuration. @@ -54,24 +54,24 @@ types from each other. It defined as \deqn{Q=\frac{1}{2m} \sum_{i,j} is the element of the \eqn{A} adjacency matrix in row \eqn{i} and column \eqn{j}, \eqn{k_i}{ki} is the degree of \eqn{i}, \eqn{k_j}{kj} is the degree of \eqn{j}, \eqn{c_i}{ci} is the type (or component) of \eqn{i}, \eqn{c_j}{cj} that of \eqn{j}, the sum goes over all \eqn{i} and \eqn{j} pairs of vertices, and \eqn{\delta(x,y)}{delta(x,y)} is 1 if \eqn{x=y} and 0 otherwise. -For directed graphs, it is defined as + For directed graphs, it is defined as \deqn{Q = \frac{1}{m} \sum_{i,j} (A_{ij}-\gamma \frac{k_i^{out} k_j^{in}}{m})\delta(c_i,c_j).}{Q=1/(m) * sum( (Aij-gamma*ki^out*kj^in/(m) ) delta(ci,cj),i,j).} The resolution parameter \eqn{\gamma}{gamma} allows weighting the random null model, which might be useful when finding partitions with a high modularity. -Maximizing modularity with higher values of the resolution parameter typically results in more, + Maximizing modularity with higher values of the resolution parameter typically results in more, smaller clusters when finding partitions with a high modularity. -Lower values typically results in fewer, larger clusters. -The original definition of modularity is retrieved when setting \eqn{\gamma}{gamma} to 1. + Lower values typically results in fewer, larger clusters. + The original definition of modularity is retrieved when setting \eqn{\gamma}{gamma} to 1. If edge weights are given, then these are considered as the element of the \eqn{A} adjacency matrix, and \eqn{k_i}{ki} is the sum of weights of adjacent edges for vertex \eqn{i}. \code{modularity_matrix()} calculates the modularity matrix. -This is a dense matrix, and it is defined as the difference of the adjacency matrix and the configuration model null model matrix. -In other words element \eqn{M_{ij}}{M[i,j]} is given as \eqn{A_{ij}-d_i + This is a dense matrix, and it is defined as the difference of the adjacency matrix and the configuration model null model matrix. + In other words element \eqn{M_{ij}}{M[i,j]} is given as \eqn{A_{ij}-d_i d_j/(2m)}{A[i,j]-d[i]d[j]/(2m)}, where \eqn{A_{ij}}{A[i,j]} is the (possibly weighted) adjacency matrix, \eqn{d_i}{d[i]} is the degree of vertex \eqn{i}, and \eqn{m} is the number of edges (or the total weights in the graph, if it is weighed). diff --git a/man/motifs.Rd b/man/motifs.Rd index c60770ad8a4..6f599092b81 100644 --- a/man/motifs.Rd +++ b/man/motifs.Rd @@ -14,34 +14,34 @@ motifs(graph, size = 3, ..., cut.prob = NULL, callback = NULL) \item{...}{These dots are for future extensions and must be empty.} \item{cut.prob}{Numeric vector giving the probabilities that the search graph is cut at a certain level. -Its length should be the same as the size of the motif (the \code{size} argument). -If \code{NULL}, the default, no cuts are made.} + Its length should be the same as the size of the motif (the \code{size} argument). + If \code{NULL}, the default, no cuts are made.} \item{callback}{Optional callback function to call for each motif found. -The function should accept two arguments: + The function should accept two arguments: \code{vids} (integer vector of vertex IDs in the motif) and \code{isoclass} (the isomorphism class of the motif). -The function should return \code{FALSE} to continue the search or \code{TRUE} to stop it. -If \code{NULL} (the default), motif counts are returned as a numeric vector. + The function should return \code{FALSE} to continue the search or \code{TRUE} to stop it. + If \code{NULL} (the default), motif counts are returned as a numeric vector. \strong{Important limitation:} Callback functions must NOT call any igraph functions (including simple queries like \code{vcount()} or \code{ecount()}). -Doing so will cause R to crash due to reentrancy issues. -Extract any needed graph information before calling the function with a callback, + Doing so will cause R to crash due to reentrancy issues. + Extract any needed graph information before calling the function with a callback, or use collector mode (the default) and process results afterward.} } \value{ When \code{callback} is \code{NULL}, \code{motifs()} returns a numeric vector, the number of occurrences of each motif in the graph. -The motifs are ordered by their isomorphism classes. -Note that for unconnected subgraphs, which are not considered to be motifs, the result will be \code{NA}. + The motifs are ordered by their isomorphism classes. + Note that for unconnected subgraphs, which are not considered to be motifs, the result will be \code{NA}. When \code{callback} is provided, the function returns \code{NULL} invisibly and calls the callback function for each motif found. } \description{ Graph motifs are small connected induced subgraphs with a well-defined structure. -These functions search a graph for various motifs. + These functions search a graph for various motifs. } \details{ \code{motifs()} searches a graph for motifs of a given size and returns a numeric vector containing the number of different motifs. -The order of the motifs is defined by their isomorphism class, see \code{\link[=isomorphism_class]{isomorphism_class()}}. + The order of the motifs is defined by their isomorphism class, see \code{\link[=isomorphism_class]{isomorphism_class()}}. } \section{Related documentation in the C library}{ \href{https://igraph.org/c/html/0.10.17/igraph-Motifs.html#igraph_motifs_randesu_callback}{\code{motifs_randesu_callback()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Motifs.html#igraph_motifs_randesu}{\code{motifs_randesu()}} diff --git a/man/mst.Rd b/man/mst.Rd index d2470bf0a16..5dcf5e947ec 100644 --- a/man/mst.Rd +++ b/man/mst.Rd @@ -10,14 +10,14 @@ mst(graph, weights = NULL, algorithm = NULL, ...) \item{graph}{The graph object to analyze.} \item{weights}{Numeric vector giving the weights of the edges in the graph. -The order is determined by the edge IDs. -This is ignored if the \code{unweighted} algorithm is chosen. -Edge weights are interpreted as distances.} + The order is determined by the edge IDs. + This is ignored if the \code{unweighted} algorithm is chosen. + Edge weights are interpreted as distances.} \item{algorithm}{The algorithm to use for calculation. -\code{unweighted} can be used for unweighted graphs, + \code{unweighted} can be used for unweighted graphs, and \code{prim} runs Prim's algorithm for weighted graphs. -If this is \code{NULL} then igraph will select the algorithm automatically: + If this is \code{NULL} then igraph will select the algorithm automatically: if the graph has an edge attribute called \code{weight} or the \code{weights} argument is not \code{NULL} then Prim's algorithm is chosen, otherwise the unweighted algorithm is used.} @@ -25,13 +25,13 @@ otherwise the unweighted algorithm is used.} } \value{ A graph object with the minimum spanning forest. -To check whether it is a tree, check that the number of its edges is \code{vcount(graph)-1}. -The edge and vertex attributes of the original graph are preserved in the result. + To check whether it is a tree, check that the number of its edges is \code{vcount(graph)-1}. + The edge and vertex attributes of the original graph are preserved in the result. } \description{ A \emph{spanning tree} of a connected graph is a connected subgraph with the smallest number of edges that includes all vertices of the graph. -A graph will have many spanning trees. -Among these, the \emph{minimum spanning tree} will have the smallest sum of edge weights. + A graph will have many spanning trees. + Among these, the \emph{minimum spanning tree} will have the smallest sum of edge weights. } \details{ The \emph{minimum spanning forest} of a disconnected graph is the collection of minimum spanning trees of all of its components. diff --git a/man/multilevel.community.Rd b/man/multilevel.community.Rd index c16e712cd28..f292fa67859 100644 --- a/man/multilevel.community.Rd +++ b/man/multilevel.community.Rd @@ -8,18 +8,18 @@ multilevel.community(graph, weights = NULL, resolution = 1) } \arguments{ \item{graph}{The input graph. -It must be undirected.} + It must be undirected.} \item{weights}{The weights of the edges. -It must be a positive numeric vector, \code{NULL} or \code{NA}. -If it is \code{NULL} and the input graph has a \sQuote{weight} edge attribute, then that attribute will be used. -If \code{NULL} and no such attribute is present, then the edges will have equal weights. -Set this to \code{NA} if the graph was a \sQuote{weight} edge attribute, but you don't want to use it for community detection. -A larger edge weight means a stronger connection for this function.} + It must be a positive numeric vector, \code{NULL} or \code{NA}. + If it is \code{NULL} and the input graph has a \sQuote{weight} edge attribute, then that attribute will be used. + If \code{NULL} and no such attribute is present, then the edges will have equal weights. + Set this to \code{NA} if the graph was a \sQuote{weight} edge attribute, but you don't want to use it for community detection. + A larger edge weight means a stronger connection for this function.} \item{resolution}{Optional resolution parameter that allows the user to adjust the resolution parameter of the modularity function that the algorithm uses internally. -Lower values typically yield fewer, larger clusters. -The original definition of modularity is recovered when the resolution parameter is set to 1.} + Lower values typically yield fewer, larger clusters. + The original definition of modularity is recovered when the resolution parameter is set to 1.} } \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/neighborhood.size.Rd b/man/neighborhood.size.Rd index 3692e64f3c9..86638ed8ae1 100644 --- a/man/neighborhood.size.Rd +++ b/man/neighborhood.size.Rd @@ -16,17 +16,17 @@ neighborhood.size( \item{graph}{The input graph.} \item{order}{Integer giving the order of the neighborhood. -Negative values indicate an infinite order.} + Negative values indicate an infinite order.} \item{nodes}{The vertices for which the calculation is performed. -The default \code{NULL} selects all vertices.} + The default \code{NULL} selects all vertices.} \item{mode}{Character constant, it specifies how to use the direction of the edges if a directed graph is analyzed. -For \sQuote{out} only the outgoing edges are followed, + For \sQuote{out} only the outgoing edges are followed, so all vertices reachable from the source vertex in at most \code{order} steps are counted. -For \sQuote{"in"} all vertices from which the source vertex is reachable in at most \code{order} steps are counted. -\sQuote{"all"} ignores the direction of the edges. -This argument is ignored for undirected graphs.} + For \sQuote{"in"} all vertices from which the source vertex is reachable in at most \code{order} steps are counted. + \sQuote{"all"} ignores the direction of the edges. + This argument is ignored for undirected graphs.} \item{mindist}{The minimum distance to include the vertex in the result.} } diff --git a/man/neighbors.Rd b/man/neighbors.Rd index ab3abc9ca4d..c709410eeff 100644 --- a/man/neighbors.Rd +++ b/man/neighbors.Rd @@ -14,7 +14,7 @@ neighbors(graph, v, ..., mode = c("out", "in", "all", "total")) \item{...}{These dots are for future extensions and must be empty.} \item{mode}{Whether to query outgoing (\sQuote{out}), incoming (\sQuote{in}) edges, or both types (\sQuote{all}). -This is ignored for undirected graphs.} + This is ignored for undirected graphs.} } \value{ A vertex sequence containing the neighbors of the input vertex. diff --git a/man/no.clusters.Rd b/man/no.clusters.Rd index 94cd6587718..5e4c24f0025 100644 --- a/man/no.clusters.Rd +++ b/man/no.clusters.Rd @@ -10,9 +10,9 @@ no.clusters(graph, mode = c("weak", "strong")) \item{graph}{The graph to analyze.} \item{mode}{Character string, either \dQuote{weak} or \dQuote{strong}. -For directed graphs \dQuote{weak} implies weakly, + For directed graphs \dQuote{weak} implies weakly, \dQuote{strong} strongly connected components to search. -It is ignored for undirected graphs.} + It is ignored for undirected graphs.} } \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/normalize.Rd b/man/normalize.Rd index c73a55d5d4f..28e97b9d004 100644 --- a/man/normalize.Rd +++ b/man/normalize.Rd @@ -17,10 +17,10 @@ normalize( \item{xmin, xmax}{Minimum and maximum for x coordinates.} \item{ymin, ymax}{Minimum and maximum for y coordinates. -When omitted, they follow \code{xmin} and \code{xmax}; \code{NULL} disables normalization along this axis.} + When omitted, they follow \code{xmin} and \code{xmax}; \code{NULL} disables normalization along this axis.} \item{zmin, zmax}{Minimum and maximum for z coordinates. -When omitted, they follow \code{xmin} and \code{xmax}; \code{NULL} disables normalization along this axis.} + When omitted, they follow \code{xmin} and \code{xmax}; \code{NULL} disables normalization along this axis.} } \description{ Scale coordinates of a layout. diff --git a/man/optimal.community.Rd b/man/optimal.community.Rd index 7cb3cf88351..e8ebc9db3db 100644 --- a/man/optimal.community.Rd +++ b/man/optimal.community.Rd @@ -8,14 +8,14 @@ optimal.community(graph, weights = NULL) } \arguments{ \item{graph}{The input graph. -It may be undirected or directed.} + It may be undirected or directed.} \item{weights}{The weights of the edges. -It must be a positive numeric vector, \code{NULL} or \code{NA}. -If it is \code{NULL} and the input graph has a \sQuote{weight} edge attribute, then that attribute will be used. -If \code{NULL} and no such attribute is present, then the edges will have equal weights. -Set this to \code{NA} if the graph was a \sQuote{weight} edge attribute, but you don't want to use it for community detection. -A larger edge weight means a stronger connection for this function.} + It must be a positive numeric vector, \code{NULL} or \code{NA}. + If it is \code{NULL} and the input graph has a \sQuote{weight} edge attribute, then that attribute will be used. + If \code{NULL} and no such attribute is present, then the edges will have equal weights. + Set this to \code{NA} if the graph was a \sQuote{weight} edge attribute, but you don't want to use it for community detection. + A larger edge weight means a stronger connection for this function.} } \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/page.rank.Rd b/man/page.rank.Rd index 8bfb4d8c97f..9edf249a4f1 100644 --- a/man/page.rank.Rd +++ b/man/page.rank.Rd @@ -19,37 +19,37 @@ page.rank( \item{graph}{The graph object.} \item{algo}{Character scalar, which implementation to use to carry out the calculation. -The default is \code{"prpack"}, + The default is \code{"prpack"}, which uses the PRPACK library (\url{https://github.com/dgleich/prpack}) to calculate PageRank scores by solving a set of linear equations. -This is a new implementation in igraph version 0.7, and the suggested one, + This is a new implementation in igraph version 0.7, and the suggested one, as it is the most stable and the fastest for all but small graphs. -\code{"arpack"} uses the ARPACK library, + \code{"arpack"} uses the ARPACK library, the default implementation from igraph version 0.5 until version 0.7. It computes PageRank scores by solving an eingevalue problem.} \item{vids}{The vertices of interest. -The default \code{NULL} selects all vertices.} + The default \code{NULL} selects all vertices.} \item{directed}{Logical, if true directed paths will be considered for directed graphs. -It is ignored for undirected graphs.} + It is ignored for undirected graphs.} \item{damping}{The damping factor (\sQuote{d} in the original paper).} \item{personalized}{Optional vector giving a probability distribution to calculate personalized PageRank. -For personalized PageRank, the probability of jumping to a node when abandoning the random walk is not uniform, + For personalized PageRank, the probability of jumping to a node when abandoning the random walk is not uniform, but it is given by this vector. -The vector should contains an entry for each vertex and it will be rescaled to sum up to one.} + The vector should contains an entry for each vertex and it will be rescaled to sum up to one.} \item{weights}{A numerical vector or \code{NULL}. -This argument can be used to give edge weights for calculating the weighted PageRank of vertices. -If this is \code{NULL} and the graph has a \code{weight} edge attribute then that is used. -If \code{weights} is a numerical vector then it used, even if the graph has a \code{weights} edge attribute. -If this is \code{NA}, then no edge weights are used (even if the graph has a \code{weight} edge attribute. -This function interprets edge weights as connection strengths. -In the random surfer model, an edge with a larger weight is more likely to be selected by the surfer.} + This argument can be used to give edge weights for calculating the weighted PageRank of vertices. + If this is \code{NULL} and the graph has a \code{weight} edge attribute then that is used. + If \code{weights} is a numerical vector then it used, even if the graph has a \code{weights} edge attribute. + If this is \code{NA}, then no edge weights are used (even if the graph has a \code{weight} edge attribute. + This function interprets edge weights as connection strengths. + In the random surfer model, an edge with a larger weight is more likely to be selected by the surfer.} \item{options}{A named list, to override some ARPACK options. -See \code{\link[=arpack]{arpack()}} for details. -This argument is ignored if the PRPACK implementation is used.} + See \code{\link[=arpack]{arpack()}} for details. + This argument is ignored if the PRPACK implementation is used.} } \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/page_rank.Rd b/man/page_rank.Rd index 2b25af1cec2..f0d81756af1 100644 --- a/man/page_rank.Rd +++ b/man/page_rank.Rd @@ -22,50 +22,50 @@ page_rank( \item{...}{These dots are for future extensions and must be empty.} \item{algo}{Character scalar, which implementation to use to carry out the calculation. -The default is \code{"prpack"}, + The default is \code{"prpack"}, which uses the PRPACK library (\url{https://github.com/dgleich/prpack}) to calculate PageRank scores by solving a set of linear equations. -This is a new implementation in igraph version 0.7, and the suggested one, + This is a new implementation in igraph version 0.7, and the suggested one, as it is the most stable and the fastest for all but small graphs. -\code{"arpack"} uses the ARPACK library, + \code{"arpack"} uses the ARPACK library, the default implementation from igraph version 0.5 until version 0.7. It computes PageRank scores by solving an eingevalue problem.} \item{vids}{The vertices of interest. -The default \code{NULL} selects all vertices.} + The default \code{NULL} selects all vertices.} \item{directed}{Logical, if true directed paths will be considered for directed graphs. -It is ignored for undirected graphs.} + It is ignored for undirected graphs.} \item{damping}{The damping factor (\sQuote{d} in the original paper).} \item{personalized}{Optional vector giving a probability distribution to calculate personalized PageRank. -For personalized PageRank, the probability of jumping to a node when abandoning the random walk is not uniform, + For personalized PageRank, the probability of jumping to a node when abandoning the random walk is not uniform, but it is given by this vector. -The vector should contains an entry for each vertex and it will be rescaled to sum up to one.} + The vector should contains an entry for each vertex and it will be rescaled to sum up to one.} \item{weights}{A numerical vector or \code{NULL}. -This argument can be used to give edge weights for calculating the weighted PageRank of vertices. -If this is \code{NULL} and the graph has a \code{weight} edge attribute then that is used. -If \code{weights} is a numerical vector then it used, even if the graph has a \code{weights} edge attribute. -If this is \code{NA}, then no edge weights are used (even if the graph has a \code{weight} edge attribute. -This function interprets edge weights as connection strengths. -In the random surfer model, an edge with a larger weight is more likely to be selected by the surfer.} + This argument can be used to give edge weights for calculating the weighted PageRank of vertices. + If this is \code{NULL} and the graph has a \code{weight} edge attribute then that is used. + If \code{weights} is a numerical vector then it used, even if the graph has a \code{weights} edge attribute. + If this is \code{NA}, then no edge weights are used (even if the graph has a \code{weight} edge attribute. + This function interprets edge weights as connection strengths. + In the random surfer model, an edge with a larger weight is more likely to be selected by the surfer.} \item{options}{A named list, to override some ARPACK options. -See \code{\link[=arpack]{arpack()}} for details. -This argument is ignored if the PRPACK implementation is used.} + See \code{\link[=arpack]{arpack()}} for details. + This argument is ignored if the PRPACK implementation is used.} } \value{ A named list with entries: \describe{ \item{vector}{ A numeric vector with the PageRank scores. -} + } \item{value}{ When using the ARPACK method, the eigenvalue corresponding to the eigenvector with the PageRank scores is returned here. It is expected to be exactly one, and can be used to check that ARPACK has successfully converged to the expected eingevector. When using the PRPACK method, it is always set to 1.0. -} + } \item{options}{ Some information about the underlying ARPACK calculation. See \code{\link[=arpack]{arpack()}} for details. This entry is \code{NULL} if not the ARPACK implementation was used. -} + } } } \description{ @@ -76,13 +76,13 @@ For the explanation of the PageRank algorithm, see the following webpage: \url{h or the following reference: Sergey Brin and Larry Page: The Anatomy of a Large-Scale Hypertextual Web Search Engine. -Proceedings of the 7th World-Wide Web Conference, Brisbane, Australia, April 1998. + Proceedings of the 7th World-Wide Web Conference, Brisbane, Australia, April 1998. The \code{page_rank()} function can use either the PRPACK library or ARPACK (see \code{\link[=arpack]{arpack()}}) to perform the calculation. Please note that the PageRank of a given vertex depends on the PageRank of all other vertices, so even if you want to calculate the PageRank for only some of the vertices, all of them must be calculated. -Requesting the PageRank for only some of the vertices does not result in any performance increase at all. + Requesting the PageRank for only some of the vertices does not result in any performance increase at all. } \section{Related documentation in the C library}{ \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_personalized_pagerank}{\code{personalized_pagerank()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_edges}{\code{edges()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_get_eids}{\code{get_eids()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_ecount}{\code{ecount()}} diff --git a/man/path.Rd b/man/path.Rd index 75467274775..f60e74120b8 100644 --- a/man/path.Rd +++ b/man/path.Rd @@ -18,7 +18,7 @@ This function can be used to add or delete edges that form a path. \details{ When adding edges via \code{+}, all unnamed arguments are concatenated, and each element of a final vector is interpreted as a vertex in the graph. -For a vector of length \eqn{n+1}, \eqn{n} edges are then added, from vertex 1 to vertex 2, from vertex 2 to vertex 3, + For a vector of length \eqn{n+1}, \eqn{n} edges are then added, from vertex 1 to vertex 2, from vertex 2 to vertex 3, etc. Named arguments will be used as edge attributes for the new edges. When deleting edges, all attributes are concatenated and then passed to \code{\link[=delete_edges]{delete_edges()}}. diff --git a/man/permute.Rd b/man/permute.Rd index 15d3c86b3d2..a8ac2c8b413 100644 --- a/man/permute.Rd +++ b/man/permute.Rd @@ -10,7 +10,7 @@ permute(graph, permutation) \item{graph}{The input graph, it can directed or undirected.} \item{permutation}{A numeric vector giving the permutation to apply. -The first element is the new ID of vertex 1, etc. Every number between one and \code{vcount(graph)} must appear exactly once.} + The first element is the new ID of vertex 1, etc. Every number between one and \code{vcount(graph)} must appear exactly once.} } \value{ A new graph object. @@ -20,7 +20,7 @@ Create a new graph, by permuting vertex IDs. } \details{ This function creates a new graph from the input graph by permuting its vertices according to the specified mapping. -Call this function with the output of \code{\link[=canonical_permutation]{canonical_permutation()}} to create the canonical form of a graph. + Call this function with the output of \code{\link[=canonical_permutation]{canonical_permutation()}} to create the canonical form of a graph. \code{permute()} keeps all graph, vertex and edge attributes of the graph. } diff --git a/man/permute.vertices.Rd b/man/permute.vertices.Rd index b6022641462..3f329b8ce19 100644 --- a/man/permute.vertices.Rd +++ b/man/permute.vertices.Rd @@ -10,7 +10,7 @@ permute.vertices(graph, permutation) \item{graph}{The input graph, it can directed or undirected.} \item{permutation}{A numeric vector giving the permutation to apply. -The first element is the new ID of vertex 1, etc. Every number between one and \code{vcount(graph)} must appear exactly once.} + The first element is the new ID of vertex 1, etc. Every number between one and \code{vcount(graph)} must appear exactly once.} } \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/piecewise.layout.Rd b/man/piecewise.layout.Rd index 951bff9756e..5e54c3563a3 100644 --- a/man/piecewise.layout.Rd +++ b/man/piecewise.layout.Rd @@ -10,10 +10,10 @@ piecewise.layout(graph, layout = layout_with_kk, ...) \item{graph}{The input graph.} \item{layout}{A function object, the layout function to use. -The default \code{NULL} uses \code{layout_with_kk}.} + The default \code{NULL} uses \code{layout_with_kk}.} \item{...}{For \code{layout_components()}, additional arguments to pass to the \code{layout} layout function. -For \code{merge_coords()}, these dots must be empty.} + For \code{merge_coords()}, 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/pipe.Rd b/man/pipe.Rd index e34d6a0fe67..1d0c1df67db 100644 --- a/man/pipe.Rd +++ b/man/pipe.Rd @@ -13,7 +13,7 @@ Result of applying the right hand side to the result of the left hand side. } \description{ igraph re-exports the \verb{\%>\%} operator of magrittr, because we find it very useful. -Please see the documentation in the \code{magrittr} package. + Please see the documentation in the \code{magrittr} package. } \examples{ make_ring(10) \%>\% diff --git a/man/plot.common.Rd b/man/plot.common.Rd index a19f63ad259..a00a065c8a8 100644 --- a/man/plot.common.Rd +++ b/man/plot.common.Rd @@ -12,50 +12,50 @@ The common bits of the three plotting functions \code{plot.igraph}, There are currently three different functions in the igraph package which can draw graph in various ways: \code{plot.igraph} does simple non-interactive 2D plotting to R devices. -Actually it is an implementation of the \code{\link[graphics:plot]{graphics::plot()}} generic function, + Actually it is an implementation of the \code{\link[graphics:plot]{graphics::plot()}} generic function, so you can write \code{plot(graph)} instead of \code{plot.igraph(graph)}. -As it used the standard R devices it supports every output format for which R has an output device. -The list is quite impressing: + As it used the standard R devices it supports every output format for which R has an output device. + The list is quite impressing: PostScript, PDF files, XFig files, SVG files, JPG, PNG and of course you can plot to the screen as well using the default devices, or the good-looking anti-aliased Cairo device. -See \code{\link[=plot.igraph]{plot.igraph()}} for some more information. + See \code{\link[=plot.igraph]{plot.igraph()}} for some more information. \code{\link[=tkplot]{tkplot()}} does interactive 2D plotting using the \code{tcltk} package. -It can only handle graphs of moderate size, a thousand vertices is probably already too many. -Some parameters of the plotted graph can be changed interactively after issuing the \code{tkplot} command: the position, + It can only handle graphs of moderate size, a thousand vertices is probably already too many. + Some parameters of the plotted graph can be changed interactively after issuing the \code{tkplot} command: the position, color and size of the vertices and the color and width of the edges. -See \code{\link[=tkplot]{tkplot()}} for details. + See \code{\link[=tkplot]{tkplot()}} for details. \code{\link[=rglplot]{rglplot()}} is an experimental function to draw graphs in 3D using OpenGL. -See \code{\link[=rglplot]{rglplot()}} for some more information. + See \code{\link[=rglplot]{rglplot()}} for some more information. Please also check the examples below. } \section{How to specify graphical parameters}{ There are three ways to give values to the parameters described below, in section 'Parameters'. -We give these three ways here in the order of their precedence. + We give these three ways here in the order of their precedence. The first method is to supply named arguments to the plotting commands: \code{\link[=plot.igraph]{plot.igraph()}}, \code{\link[=tkplot]{tkplot()}} or rglplot()]. -Parameters for vertices start with prefix \sQuote{\code{vertex.}}, parameters for edges have prefix \sQuote{\code{edge.}}, + Parameters for vertices start with prefix \sQuote{\code{vertex.}}, parameters for edges have prefix \sQuote{\code{edge.}}, and global parameters have no prefix. -Eg. the color of the vertices can be given via argument \code{vertex.color}, whereas \code{edge.color} sets the color of the edges. -\code{layout} gives the layout of the graphs. + Eg. the color of the vertices can be given via argument \code{vertex.color}, whereas \code{edge.color} sets the color of the edges. + \code{layout} gives the layout of the graphs. The second way is to assign vertex, edge and graph attributes to the graph. -These attributes have no prefix, ie. the color of the vertices is taken from the \code{color} vertex attribute + These attributes have no prefix, ie. the color of the vertices is taken from the \code{color} vertex attribute and the color of the edges from the \code{color} edge attribute. -The layout of the graph is given by the \code{layout} graph attribute. -(Always assuming that the corresponding command argument is not present.) -Setting vertex and edge attributes are handy if you want to assign a given \sQuote{look} to a graph, + The layout of the graph is given by the \code{layout} graph attribute. + (Always assuming that the corresponding command argument is not present.) + Setting vertex and edge attributes are handy if you want to assign a given \sQuote{look} to a graph, attributes are saved with the graph is you save it with \code{\link[base:save]{base::save()}} or in GraphML format with \code{\link[=write_graph]{write_graph()}}, so the graph will have the same look after loading it again. If a parameter is not given in the command line, and the corresponding vertex/edge/graph attribute is also missing then the general igraph parameters handled by \code{\link[=igraph_options]{igraph_options()}} are also checked. -Vertex parameters have prefix \sQuote{\code{vertex.}}, edge parameters are prefixed with \sQuote{\code{edge.}}, + Vertex parameters have prefix \sQuote{\code{vertex.}}, edge parameters are prefixed with \sQuote{\code{edge.}}, general parameters like \code{layout} are prefixed with \sQuote{\code{plot}}. -These parameters are useful + These parameters are useful if you want all or most of your graphs to have the same look, vertex size, vertex color, etc. Then you don't need to set these at every plotting, and you also don't need to assign vertex/edge attributes to every graph. @@ -64,187 +64,187 @@ as given in the source code. Different parameters can have different type, eg. vertex colors can be given as a character vector with color names, or as an integer vector with the color numbers from the current palette. -Different types are valid for different parameters, this is discussed in detail in the next section. -It is however always true that the parameter can always be a function object + Different types are valid for different parameters, this is discussed in detail in the next section. + It is however always true that the parameter can always be a function object in which it will be called with the graph as its single argument to get the \dQuote{proper} value of the parameter. -(If the function returns another function object that will \emph{not} be called again\dots) + (If the function returns another function object that will \emph{not} be called again\dots) } \section{The list of parameters}{ Vertex parameters first, note that the \sQuote{\code{vertex.}} prefix needs to be added if they are used as an argument or when setting via \code{\link[=igraph_options]{igraph_options()}}. -The value of the parameter may be scalar valid for every vertex or a vector with a separate value for each vertex. -(Shorter vectors are recycled.) -\describe{ + The value of the parameter may be scalar valid for every vertex or a vector with a separate value for each vertex. + (Shorter vectors are recycled.) + \describe{ \item{size}{ The size of the vertex, a numeric scalar or vector, in the latter case each vertex sizes may differ. -This vertex sizes are scaled in order have about the same size of vertices for a given value for all three plotting commands. -It does not need to be an integer number. -The default value is 15. This is big enough to place short labels on vertices. -If \code{size.scaling} is \code{TRUE}, \code{relative.size} is used to scale the size appropriately. -} + This vertex sizes are scaled in order have about the same size of vertices for a given value for all three plotting commands. + It does not need to be an integer number. + The default value is 15. This is big enough to place short labels on vertices. + If \code{size.scaling} is \code{TRUE}, \code{relative.size} is used to scale the size appropriately. + } \item{size2}{ The \dQuote{other} size of the vertex, for some vertex shapes. -For the various rectangle shapes this gives the height of the vertices, + For the various rectangle shapes this gives the height of the vertices, whereas \code{size} gives the width. -It is ignored by shapes for which the size can be specified with a single number. + It is ignored by shapes for which the size can be specified with a single number. The default is 15. -} + } \item{color}{ The fill color of the vertex. -If it is numeric then the current palette is used, see \code{\link[grDevices:palette]{grDevices::palette()}}. -If it is a character vector then it may either contain integer values, named colors or RGB specified colors with three or four bytes. -All strings starting with \sQuote{\code{#}} are assumed to be RGB color specifications. -It is possible to mix named color and RGB colors. -Note that \code{\link[=tkplot]{tkplot()}} ignores the fourth byte (alpha channel) in the RGB color specification. + If it is numeric then the current palette is used, see \code{\link[grDevices:palette]{grDevices::palette()}}. + If it is a character vector then it may either contain integer values, named colors or RGB specified colors with three or four bytes. + All strings starting with \sQuote{\code{#}} are assumed to be RGB color specifications. + It is possible to mix named color and RGB colors. + Note that \code{\link[=tkplot]{tkplot()}} ignores the fourth byte (alpha channel) in the RGB color specification. For \code{plot.igraph} and integer values, the default igraph palette is used (see the \sQuote{palette} parameter below. -Note that this is different from the R palette. + Note that this is different from the R palette. If you don't want (some) vertices to have any color, supply \code{NA} as the color name. The default value is \dQuote{\code{SkyBlue2}}. -} + } \item{frame.color}{ The color of the frame of the vertices, the same formats are allowed as for the fill color. If you don't want vertices to have a frame, supply \code{NA} as the color name. By default it is \dQuote{black}. -} + } \item{frame.width}{ The width of the frame of the vertices. The default value is 1. -} + } \item{shape}{ The shape of the vertex, currently \dQuote{\code{circle}}, \dQuote{\code{square}}, \dQuote{\code{csquare}}, \dQuote{\code{rectangle}}, \dQuote{\code{crectangle}}, \dQuote{\code{vrectangle}}, \dQuote{\code{pie}} (see \code{\link[=vertex.shape.pie]{vertex.shape.pie()}}), \sQuote{\code{sphere}}, and \dQuote{\code{none}} are supported, and only by the \code{\link[=plot.igraph]{plot.igraph()}} command. -\dQuote{\code{none}} does not draw the vertices at all, although vertex label are plotted (if given). -See \code{\link[=shapes]{shapes()}} for details about vertex shapes and \code{\link[=vertex.shape.pie]{vertex.shape.pie()}} for using pie charts as vertices. + \dQuote{\code{none}} does not draw the vertices at all, although vertex label are plotted (if given). + See \code{\link[=shapes]{shapes()}} for details about vertex shapes and \code{\link[=vertex.shape.pie]{vertex.shape.pie()}} for using pie charts as vertices. The \dQuote{\code{sphere}} vertex shape plots vertices as 3D ray-traced spheres, in the given color and size. -This produces a raster image and it is only supported with some graphics devices. -On some devices raster transparency is not supported and the spheres do not have a transparent background. -See \link{dev.capabilities} and the \sQuote{\code{rasterImage}} capability to check that your device is supported. + This produces a raster image and it is only supported with some graphics devices. + On some devices raster transparency is not supported and the spheres do not have a transparent background. + See \link{dev.capabilities} and the \sQuote{\code{rasterImage}} capability to check that your device is supported. By default vertices are drawn as circles. -} + } \item{label}{ The vertex labels. They will be converted to character. -Specify \code{NA} to omit vertex labels. The default vertex labels are the vertex IDs. -} + Specify \code{NA} to omit vertex labels. The default vertex labels are the vertex IDs. + } \item{label.family}{ The font family to be used for vertex labels. -As different plotting commands can used different fonts, they interpret this parameter different ways. -The basic notation is, however, understood by both \code{\link[=plot.igraph]{plot.igraph()}} and \code{\link[=tkplot]{tkplot()}}. -\code{\link[=rglplot]{rglplot()}} does not support fonts at all right now, it ignores this parameter completely. + As different plotting commands can used different fonts, they interpret this parameter different ways. + The basic notation is, however, understood by both \code{\link[=plot.igraph]{plot.igraph()}} and \code{\link[=tkplot]{tkplot()}}. + \code{\link[=rglplot]{rglplot()}} does not support fonts at all right now, it ignores this parameter completely. For \code{\link[=plot.igraph]{plot.igraph()}} this parameter is simply passed to \code{\link[graphics:text]{graphics::text()}} as argument \code{family}. For \code{\link[=tkplot]{tkplot()}} some conversion is performed. -If this parameter is the name of an existing Tk font, then that font is used and the \code{label.font} + If this parameter is the name of an existing Tk font, then that font is used and the \code{label.font} and \code{label.cex} parameters are ignored completely. -If it is one of the base families (serif, sans, mono) then Times, Helvetica or Courier fonts are used, + If it is one of the base families (serif, sans, mono) then Times, Helvetica or Courier fonts are used, there are guaranteed to exist on all systems. -For the \sQuote{symbol} base family we used the symbol font is available, otherwise the first font + For the \sQuote{symbol} base family we used the symbol font is available, otherwise the first font which has \sQuote{symbol} in its name. -If the parameter is not a name of the base families and it is also not a named Tk font then we pass it to \code{\link[tcltk:tkfont.create]{tcltk::tkfont.create()}} + If the parameter is not a name of the base families and it is also not a named Tk font then we pass it to \code{\link[tcltk:tkfont.create]{tcltk::tkfont.create()}} and hope the user knows what she is doing. -The \code{label.font} and \code{label.cex} parameters are also passed to \code{\link[tcltk:tkfont.create]{tcltk::tkfont.create()}} in this case. + The \code{label.font} and \code{label.cex} parameters are also passed to \code{\link[tcltk:tkfont.create]{tcltk::tkfont.create()}} in this case. The default value is \sQuote{serif}. -} + } \item{label.font}{ The font within the font family to use for the vertex labels. -It is interpreted the same way as the the \code{font} graphical parameter: + It is interpreted the same way as the the \code{font} graphical parameter: 1 is plain text, 2 is bold face, 3 is italic, 4 is bold and italic and 5 specifies the symbol font. For \code{\link[=plot.igraph]{plot.igraph()}} this parameter is simply passed to \code{\link[graphics:text]{graphics::text()}}. For \code{\link[=tkplot]{tkplot()}}, if the \code{label.family} parameter is not the name of a Tk font then this parameter is used to set whether the newly created font should be italic and/or boldface. -Otherwise it is ignored. + Otherwise it is ignored. For \code{\link[=rglplot]{rglplot()}} it is ignored. The default value is 1. -} + } \item{label.cex}{ The font size for vertex labels. -It is interpreted as a multiplication factor of some device-dependent base font size. + It is interpreted as a multiplication factor of some device-dependent base font size. For \code{\link[=plot.igraph]{plot.igraph()}} it is simply passed to \code{\link[graphics:text]{graphics::text()}} as argument \code{cex}. For \code{\link[=tkplot]{tkplot()}} it is multiplied by 12 and then used as the \code{size} argument for \code{\link[tcltk:tkfont.create]{tcltk::tkfont.create()}}. -The base font is thus 12 for tkplot. + The base font is thus 12 for tkplot. For \code{\link[=rglplot]{rglplot()}} it is ignored. The default value is 1. -} + } \item{label.dist}{ The distance of the label from the center of the vertex. -If it is 0 then the label is centered on the vertex. -If it is 1 then the label is displayed beside the vertex. + If it is 0 then the label is centered on the vertex. + If it is 1 then the label is displayed beside the vertex. The default value is 0. -} + } \item{label.degree}{ It defines the position of the vertex labels, relative to the center of the vertices. -It is interpreted as an angle in radians, + It is interpreted as an angle in radians, zero means \sQuote{to the right}, and \sQuote{\code{pi}} means to the left, up is \code{-pi/2} and down is \code{pi/2}. The default value is \code{-pi/4}. -} + } \item{label.color}{ The color of the labels, see the \code{color} vertex parameter discussed earlier for the possible values. The default value is \code{black}. -} + } \item{label.angle}{ The rotation of the vertex labels, in degrees. Corresponds to the \code{srt} parameter of \code{\link[graphics:text]{graphics::text()}}. -} + } \item{label.adj}{ one or two numeric values, giving the horizontal and vertical adjustment of the vertex labels. See also \code{adj} in \code{\link[graphics:text]{graphics::text()}}. -} + } \item{size.scaling}{ Switches between absolute vertex sizing (FALSE,default) and relative (TRUE). -If FALSE, \code{vertex.size} and \code{vertex.size2} are used as is. -If TRUE, \code{relative.size} is used to scale both appropriately with \code{relative.size}. -} + If FALSE, \code{vertex.size} and \code{vertex.size2} are used as is. + If TRUE, \code{relative.size} is used to scale both appropriately with \code{relative.size}. + } \item{relative.size}{ The relative size of the smallest and largest vertices as percentage of the plotting region. -When all vertices have the same size, then by default the relative size observed in the plot will be equal to \code{relative.size[2]}. -The default value is \code{c(.01,.025)} (1\\% and 2.5\\% respectively). + When all vertices have the same size, then by default the relative size observed in the plot will be equal to \code{relative.size[2]}. + The default value is \code{c(.01,.025)} (1\\% and 2.5\\% respectively). Only used if \code{size.scaling} is TRUE`. -} + } } Edge parameters require to add the \sQuote{\code{edge.}} prefix when used as arguments or set by \code{\link[=igraph_options]{igraph_options()}}. -The edge parameters: + The edge parameters: \describe{ \item{color}{ The color of the edges, see the \code{color} vertex parameter for the possible values. -By default this parameter is \code{darkgrey}. -} + By default this parameter is \code{darkgrey}. + } \item{width}{ The width of the edges. The default value is 1. -} + } \item{arrow.size}{ The size of the arrows. The default value is 1. -} + } \item{arrow.width}{ The width of the arrows. The default value is 1. -} + } \item{lty}{ The line type for the edges. -Almost the same format is accepted as for the standard graphics \code{\link[graphics:par]{graphics::par()}}, 0 and \dQuote{blank} mean no edges, 1 + Almost the same format is accepted as for the standard graphics \code{\link[graphics:par]{graphics::par()}}, 0 and \dQuote{blank} mean no edges, 1 and \dQuote{solid} are for solid lines, the other possible values are: 2 (\dQuote{dashed}), 3 (\dQuote{dotted}), 4 (\dQuote{dotdash}), 5 (\dQuote{longdash}), 6 (\dQuote{twodash}). @@ -255,94 +255,94 @@ however support \dQuote{blank} lines, instead of type \sQuote{0} type This argument is ignored for \code{\link[=rglplot]{rglplot()}}. The default value is type 1, a solid line. -} + } \item{label}{ The edge labels. -They will be converted to character. Specify \code{NA} to omit edge labels. + They will be converted to character. Specify \code{NA} to omit edge labels. Edge labels are omitted by default. -} + } \item{label.family}{ Font family of the edge labels. See the vertex parameter with the same name for the details. -} + } \item{label.font}{ The font for the edge labels. See the corresponding vertex parameter discussed earlier for details. -} + } \item{label.cex}{ The font size for the edge labels, see the corresponding vertex parameter for details. -} + } \item{label.color}{ The color of the edge labels, see the \code{color} vertex parameters on how to specify colors. -} + } \item{label.x}{ The horizontal \code{NA} elements will be replaced by automatically calculated coordinates. -If \code{NULL}, then all edge horizontal coordinates are calculated automatically. -This parameter is only supported by \code{plot.igraph}. -} + If \code{NULL}, then all edge horizontal coordinates are calculated automatically. + This parameter is only supported by \code{plot.igraph}. + } \item{label.y}{ The same as \code{label.x}, but for vertical coordinates. -} + } \item{curved}{ Specifies whether to draw curved edges, or not. This can be a logical or a numeric vector or scalar. First the vector is replicated to have the same length as the number of edges in the graph. -Then it is interpreted for each edge separately. -A numeric value specifies the curvature of the edge; + Then it is interpreted for each edge separately. + A numeric value specifies the curvature of the edge; zero curvature means straight edges, negative values means the edge bends clockwise, positive values the opposite. -\code{TRUE} means curvature 0.5, \code{FALSE} means curvature zero. + \code{TRUE} means curvature 0.5, \code{FALSE} means curvature zero. By default the vector specifying the curvature is calculated via a call to the \code{\link[=curve_multiple]{curve_multiple()}} function. -This function makes sure that multiple edges are curved and are all visible. -This parameter is ignored for loop edges. + This function makes sure that multiple edges are curved and are all visible. + This parameter is ignored for loop edges. The default value is \code{FALSE}. This parameter is currently ignored by \code{\link[=rglplot]{rglplot()}}. -} + } \item{arrow.mode}{ This parameter can be used to specify for which edges should arrows be drawn. -If this parameter is given by the user (in either of the three ways) + If this parameter is given by the user (in either of the three ways) then it specifies which edges will have forward, backward arrows, or both, or no arrows at all. -As usual, this parameter can be a vector or a scalar value. -It can be an integer or character type. -If it is integer then 0 means no arrows, 1 means backward arrows, 2 is for forward arrows and 3 for both. -If it is a character vector then \dQuote{<} and \dQuote{<-} specify backward, + As usual, this parameter can be a vector or a scalar value. + It can be an integer or character type. + If it is integer then 0 means no arrows, 1 means backward arrows, 2 is for forward arrows and 3 for both. + If it is a character vector then \dQuote{<} and \dQuote{<-} specify backward, \dQuote{>} and \dQuote{->} forward arrows and \dQuote{<>} and \dQuote{<->} stands for both arrows. -All other values mean no arrows, perhaps you should use \dQuote{-} or \dQuote{--} to specify no arrows. + All other values mean no arrows, perhaps you should use \dQuote{-} or \dQuote{--} to specify no arrows. Hint: this parameter can be used as a \sQuote{cheap} solution for drawing \dQuote{mixed} graphs: graphs in which some edges are directed some are not. -If you want do this, then please create a \emph{directed} graph, + If you want do this, then please create a \emph{directed} graph, because as of version 0.4 the vertex pairs in the edge lists can be swapped in undirected graphs. By default, no arrows will be drawn for undirected graphs, and for directed graphs, an arrow will be drawn for each edge, according to its direction. -This is not very surprising, it is the expected behavior. -} + This is not very surprising, it is the expected behavior. + } \item{loop.angle}{ Gives the angle in radians for plotting loop edges. -See the \code{label.dist} vertex parameter to see how this is interpreted. + See the \code{label.dist} vertex parameter to see how this is interpreted. The default value is NULL. This means that the loop edges will be drawn automatically in the largest gap possible. -} + } \item{loop.angle2}{ Gives the second angle in radians for plotting loop edges. -This is only used in 3D, \code{loop.angle} is enough in 2D. + This is only used in 3D, \code{loop.angle} is enough in 2D. The default value is 0. -} + } } Other parameters: \describe{ \item{layout}{ Either a function or a numeric matrix. -It specifies how the vertices will be placed on the plot. + It specifies how the vertices will be placed on the plot. If it is a numeric matrix, then the matrix has to have one line for each vertex, specifying its coordinates. -The matrix should have at least two columns, for the \code{x} and \code{y} coordinates, + The matrix should have at least two columns, for the \code{x} and \code{y} coordinates, and it can also have third column, this will be the \code{z} coordinate for 3D plots and it is ignored for 2D plots. @@ -350,61 +350,61 @@ If a two column matrix is given for the 3D plotting function \code{\link[=rglplo If \code{layout} is a function, this function will be called with the \code{graph} as the single parameter to determine the actual coordinates. -The function should return a matrix with two or three columns. -For the 2D plots the third column is ignored. -The default value is \code{layout_nicely}, a smart function that chooses a layout based on the graph. -} + The function should return a matrix with two or three columns. + For the 2D plots the third column is ignored. + The default value is \code{layout_nicely}, a smart function that chooses a layout based on the graph. + } \item{margin}{ The amount of empty space below, over, at the left and right of the plot, it is a numeric vector of length four. -Usually values between 0 and 0.5 are meaningful, but negative values are also possible, + Usually values between 0 and 0.5 are meaningful, but negative values are also possible, that will make the plot zoom in to a part of the graph. -If it is shorter than four then it is recycled. -\code{\link[=rglplot]{rglplot()}} does not support this parameter, as it can zoom in and out the graph in a more flexible way. -Its default value is 0. -} + If it is shorter than four then it is recycled. + \code{\link[=rglplot]{rglplot()}} does not support this parameter, as it can zoom in and out the graph in a more flexible way. + Its default value is 0. + } \item{palette}{ The color palette to use for vertex color. -The default is \code{\link{categorical_pal}}, which is a color-blind friendly categorical palette. -See its manual page for details and other palettes. -This parameters is only supported by \code{plot}, and not by \code{tkplot} and \code{rglplot}. -} + The default is \code{\link{categorical_pal}}, which is a color-blind friendly categorical palette. + See its manual page for details and other palettes. + This parameters is only supported by \code{plot}, and not by \code{tkplot} and \code{rglplot}. + } \item{rescale}{ Logical constant, whether to rescale the coordinates to the \verb{[-1,1]x[-1,1](x[-1,1])} interval. -This parameter is not implemented for \code{tkplot}. -Defaults to \code{TRUE}, the layout will be rescaled. -} + This parameter is not implemented for \code{tkplot}. + Defaults to \code{TRUE}, the layout will be rescaled. + } \item{asp}{ A numeric constant, it gives the \code{asp} parameter for \code{\link[=plot]{plot()}}, the aspect ratio. -Supply 0 here if you don't want to give an aspect ratio. -It is ignored by \code{tkplot} and \code{rglplot}. -Defaults to 1. -} + Supply 0 here if you don't want to give an aspect ratio. + It is ignored by \code{tkplot} and \code{rglplot}. + Defaults to 1. + } \item{frame}{ Boolean, whether to plot a frame around the graph. -It is ignored by \code{tkplot} and \code{rglplot}. -Defaults to \code{FALSE}. -} + It is ignored by \code{tkplot} and \code{rglplot}. + Defaults to \code{FALSE}. + } \item{main}{ Overall title for the main plot. -The default is empty if the \code{annotate.plot} igraph option is \code{FALSE}, + The default is empty if the \code{annotate.plot} igraph option is \code{FALSE}, and the graph's \code{name} attribute otherwise. -See the same argument of the base \code{plot} function. -Only supported by \code{plot}. -} + See the same argument of the base \code{plot} function. + Only supported by \code{plot}. + } \item{sub}{ Subtitle of the main plot, the default is empty. -Only supported by \code{plot}. -} + Only supported by \code{plot}. + } \item{xlab}{ Title for the x axis, the default is empty if the \code{annotate.plot} igraph option is \code{FALSE}, and the number of vertices and edges, if it is \code{TRUE}. -Only supported by \code{plot}. -} + Only supported by \code{plot}. + } \item{ylab}{ Title for the y axis, the default is empty. -Only supported by \code{plot}. -} + Only supported by \code{plot}. + } } } diff --git a/man/plot.igraph.Rd b/man/plot.igraph.Rd index 6cafda56de9..af0a482b9a1 100644 --- a/man/plot.igraph.Rd +++ b/man/plot.igraph.Rd @@ -33,43 +33,43 @@ \item{ylim}{The limits for the vertical axis, it is unlikely that you want to modify this.} \item{mark.groups}{A list of vertex ID vectors. -It is interpreted as a set of vertex groups. -Each vertex group is highlighted, by plotting a colored smoothed polygon around and \dQuote{under} it. -See the arguments below to control the look of the polygons.} + It is interpreted as a set of vertex groups. + Each vertex group is highlighted, by plotting a colored smoothed polygon around and \dQuote{under} it. + See the arguments below to control the look of the polygons.} \item{mark.shape}{A numeric scalar or vector. -Controls the smoothness of the vertex group marking polygons. -This is basically the \sQuote{shape} parameter of the \code{\link[graphics:xspline]{graphics::xspline()}} function, + Controls the smoothness of the vertex group marking polygons. + This is basically the \sQuote{shape} parameter of the \code{\link[graphics:xspline]{graphics::xspline()}} function, its possible values are between -1 and 1. If it is a vector, then a different value is used for the different vertex groups.} \item{mark.col}{A scalar or vector giving the colors of marking the polygons, in any format accepted by \code{\link[graphics:xspline]{graphics::xspline()}}; e.g. numeric color IDs, symbolic color names, or colors in RGB. -The default \code{NULL} uses semi-transparent rainbow colors.} + The default \code{NULL} uses semi-transparent rainbow colors.} \item{mark.border}{A scalar or vector giving the colors of the borders of the vertex group marking polygons. -If it is \code{NA}, then no border is drawn. -The default \code{NULL} uses rainbow colors.} + If it is \code{NA}, then no border is drawn. + The default \code{NULL} uses rainbow colors.} \item{mark.expand}{A numeric scalar or vector, the size of the border around the marked vertex groups. -It is in the same units as the vertex sizes. -If a vector is given, then different values are used for the different vertex groups.} + It is in the same units as the vertex sizes. + If a vector is given, then different values are used for the different vertex groups.} \item{mark.lwd}{A numeric scalar or vector, the linewidth of the border around the marked vertex groups. -If a vector is given, + If a vector is given, then different values are used for the different vertex groups.} \item{loop.size}{A numeric scalar that allows the user to scale the loop edges of the network. -The default loop size is 1. Larger values will produce larger loops.} + The default loop size is 1. Larger values will produce larger loops.} \item{\dots}{Additional plotting parameters. -See \link{igraph.plotting} for the complete list.} + See \link{igraph.plotting} for the complete list.} } \value{ Returns \code{NULL}, invisibly. } \description{ \code{plot.igraph()} is able to plot graphs to any R device. -It is the non-interactive companion of the \code{tkplot()} function. + It is the non-interactive companion of the \code{tkplot()} function. } \details{ One convenient way to plot graphs is to plot with \code{\link[=tkplot]{tkplot()}} first, handtune the placement of the vertices, diff --git a/man/plot.sir.Rd b/man/plot.sir.Rd index be37bd2a357..ca716862ee2 100644 --- a/man/plot.sir.Rd +++ b/man/plot.sir.Rd @@ -26,7 +26,7 @@ \item{x}{The output of the SIR simulation, coming from the \code{\link[=sir]{sir()}} function.} \item{comp}{Character scalar, which component to plot. -Either \sQuote{NI} (infected, default), \sQuote{NS} (susceptible) or \sQuote{NR} (recovered).} + Either \sQuote{NI} (infected, default), \sQuote{NS} (susceptible) or \sQuote{NR} (recovered).} \item{median}{Logical, whether to plot the (binned) median.} @@ -37,7 +37,7 @@ Either \sQuote{NI} (infected, default), \sQuote{NS} (susceptible) or \sQuote{NR} \item{median_color}{Color of the median curve.} \item{quantile_color}{Color(s) of the quantile curves. -(It is recycled if needed and non-needed entries are ignored if too long.)} + (It is recycled if needed and non-needed entries are ignored if too long.)} \item{lwd.median}{Line width of the median.} @@ -46,15 +46,15 @@ Either \sQuote{NI} (infected, default), \sQuote{NS} (susceptible) or \sQuote{NR} \item{lty.quantile}{Line type of the quantile curves.} \item{xlim}{The x limits, a two-element numeric vector. -If \code{NULL}, then it is calculated from the data.} + If \code{NULL}, then it is calculated from the data.} \item{ylim}{The y limits, a two-element numeric vector. -If \code{NULL}, then it is calculated from the data.} + If \code{NULL}, then it is calculated from the data.} \item{xlab}{The x label.} \item{ylab}{The y label. -If \code{NULL} then it is automatically added based on the \code{comp} argument.} + If \code{NULL} then it is automatically added based on the \code{comp} argument.} \item{\dots}{Additional arguments are passed to \code{\link[=plot]{plot()}}, that is run before any of the curves are added, to create the figure.} } diff --git a/man/plotHierarchy.Rd b/man/plotHierarchy.Rd index b48227c2a3d..da0802caddf 100644 --- a/man/plotHierarchy.Rd +++ b/man/plotHierarchy.Rd @@ -12,12 +12,12 @@ plotHierarchy( } \arguments{ \item{layout}{The layout of a plot, it is simply passed on to \code{plot.igraph()}, see the possible formats there. -The default \code{NULL} uses the Reingold-Tilford layout generator.} + The default \code{NULL} uses 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. -\code{cohesive_blocks()} and \code{export_pajek()} do not accept extra arguments; these dots must be empty for them.} + \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. + \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/plot_dendrogram.communities.Rd b/man/plot_dendrogram.communities.Rd index ebdb13ccb77..c0fbade89f4 100644 --- a/man/plot_dendrogram.communities.Rd +++ b/man/plot_dendrogram.communities.Rd @@ -17,11 +17,11 @@ plot_dendrogram(x, mode = NULL, ...) } \arguments{ \item{x}{An object containing the community structure of a graph. -See \code{\link[=communities]{communities()}} for details.} + See \code{\link[=communities]{communities()}} for details.} \item{mode}{Which dendrogram plotting function to use. -See details below. -The default \code{NULL} uses the \code{dend.plot.type} igraph option.} + See details below. + The default \code{NULL} uses the \code{dend.plot.type} igraph option.} \item{\dots}{Additional arguments to supply to the dendrogram plotting function.} @@ -38,27 +38,27 @@ Plot a hierarchical community structure as a dendrogram. } \details{ \code{plot_dendrogram()} supports three different plotting functions, selected via the \code{mode} argument. -By default the plotting function is taken from the \code{dend.plot.type} igraph option, and it has for possible values: + By default the plotting function is taken from the \code{dend.plot.type} igraph option, and it has for possible values: \itemize{ \item \code{auto} Choose automatically between the plotting functions. -As \code{plot.phylo} is the most sophisticated, that is choosen, whenever the \code{ape} package is available. -Otherwise \code{plot.hclust} is used. -\item \code{phylo} Use \code{plot.phylo} from the \code{ape} package. -\item \code{hclust} Use \code{plot.hclust} from the \code{stats} package. -\item \code{dendrogram} Use \code{plot.dendrogram} from the \code{stats} package. } + As \code{plot.phylo} is the most sophisticated, that is choosen, whenever the \code{ape} package is available. + Otherwise \code{plot.hclust} is used. + \item \code{phylo} Use \code{plot.phylo} from the \code{ape} package. + \item \code{hclust} Use \code{plot.hclust} from the \code{stats} package. + \item \code{dendrogram} Use \code{plot.dendrogram} from the \code{stats} package. } The different plotting functions take different sets of arguments. -When using \code{plot.phylo} (\code{mode="phylo"}), we have the following syntax: + When using \code{plot.phylo} (\code{mode="phylo"}), we have the following syntax: \preformatted{ plot_dendrogram(x, mode="phylo", colbar = palette(), edge.color = NULL, use.edge.length = FALSE, \dots) } The extra arguments not documented above: \itemize{ \item \code{colbar} Color bar for the edges. -\item \code{edge.color} Edge colors. If \code{NULL}, then the + \item \code{edge.color} Edge colors. If \code{NULL}, then the \code{colbar} argument is used. -\item \code{use.edge.length} Passed to \code{plot.phylo}. -\item \code{dots} Attitional arguments to pass to \code{plot.phylo}. -} + \item \code{use.edge.length} Passed to \code{plot.phylo}. + \item \code{dots} Attitional arguments to pass to \code{plot.phylo}. + } The syntax for \code{plot.hclust} (\code{mode="hclust"}): \preformatted{ plot_dendrogram(x, mode="hclust", rect = 0, colbar = palette(), @@ -66,17 +66,17 @@ The syntax for \code{plot.hclust} (\code{mode="hclust"}): \preformatted{ ylab = "", \dots) } The extra arguments not documented above: \itemize{ \item \code{rect} A numeric scalar, the number of groups to mark on the dendrogram. -The dendrogram is cut into exactly \code{rect} groups and they are marked via the \code{rect.hclust} command. -Set this to zero if you don't want to mark any groups. -\item \code{colbar} The colors of the rectangles that mark the vertex groups via the \code{rect} argument. -\item \code{hang} Where to put the leaf nodes, this corresponds to the \code{hang} argument of \code{plot.hclust}. -\item \code{ann} Whether to annotate the plot, the \code{ann} argument of \code{plot.hclust}. -\item \code{main} The main title of the plot, the \code{main} argument of \code{plot.hclust}. -\item \code{sub} The sub-title of the plot, the \code{sub} argument of \code{plot.hclust}. -\item \code{xlab} The label on the horizontal axis, passed to \code{plot.hclust}. -\item \code{ylab} The label on the vertical axis, passed to \code{plot.hclust}. -\item \code{dots} Attitional arguments to pass to \code{plot.hclust}. -} + The dendrogram is cut into exactly \code{rect} groups and they are marked via the \code{rect.hclust} command. + Set this to zero if you don't want to mark any groups. + \item \code{colbar} The colors of the rectangles that mark the vertex groups via the \code{rect} argument. + \item \code{hang} Where to put the leaf nodes, this corresponds to the \code{hang} argument of \code{plot.hclust}. + \item \code{ann} Whether to annotate the plot, the \code{ann} argument of \code{plot.hclust}. + \item \code{main} The main title of the plot, the \code{main} argument of \code{plot.hclust}. + \item \code{sub} The sub-title of the plot, the \code{sub} argument of \code{plot.hclust}. + \item \code{xlab} The label on the horizontal axis, passed to \code{plot.hclust}. + \item \code{ylab} The label on the vertical axis, passed to \code{plot.hclust}. + \item \code{dots} Attitional arguments to pass to \code{plot.hclust}. + } The syntax for \code{plot.dendrogram} (\code{mode="dendrogram"}): \preformatted{ diff --git a/man/plot_dendrogram.igraphHRG.Rd b/man/plot_dendrogram.igraphHRG.Rd index 32015cc06cf..d0e2d28d208 100644 --- a/man/plot_dendrogram.igraphHRG.Rd +++ b/man/plot_dendrogram.igraphHRG.Rd @@ -10,8 +10,8 @@ \item{x}{An \code{igraphHRG}, a hierarchical random graph, as returned by the \code{\link[=fit_hrg]{fit_hrg()}} function.} \item{mode}{Which dendrogram plotting function to use. -See details below. -The default \code{NULL} uses the \code{dend.plot.type} igraph option.} + See details below. + The default \code{NULL} uses the \code{dend.plot.type} igraph option.} \item{\dots}{Additional arguments to supply to the dendrogram plotting function.} } @@ -24,27 +24,27 @@ Plot a hierarchical random graph as a dendrogram. } \details{ \code{plot_dendrogram()} supports three different plotting functions, selected via the \code{mode} argument. -By default the plotting function is taken from the \code{dend.plot.type} igraph option, and it has for possible values: + By default the plotting function is taken from the \code{dend.plot.type} igraph option, and it has for possible values: \itemize{ \item \code{auto} Choose automatically between the plotting functions. -As \code{plot.phylo} is the most sophisticated, that is choosen, whenever the \code{ape} package is available. -Otherwise \code{plot.hclust} is used. -\item \code{phylo} Use \code{plot.phylo} from the \code{ape} package. -\item \code{hclust} Use \code{plot.hclust} from the \code{stats} package. -\item \code{dendrogram} Use \code{plot.dendrogram} from the \code{stats} package. } + As \code{plot.phylo} is the most sophisticated, that is choosen, whenever the \code{ape} package is available. + Otherwise \code{plot.hclust} is used. + \item \code{phylo} Use \code{plot.phylo} from the \code{ape} package. + \item \code{hclust} Use \code{plot.hclust} from the \code{stats} package. + \item \code{dendrogram} Use \code{plot.dendrogram} from the \code{stats} package. } The different plotting functions take different sets of arguments. -When using \code{plot.phylo} (\code{mode="phylo"}), we have the following syntax: + When using \code{plot.phylo} (\code{mode="phylo"}), we have the following syntax: \preformatted{ plot_dendrogram(x, mode="phylo", colbar = rainbow(11, start=0.7, end=0.1), edge.color = NULL, use.edge.length = FALSE, \dots) } The extra arguments not documented above: \itemize{ \item \code{colbar} Color bar for the edges. -\item \code{edge.color} Edge colors. If \code{NULL}, then the + \item \code{edge.color} Edge colors. If \code{NULL}, then the \code{colbar} argument is used. -\item \code{use.edge.length} Passed to \code{plot.phylo}. -\item \code{dots} Attitional arguments to pass to \code{plot.phylo}. -} + \item \code{use.edge.length} Passed to \code{plot.phylo}. + \item \code{dots} Attitional arguments to pass to \code{plot.phylo}. + } The syntax for \code{plot.hclust} (\code{mode="hclust"}): \preformatted{ plot_dendrogram(x, mode="hclust", rect = 0, colbar = rainbow(rect), @@ -52,17 +52,17 @@ The syntax for \code{plot.hclust} (\code{mode="hclust"}): \preformatted{ ylab = "", \dots) } The extra arguments not documented above: \itemize{ \item \code{rect} A numeric scalar, the number of groups to mark on the dendrogram. -The dendrogram is cut into exactly \code{rect} groups and they are marked via the \code{rect.hclust} command. -Set this to zero if you don't want to mark any groups. -\item \code{colbar} The colors of the rectangles that mark the vertex groups via the \code{rect} argument. -\item \code{hang} Where to put the leaf nodes, this corresponds to the \code{hang} argument of \code{plot.hclust}. -\item \code{ann} Whether to annotate the plot, the \code{ann} argument of \code{plot.hclust}. -\item \code{main} The main title of the plot, the \code{main} argument of \code{plot.hclust}. -\item \code{sub} The sub-title of the plot, the \code{sub} argument of \code{plot.hclust}. -\item \code{xlab} The label on the horizontal axis, passed to \code{plot.hclust}. -\item \code{ylab} The label on the vertical axis, passed to \code{plot.hclust}. -\item \code{dots} Attitional arguments to pass to \code{plot.hclust}. -} + The dendrogram is cut into exactly \code{rect} groups and they are marked via the \code{rect.hclust} command. + Set this to zero if you don't want to mark any groups. + \item \code{colbar} The colors of the rectangles that mark the vertex groups via the \code{rect} argument. + \item \code{hang} Where to put the leaf nodes, this corresponds to the \code{hang} argument of \code{plot.hclust}. + \item \code{ann} Whether to annotate the plot, the \code{ann} argument of \code{plot.hclust}. + \item \code{main} The main title of the plot, the \code{main} argument of \code{plot.hclust}. + \item \code{sub} The sub-title of the plot, the \code{sub} argument of \code{plot.hclust}. + \item \code{xlab} The label on the horizontal axis, passed to \code{plot.hclust}. + \item \code{ylab} The label on the vertical axis, passed to \code{plot.hclust}. + \item \code{dots} Attitional arguments to pass to \code{plot.hclust}. + } The syntax for \code{plot.dendrogram} (\code{mode="dendrogram"}): \preformatted{ diff --git a/man/plus-.igraph.Rd b/man/plus-.igraph.Rd index 9c36681ea5a..a376abaa99c 100644 --- a/man/plus-.igraph.Rd +++ b/man/plus-.igraph.Rd @@ -16,7 +16,7 @@ Add vertices, edges or another graph to a graph } \details{ The plus operator can be used to add vertices or edges to graph. -The actual operation that is performed depends on the type of the right hand side argument. + The actual operation that is performed depends on the type of the right hand side argument. \itemize{ \item If is is another igraph graph object and they are both named graphs, then the union of the two graphs are calculated, @@ -30,8 +30,8 @@ are added to the graph. the names of the vertices to add to the graph. \item If it is an object created with the \code{\link[=vertex]{vertex()}} or \code{\link[=vertices]{vertices()}} function, then new vertices are added to the graph. -This form is appropriate when one wants to add some vertex attributes as well. -The operands of the \code{vertices()} function specifies the number of vertices to add and their attributes as well. + This form is appropriate when one wants to add some vertex attributes as well. + The operands of the \code{vertices()} function specifies the number of vertices to add and their attributes as well. The unnamed arguments of \code{vertices()} are concatenated and used as the \sQuote{\code{name}} vertex attribute (i.e. vertex @@ -43,13 +43,13 @@ attributes. Examples: \preformatted{ g <- g + g <- g + vertices("bar2", "foobar2", color=1:2, shape="rectangle")} \code{vertex()} is just an alias to \code{vertices()}, and it is provided for readability. -The user should use it if a single vertex is added to the graph. + The user should use it if a single vertex is added to the graph. \item If it is an object created with the \code{\link[=edge]{edge()}} or \code{\link[=edges]{edges()}} function, then new edges will be added to the graph. -The new edges and possibly their attributes can be specified as the arguments of the \code{edges()} function. + The new edges and possibly their attributes can be specified as the arguments of the \code{edges()} function. The unnamed arguments of \code{edges()} are concatenated and used as vertex IDs of the end points of the new edges. -The named arguments will be added as edge attributes. + The named arguments will be added as edge attributes. Examples: \preformatted{ g <- make_empty_graph() + vertices(letters[1:10]) + @@ -60,12 +60,12 @@ Examples: \preformatted{ g <- make_empty_graph() + See more examples below. \code{edge()} is just an alias to \code{edges()} and it is provided for readability. -The user should use it if a single edge is added to the graph. + The user should use it if a single edge is added to the graph. \item If it is an object created with the \code{\link[=path]{path()}} function, then new edges that form a path are added. -The edges and possibly their attributes are specified as the arguments to the \code{path()} function. -The non-named arguments are concatenated and interpreted as the vertex IDs along the path. -The remaining arguments are added as edge attributes. + The edges and possibly their attributes are specified as the arguments to the \code{path()} function. + The non-named arguments are concatenated and interpreted as the vertex IDs along the path. + The remaining arguments are added as edge attributes. Examples: \preformatted{ g <- make_empty_graph() + vertices(letters[1:10]) g <- g + path("a", "b", "c", "d") diff --git a/man/power.law.fit.Rd b/man/power.law.fit.Rd index cc033df6e5a..8f02e08ee9d 100644 --- a/man/power.law.fit.Rd +++ b/man/power.law.fit.Rd @@ -15,32 +15,32 @@ power.law.fit( } \arguments{ \item{x}{The data to fit, a numeric vector. -For implementation \sQuote{\code{R.mle}} the data must be integer values. -For the \sQuote{\code{plfit}} implementation non-integer values might be present and then a continuous power-law distribution is fitted.} + For implementation \sQuote{\code{R.mle}} the data must be integer values. + For the \sQuote{\code{plfit}} implementation non-integer values might be present and then a continuous power-law distribution is fitted.} \item{xmin}{Numeric scalar, or \code{NULL}. -The lower bound for fitting the power-law. -If \code{NULL}, the smallest value in \code{x} will be used for the \sQuote{\code{R.mle}} implementation, + The lower bound for fitting the power-law. + If \code{NULL}, the smallest value in \code{x} will be used for the \sQuote{\code{R.mle}} implementation, and its value will be automatically determined for the \sQuote{\code{plfit}} implementation. -This argument makes it possible to fit only the tail of the distribution.} + This argument makes it possible to fit only the tail of the distribution.} \item{start}{Numeric scalar. -The initial value of the exponent for the minimizing function, for the \sQuote{\code{R.mle}} implementation. -Usually it is safe to leave this untouched.} + The initial value of the exponent for the minimizing function, for the \sQuote{\code{R.mle}} implementation. + Usually it is safe to leave this untouched.} \item{force.continuous}{Logical. -Whether to force a continuous distribution for the \sQuote{\code{plfit}} implementation, + Whether to force a continuous distribution for the \sQuote{\code{plfit}} implementation, even if the sample vector contains integer values only (by chance). -If this argument is false, + If this argument is false, igraph will assume a continuous distribution if at least one sample is non-integer and assume a discrete distribution otherwise.} \item{implementation}{Character scalar. -Which implementation to use. -See details below.} + Which implementation to use. + See details below.} \item{...}{Additional arguments, passed to the maximum likelihood optimizing function, \code{\link[stats4:mle]{stats4::mle()}}, if the \sQuote{\code{R.mle}} implementation is chosen. -It is ignored by the \sQuote{\code{plfit}} implementation.} + It is ignored by the \sQuote{\code{plfit}} implementation.} } \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/power_centrality.Rd b/man/power_centrality.Rd index 4b9233cf233..58cc69d59cf 100644 --- a/man/power_centrality.Rd +++ b/man/power_centrality.Rd @@ -20,14 +20,14 @@ power_centrality( \item{graph}{the input graph.} \item{nodes}{vertex sequence indicating which vertices are to be included in the calculation. -The default \code{NULL} selects all vertices.} + The default \code{NULL} selects all vertices.} \item{...}{These dots are for future extensions and must be empty.} \item{loops}{Logical indicating whether or not the diagonal should be treated as valid data. -Set this true if and only + Set this true if and only if the data can contain loops. -\code{loops} is \code{FALSE} by default.} + \code{loops} is \code{FALSE} by default.} \item{exponent}{exponent (decay rate) for the Bonacich power centrality score; can be negative} @@ -36,17 +36,17 @@ if the data can contain loops. \item{tol}{tolerance for near-singularities during matrix inversion (see \code{\link[Matrix:solve]{Matrix::solve()}})} \item{sparse}{Logical, whether to use sparse matrices for the calculation. -The \sQuote{Matrix} package is required for sparse matrix support} + The \sQuote{Matrix} package is required for sparse matrix support} \item{weights}{One of the following: \itemize{ \item \code{NULL} (default): use the \code{weight} edge attribute if the graph has one, otherwise return a traditional (unweighted) adjacency matrix. -\item \code{NA}: explicitly unweighted, ignoring any \code{weight} edge attribute. -\item A numeric or logical vector of length \code{\link[=ecount]{ecount()}}: use these values directly as edge weights. -\item A character scalar: the name of an edge attribute whose values are used as weights. -The attribute must be numeric or logical. -} + \item \code{NA}: explicitly unweighted, ignoring any \code{weight} edge attribute. + \item A numeric or logical vector of length \code{\link[=ecount]{ecount()}}: use these values directly as edge weights. + \item A character scalar: the name of an edge attribute whose values are used as weights. + The attribute must be numeric or logical. + } If multiple edges share endpoints, the value of an arbitrarily chosen edge is included in the matrix.} } \value{ @@ -54,49 +54,49 @@ A vector, containing the centrality scores. } \description{ \code{power_centrality()} takes a graph (\code{dat}) and returns the Boncich power centralities of positions (selected by \code{nodes}). -The decay rate for power contributions is specified by \code{exponent} (1 by default). + The decay rate for power contributions is specified by \code{exponent} (1 by default). } \details{ Bonacich's power centrality measure is defined by \eqn{C_{BP}\left(\alpha,\beta\right)=\alpha\left(\mathbf{I}-\beta\mathbf{A}\right)^{-1}\mathbf{A}\mathbf{1}}{C_BP(alpha,beta)=alpha (I-beta A)^-1 A 1}, where \eqn{\beta}{beta} is an attenuation parameter (set here by \code{exponent}) and \eqn{\mathbf{A}}{A} is the graph adjacency matrix. -(The coefficient \eqn{\alpha}{alpha} acts as a scaling parameter, + (The coefficient \eqn{\alpha}{alpha} acts as a scaling parameter, and is set here (following Bonacich (1987)) such that the sum of squared scores is equal to the number of vertices. -This allows 1 to be used as a reference value for the ``middle'' of the centrality range.) -When \eqn{\beta \rightarrow }{beta->1/lambda_A1}\eqn{ + This allows 1 to be used as a reference value for the ``middle'' of the centrality range.) + When \eqn{\beta \rightarrow }{beta->1/lambda_A1}\eqn{ 1/\lambda_{\mathbf{A}1}}{beta->1/lambda_A1} (the reciprocal of the largest eigenvalue of \eqn{\mathbf{A}}{A}), this is to within a constant multiple of the familiar eigenvector centrality score; for other values of \eqn{\beta}, the behavior of the measure is quite different. -In particular, + In particular, \eqn{\beta} gives positive and negative weight to even and odd walks, respectively, as can be seen from the series expansion \eqn{C_{BP}\left(\alpha,\beta\right)=\alpha \sum_{k=0}^\infty \beta^k }{C_BP(alpha,beta) = alpha sum( beta^k A^(k+1) 1, k in 0..infinity )}\eqn{ \mathbf{A}^{k+1} \mathbf{1}}{C_BP(alpha,beta) = alpha sum( beta^k A^(k+1) 1, k in 0..infinity )} which converges so long as \eqn{|\beta| }{|beta|<1/lambda_A1}\eqn{ < 1/\lambda_{\mathbf{A}1}}{|beta|<1/lambda_A1}. -The magnitude of \eqn{\beta}{beta} controls the influence of distant actors on ego's centrality score, + The magnitude of \eqn{\beta}{beta} controls the influence of distant actors on ego's centrality score, with larger magnitudes indicating slower rates of decay. -(High rates, hence, imply a greater sensitivity to edge effects.) + (High rates, hence, imply a greater sensitivity to edge effects.) Interpretively, the Bonacich power measure corresponds to the notion that the power of a vertex is recursively defined by the sum of the power of its alters. -The nature of the recursion involved is then controlled by the power exponent: + The nature of the recursion involved is then controlled by the power exponent: positive values imply that vertices become more powerful as their alters become more powerful (as occurs in cooperative relations), while negative values imply that vertices become more powerful only as their alters become \emph{weaker} (as occurs in competitive or antagonistic relations). -The magnitude of the exponent indicates the tendency of the effect to decay across long walks; + The magnitude of the exponent indicates the tendency of the effect to decay across long walks; higher magnitudes imply slower decay. -One interesting feature of this measure is its relative instability to changes in exponent magnitude (particularly in the negative case). -If your theory motivates use of this measure, + One interesting feature of this measure is its relative instability to changes in exponent magnitude (particularly in the negative case). + If your theory motivates use of this measure, you should be very careful to choose a decay parameter on a non-ad hoc basis. For directed networks, the Bonacich power measure can be understood as similar to status in the network where higher status nodes have more edges that point from them to others with status. -Node A's centrality depends on the centrality of all the nodes that A points toward, + Node A's centrality depends on the centrality of all the nodes that A points toward, and their centrality depends on the nodes they point toward, etc. Note, this means that a node with an out-degree of 0 will have a Bonacich power centrality of 0 as they do not point towards anyone. -When using this with directed network it is important to think about the edge direction and what it represents. + When using this with directed network it is important to think about the edge direction and what it represents. } \note{ This function was ported (i.e. copied) from the SNA package. @@ -104,7 +104,7 @@ This function was ported (i.e. copied) from the SNA package. \section{Warning }{ Singular adjacency matrices cause no end of headaches for this algorithm; thus, the routine may fail in certain cases. -This will be fixed when we get a better algorithm. + This will be fixed when we get a better algorithm. } \section{Related documentation in the C library}{ @@ -145,7 +145,7 @@ Status Scores and Clique Identification.'' \emph{Journal of Mathematical Sociology}, 2, 113-120. Bonacich, P. (1987). ``Power and Centrality: A Family of Measures.'' -\emph{American Journal of Sociology}, 92, 1170-1182. + \emph{American Journal of Sociology}, 92, 1170-1182. } \seealso{ \code{\link[=eigen_centrality]{eigen_centrality()}} and \code{\link[=alpha_centrality]{alpha_centrality()}} diff --git a/man/predict_edges.Rd b/man/predict_edges.Rd index c46fef9be2a..0079f1c1986 100644 --- a/man/predict_edges.Rd +++ b/man/predict_edges.Rd @@ -15,10 +15,10 @@ predict_edges( } \arguments{ \item{graph}{The graph to fit the model to. -Edge directions are ignored in directed graphs.} + Edge directions are ignored in directed graphs.} \item{hrg}{A hierarchical random graph model, in the form of an \code{igraphHRG} object. -\code{predict_edges()} allow this to be \code{NULL} as well, then a HRG is fitted to the graph first, from a random starting point.} + \code{predict_edges()} allow this to be \code{NULL} as well, then a HRG is fitted to the graph first, from a random starting point.} \item{...}{These dots are for future extensions and must be empty.} @@ -27,27 +27,27 @@ Edge directions are ignored in directed graphs.} \item{num.samples}{Number of samples to use for consensus generation or missing edge prediction.} \item{num.bins}{Number of bins for the edge probabilities. -Give a higher number for a more accurate prediction.} + Give a higher number for a more accurate prediction.} } \value{ A list with entries: \describe{ \item{edges}{ The predicted edges, in a two-column matrix of vertex IDs. -} + } \item{prob}{ Probabilities of these edges, according to the fitted model. -} + } \item{hrg}{ The (supplied or fitted) hierarchical random graph model. -} + } } } \description{ \code{predict_edges()} uses a hierarchical random graph model to predict missing edges from a network. -This is done by sampling hierarchical models around the optimum model, proportionally to their likelihood. -The MCMC sampling is stated from \code{hrg()}, if it is given and the \code{start} argument is set to \code{TRUE}. -Otherwise a HRG is fitted to the graph first. + This is done by sampling hierarchical models around the optimum model, proportionally to their likelihood. + The MCMC sampling is stated from \code{hrg()}, if it is given and the \code{start} argument is set to \code{TRUE}. + Otherwise a HRG is fitted to the graph first. } \section{Related documentation in the C library}{ \href{https://igraph.org/c/html/0.10.17/igraph-HRG.html#igraph_hrg_predict}{\code{hrg_predict()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}} diff --git a/man/preference.game.Rd b/man/preference.game.Rd index 70c948a38cd..cd0c373773f 100644 --- a/man/preference.game.Rd +++ b/man/preference.game.Rd @@ -20,16 +20,16 @@ preference.game( \item{types}{The number of different vertex types.} \item{type.dist}{The distribution of the vertex types, a numeric vector of length \sQuote{types} containing non-negative numbers. -The vector will be normed to obtain probabilities. -The default \code{NULL} gives a uniform distribution.} + The vector will be normed to obtain probabilities. + The default \code{NULL} gives a uniform distribution.} \item{fixed.sizes}{Fix the number of vertices with a given vertex type label. -The \code{type.dist} argument gives the group sizes (i.e. number of vertices with the different labels) in this case.} + The \code{type.dist} argument gives the group sizes (i.e. number of vertices with the different labels) in this case.} \item{pref.matrix}{A square matrix giving the preferences of the vertex types. -The matrix has \sQuote{types} rows and columns. -When generating an undirected graph, it must be symmetric. -The default \code{NULL} sets all preferences to one.} + The matrix has \sQuote{types} rows and columns. + When generating an undirected graph, it must be symmetric. + The default \code{NULL} sets all preferences to one.} \item{directed}{Logical, whether to create a directed graph.} diff --git a/man/print.igraph.Rd b/man/print.igraph.Rd index 0db4fd0b64c..6d519f6e3ad 100644 --- a/man/print.igraph.Rd +++ b/man/print.igraph.Rd @@ -25,26 +25,26 @@ \item{x}{The graph to print.} \item{full}{Logical, whether to print the graph structure itself as well. -The default \code{NULL} uses the \code{print.full} igraph option.} + The default \code{NULL} uses the \code{print.full} igraph option.} \item{graph.attributes}{Logical, whether to print graph attributes. -The default \code{NULL} uses the \code{print.graph.attributes} igraph option.} + The default \code{NULL} uses the \code{print.graph.attributes} igraph option.} \item{vertex.attributes}{Logical, whether to print vertex attributes. -The default \code{NULL} uses the \code{print.vertex.attributes} igraph option.} + The default \code{NULL} uses the \code{print.vertex.attributes} igraph option.} \item{edge.attributes}{Logical, whether to print edge attributes. -The default \code{NULL} uses the \code{print.edge.attributes} igraph option.} + The default \code{NULL} uses the \code{print.edge.attributes} igraph option.} \item{names}{Logical, whether to print symbolic vertex names (i.e. the \code{name} vertex attribute) or vertex IDs.} \item{max.lines}{The maximum number of lines to use. -The rest of the output will be truncated. -If not given, the \code{auto.print.lines} igraph option applies; \code{NULL} prints all lines.} + The rest of the output will be truncated. + If not given, the \code{auto.print.lines} igraph option applies; \code{NULL} prints all lines.} \item{id}{Whether to print the graph ID. -The default \code{NULL} uses the \code{print.id} igraph option.} + The default \code{NULL} uses the \code{print.id} igraph option.} \item{\dots}{Additional agruments.} @@ -62,22 +62,22 @@ These functions attempt to print a graph to the terminal in a human readable for \code{print_all()} prints the same information, and also lists the edges, and optionally graph, vertex and/or edge attributes. \code{print.igraph()} behaves either as \code{summary.igraph} or \code{print_all()} depending on the \code{full} argument. -See also the \sQuote{print.full} igraph option and \code{\link[=igraph_opt]{igraph_opt()}}. + See also the \sQuote{print.full} igraph option and \code{\link[=igraph_opt]{igraph_opt()}}. The graph summary printed by \code{summary.igraph} (and \code{print.igraph()} and \code{print_all()}) consists of one or more lines. -The first line contains the basic properties of the graph, and the rest contains its attributes. -Here is an example, a small star graph with weighted directed edges and named + The first line contains the basic properties of the graph, and the rest contains its attributes. + Here is an example, a small star graph with weighted directed edges and named vertices: \preformatted{ IGRAPH badcafe DNW- 10 9 -- In-star + attr: name (g/c), mode (g/c), center (g/n), name (v/c), weight (e/n) } The first line always starts with \code{IGRAPH}, showing you that the object is an igraph graph. -Then a seven character code is printed, this the first seven characters of the unique ID of the graph. -See \code{\link[=graph_id]{graph_id()}} for more. -Then a four letter long code string is printed. -The first letter distinguishes between directed (\sQuote{\code{D}}) and undirected (\sQuote{\code{U}}) graphs. -The second letter is \sQuote{\code{N}} for named graphs, i.e. graphs with the \code{name} vertex attribute set. -The third letter is \sQuote{\code{W}} for weighted graphs, i.e. graphs with the \code{weight} edge attribute set. -The fourth letter is \sQuote{\code{B}} for bipartite graphs, i.e. for graphs with the \code{type} vertex attribute set. + Then a seven character code is printed, this the first seven characters of the unique ID of the graph. + See \code{\link[=graph_id]{graph_id()}} for more. + Then a four letter long code string is printed. + The first letter distinguishes between directed (\sQuote{\code{D}}) and undirected (\sQuote{\code{U}}) graphs. + The second letter is \sQuote{\code{N}} for named graphs, i.e. graphs with the \code{name} vertex attribute set. + The third letter is \sQuote{\code{W}} for weighted graphs, i.e. graphs with the \code{weight} edge attribute set. + The fourth letter is \sQuote{\code{B}} for bipartite graphs, i.e. for graphs with the \code{type} vertex attribute set. This is followed by the number of vertices and edges, then two dashes. @@ -85,7 +85,7 @@ Finally, after two dashes, the name of the graph is printed, if it has one, i.e. if the \code{name} graph attribute is set. From the second line, the attributes of the graph are listed, separated by a comma. -After the attribute names, the kind of the attribute -- graph (\sQuote{\code{g}}), vertex (\sQuote{\code{v}}) or edge (\sQuote{\code{e}}) -- is denoted, + After the attribute names, the kind of the attribute -- graph (\sQuote{\code{g}}), vertex (\sQuote{\code{v}}) or edge (\sQuote{\code{e}}) -- is denoted, and the type of the attribute as well, character (\sQuote{\code{c}}), numeric (\sQuote{\code{n}}), logical (\sQuote{\code{l}}), or other (\sQuote{\code{x}}). As of igraph 0.4 \code{print_all()} and \code{print.igraph()} use the \code{max.print} option, see \code{\link[base:options]{base::options()}} for details. @@ -93,8 +93,8 @@ As of igraph 0.4 \code{print_all()} and \code{print.igraph()} use the \code{max. As of igraph 1.1.1, the \code{str.igraph} function is defunct, use \code{print_all()}. Output style is controlled by the \code{print.style} igraph option. -The default \code{"cli"} produces cli-styled output with section rules, typed attribute listings and Unicode arrows for edges. -Set \code{igraph_options(print.style = "classic")} for the historical \verb{IGRAPH ... DNW-} header relied on by parsers and tutorials. + The default \code{"cli"} produces cli-styled output with section rules, typed attribute listings and Unicode arrows for edges. + Set \code{igraph_options(print.style = "classic")} for the historical \verb{IGRAPH ... DNW-} header relied on by parsers and tutorials. } \section{Related documentation in the C library}{ \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_degree}{\code{degree()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_is_directed}{\code{is_directed()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_edges}{\code{edges()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_ecount}{\code{ecount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_get_eids}{\code{get_eids()}} diff --git a/man/print.igraph.es.Rd b/man/print.igraph.es.Rd index 42369f19a27..e42bacc760c 100644 --- a/man/print.igraph.es.Rd +++ b/man/print.igraph.es.Rd @@ -12,7 +12,7 @@ \item{full}{Whether to show the full sequence, or truncate the output to the screen size.} \item{id}{Whether to print the graph ID. -The default \code{NULL} uses the \code{print.id} igraph option.} + The default \code{NULL} uses the \code{print.id} igraph option.} \item{...}{Currently ignored.} } @@ -21,7 +21,7 @@ The edge sequence, invisibly. } \description{ For long edge sequences, the printing is truncated to fit to the screen. -Use \code{\link[=print]{print()}} explicitly and the \code{full} argument to see the full sequence. + Use \code{\link[=print]{print()}} explicitly and the \code{full} argument to see the full sequence. } \details{ Edge sequences created with the double bracket operator are printed differently, diff --git a/man/print.igraph.vs.Rd b/man/print.igraph.vs.Rd index 231e3bfd7d0..dd431b51d4a 100644 --- a/man/print.igraph.vs.Rd +++ b/man/print.igraph.vs.Rd @@ -12,7 +12,7 @@ \item{full}{Whether to show the full sequence, or truncate the output to the screen size.} \item{id}{Whether to print the graph ID. -The default \code{NULL} uses the \code{print.id} igraph option.} + The default \code{NULL} uses the \code{print.id} igraph option.} \item{...}{These arguments are currently ignored.} } @@ -21,7 +21,7 @@ The vertex sequence, invisibly. } \description{ For long vertex sequences, the printing is truncated to fit to the screen. -Use \code{\link[=print]{print()}} explicitly and the \code{full} argument to see the full sequence. + Use \code{\link[=print]{print()}} explicitly and the \code{full} argument to see the full sequence. } \details{ Vertex sequence created with the double bracket operator are printed differently, diff --git a/man/print.igraphHRG.Rd b/man/print.igraphHRG.Rd index 7fd048d876f..986ae4ca12f 100644 --- a/man/print.igraphHRG.Rd +++ b/man/print.igraphHRG.Rd @@ -21,8 +21,8 @@ The hierarchical random graph model itself, invisibly. \description{ \code{igraphHRG} objects can be printed to the screen in two forms: as a tree or as a list, depending on the \code{type} argument of the print function. -By default the \code{auto} type is used, which selects \code{tree} for small graphs and \code{simple} (=list) for bigger ones. -The \code{tree} format looks like + By default the \code{auto} type is used, which selects \code{tree} for small graphs and \code{simple} (=list) for bigger ones. + The \code{tree} format looks like this: \preformatted{Hierarchical random graph, at level 3: g1 p= 0 '- g15 p=0.33 1 @@ -31,10 +31,10 @@ g1 p= 0 '- g16 p= 0.2 20 14 17 19 11 15 16 13 '- g5 p= 0 12 18 } This is a graph with 20 vertices, and the top three levels of the fitted hierarchical random graph are printed. -The root node of the HRG is always vertex group #1 (\sQuote{\code{g1}} in the the printout). -Vertex pairs in the left subtree of \code{g1} connect to vertices in the right subtree with probability zero, according to the fitted model. -\code{g1} has two subgroups, \code{g15} and \code{g8}. -\code{g15} has a subgroup of a single vertex (vertex 1), and another larger subgroup that contains vertices 6, 3, etc. on lower levels, + The root node of the HRG is always vertex group #1 (\sQuote{\code{g1}} in the the printout). + Vertex pairs in the left subtree of \code{g1} connect to vertices in the right subtree with probability zero, according to the fitted model. + \code{g1} has two subgroups, \code{g15} and \code{g8}. + \code{g15} has a subgroup of a single vertex (vertex 1), and another larger subgroup that contains vertices 6, 3, etc. on lower levels, etc. The \code{plain} printing is simpler and faster to produce, but less visual: \preformatted{Hierarchical random graph: g1 p=0.0 -> g12 g10 g2 p=1.0 -> 7 10 g3 p=1.0 -> g18 14 diff --git a/man/printer_callback.Rd b/man/printer_callback.Rd index 3e9b39d3dc1..42b3306c651 100644 --- a/man/printer_callback.Rd +++ b/man/printer_callback.Rd @@ -11,7 +11,7 @@ printer_callback(fun) } \description{ A printer callback function is a function can performs the actual printing. -It has a number of subcommands, that are called by + It has a number of subcommands, that are called by the \code{printer} package, in a form \preformatted{ printer_callback("subcommand", argument1, argument2, ...) } See the examples below. @@ -22,8 +22,8 @@ The subcommands: \describe{ \item{\code{length}}{ The length of the data to print, the number of items, in natural units. -E.g. for a list of objects, it is the number of objects. -} + E.g. for a list of objects, it is the number of objects. + } \item{\code{min_width}}{ TODO } @@ -32,7 +32,7 @@ Width of one item, if \code{no} items will be printed. TODO } \item{\code{print}}{ Argument: \code{no}. Do the actual printing, print \code{no} items. -} + } \item{\code{done}}{ TODO } diff --git a/man/r_pal.Rd b/man/r_pal.Rd index 6bc8cc2d6bb..41d98b4eb5c 100644 --- a/man/r_pal.Rd +++ b/man/r_pal.Rd @@ -14,7 +14,7 @@ A character vector of color names. } \description{ This is the default R palette, to be able to reproduce the colors of older igraph versions. -Its colors are appropriate for categories, but they are not very attractive. + Its colors are appropriate for categories, but they are not very attractive. } \seealso{ Other palettes: diff --git a/man/radius.Rd b/man/radius.Rd index 44bcaee9879..ec536688e03 100644 --- a/man/radius.Rd +++ b/man/radius.Rd @@ -12,29 +12,29 @@ radius(graph, ..., weights = NULL, mode = c("all", "out", "in", "total")) \item{...}{These dots are for future extensions and must be empty.} \item{weights}{Possibly a numeric vector giving edge weights. -If this is \code{NULL} and the graph has a \code{weight} edge attribute, then the attribute is used. -If this is \code{NA} then no weights are used (even if the graph has a \code{weight} attribute). -In a weighted graph, the length of a path is the sum of the weights of its constituent edges.} + If this is \code{NULL} and the graph has a \code{weight} edge attribute, then the attribute is used. + If this is \code{NA} then no weights are used (even if the graph has a \code{weight} attribute). + In a weighted graph, the length of a path is the sum of the weights of its constituent edges.} \item{mode}{Character constant, gives whether the shortest paths to or from the given vertices should be calculated for directed graphs. -If \code{out} then the shortest paths \emph{from} the vertex, if \verb{in} then \emph{to} it will be considered. -If \code{all}, the default, then the graph is treated as undirected, i.e. edge directions are not taken into account. -This argument is ignored for undirected graphs.} + If \code{out} then the shortest paths \emph{from} the vertex, if \verb{in} then \emph{to} it will be considered. + If \code{all}, the default, then the graph is treated as undirected, i.e. edge directions are not taken into account. + This argument is ignored for undirected graphs.} } \value{ A numeric scalar, the radius of the graph. } \description{ The eccentricity of a vertex is its distance from the farthest other node in the graph. -The smallest eccentricity in a graph is called its radius. + The smallest eccentricity in a graph is called its radius. } \details{ The eccentricity of a vertex is calculated by measuring the shortest distance from (or to) the vertex, to (or from) all vertices in the graph, and taking the maximum. This implementation ignores vertex pairs that are in different components. -Isolated vertices have eccentricity zero. + Isolated vertices have eccentricity zero. } \section{Related documentation in the C library}{ \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_radius_dijkstra}{\code{radius_dijkstra()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_edges}{\code{edges()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_get_eids}{\code{get_eids()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_ecount}{\code{ecount()}} diff --git a/man/random_walk.Rd b/man/random_walk.Rd index c8f0e17836b..a878dc4aeae 100644 --- a/man/random_walk.Rd +++ b/man/random_walk.Rd @@ -35,36 +35,36 @@ random_edge_walk( \item{...}{These dots are for future extensions and must be empty.} \item{weights}{The edge weights. -Larger edge weights increase the probability that an edge is selected by the random walker. -In other words, larger edge weights correspond to stronger connections. -The \sQuote{weight} edge attribute is used if present. -Supply \sQuote{\code{NA}} here if you want to ignore the \sQuote{weight} edge attribute.} + Larger edge weights increase the probability that an edge is selected by the random walker. + In other words, larger edge weights correspond to stronger connections. + The \sQuote{weight} edge attribute is used if present. + Supply \sQuote{\code{NA}} here if you want to ignore the \sQuote{weight} edge attribute.} \item{mode}{How to follow directed edges. -\code{"out"} steps along the edge direction, \code{"in"} is opposite to that. -\code{"all"} ignores edge directions. -This argument is ignored for undirected graphs.} + \code{"out"} steps along the edge direction, \code{"in"} is opposite to that. + \code{"all"} ignores edge directions. + This argument is ignored for undirected graphs.} \item{stuck}{What to do if the random walk gets stuck. -\code{"return"} returns the partial walk, \code{"error"} raises an error.} + \code{"return"} returns the partial walk, \code{"error"} raises an error.} } \value{ For \code{random_walk()}, a vertex sequence of length \code{steps + 1} containing the vertices along the walk, starting with \code{start}. -For \code{random_edge_walk()}, an edge sequence of length \code{steps} containing the edges along the walk. + For \code{random_edge_walk()}, an edge sequence of length \code{steps} containing the edges along the walk. } \description{ \code{random_walk()} performs a random walk on the graph and returns the vertices that the random walk passed through. -\code{random_edge_walk()} is the same but returns the edges that that random walk passed through. + \code{random_edge_walk()} is the same but returns the edges that that random walk passed through. } \details{ Do a random walk. -From the given start vertex, take the given number of steps, choosing an edge from the actual vertex uniformly randomly. -Edge directions are observed in directed graphs (see the \code{mode} argument as well). -Multiple and loop edges are also observed. + From the given start vertex, take the given number of steps, choosing an edge from the actual vertex uniformly randomly. + Edge directions are observed in directed graphs (see the \code{mode} argument as well). + Multiple and loop edges are also observed. For igraph < 1.6.0, \code{random_walk()} counted steps differently, and returned a sequence of length \code{steps} instead of \code{steps + 1}. -This has changed to improve consistency with the underlying C library. + This has changed to improve consistency with the underlying C library. } \section{Related documentation in the C library}{ \href{https://igraph.org/c/html/0.10.17/igraph-Visitors.html#igraph_random_walk}{\code{random_walk()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_edges}{\code{edges()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_ecount}{\code{ecount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_get_eids}{\code{get_eids()}} diff --git a/man/read.graph.Rd b/man/read.graph.Rd index 98a35cd070d..429ad8b2901 100644 --- a/man/read.graph.Rd +++ b/man/read.graph.Rd @@ -13,12 +13,12 @@ read.graph( } \arguments{ \item{file}{The connection to read from. -This can be a local file, or a \code{http} or \code{ftp} connection. -It can also be a character string with the file name or URI.} + This can be a local file, or a \code{http} or \code{ftp} connection. + It can also be a character string with the file name or URI.} \item{format}{Character constant giving the file format. -Right now \code{edgelist}, \code{pajek}, \code{ncol}, \code{lgl}, \code{graphml}, \code{dimacs}, \code{graphdb}, \code{gml} and \code{dl} are supported, the default is \code{edgelist}. -As of igraph 0.4 this argument is case insensitive.} + Right now \code{edgelist}, \code{pajek}, \code{ncol}, \code{lgl}, \code{graphml}, \code{dimacs}, \code{graphdb}, \code{gml} and \code{dl} are supported, the default is \code{edgelist}. + As of igraph 0.4 this argument is case insensitive.} \item{...}{Additional arguments, see below.} } diff --git a/man/read_graph.Rd b/man/read_graph.Rd index 35e1aff9283..4825fca0964 100644 --- a/man/read_graph.Rd +++ b/man/read_graph.Rd @@ -19,12 +19,12 @@ read_graph( } \arguments{ \item{file}{The connection to read from. -This can be a local file, or a \code{http} or \code{ftp} connection. -It can also be a character string with the file name or URI.} + This can be a local file, or a \code{http} or \code{ftp} connection. + It can also be a character string with the file name or URI.} \item{format}{Character constant giving the file format. -Right now \code{edgelist}, \code{pajek}, \code{ncol}, \code{lgl}, \code{graphml}, \code{dimacs}, \code{graphdb}, \code{gml} and \code{dl} are supported, the default is \code{edgelist}. -As of igraph 0.4 this argument is case insensitive.} + Right now \code{edgelist}, \code{pajek}, \code{ncol}, \code{lgl}, \code{graphml}, \code{dimacs}, \code{graphdb}, \code{gml} and \code{dl} are supported, the default is \code{edgelist}. + As of igraph 0.4 this argument is case insensitive.} \item{\dots}{Additional arguments, see below.} } @@ -33,36 +33,36 @@ A graph object. } \description{ The \code{read_graph()} function is able to read graphs in various representations from a file, or from a http connection. -Various formats are supported. + Various formats are supported. } \details{ The \code{read_graph()} function may have additional arguments depending on the file format (the \code{format} argument). -See the details separately for each file format, below. + See the details separately for each file format, below. } \section{Edge list format}{ This format is a simple text file with numeric vertex IDs defining the edges. -There is no need to have newline characters between the edges, a simple space will also do. -Vertex IDs contained in the file are assumed to start at zero. + There is no need to have newline characters between the edges, a simple space will also do. + Vertex IDs contained in the file are assumed to start at zero. Additional arguments: \describe{ \item{n}{ The number of vertices in the graph. -If it is smaller than or equal to the largest integer in the file, then it is ignored; + If it is smaller than or equal to the largest integer in the file, then it is ignored; so it is safe to set it to zero (the default). -} + } \item{directed}{ Logical scalar, whether to create a directed graph. -The default value is \code{TRUE}. -} + The default value is \code{TRUE}. + } } } \section{Pajek format}{ Currently igraph only supports Pajek network files, with a \code{.net} extension, but not Pajek project files with a \code{.paj} extension. -Only network data is supported; permutations, hierarchies, clusters and vectors are not. + Only network data is supported; permutations, hierarchies, clusters and vectors are not. } \section{NCOL format}{ @@ -71,40 +71,40 @@ Additional arguments: \describe{ \item{predef}{ Names of the vertices in the file. -If \code{character(0)} (the default) is given here + If \code{character(0)} (the default) is given here then vertex IDs will be assigned to vertex names in the order of their appearance in the .ncol file. -If it is not \code{character(0)} and some unknown vertex names are found + If it is not \code{character(0)} and some unknown vertex names are found in the .ncol file then new vertex IDs will be assigned to them. -} + } \item{names}{ Logical value, if \code{TRUE} (the default) the symbolic names of the vertices will be added to the graph as a vertex attribute called “name”. -} + } \item{weights}{ Whether to add the weights of the edges to the graph as an edge attribute called “weight”. -\code{"yes"} adds the weights (even if they are not present in the file, + \code{"yes"} adds the weights (even if they are not present in the file, in this case they are assumed to be zero). -\code{"no"} does not add any edge attribute. -\code{"auto"} (the default) adds the attribute if and only + \code{"no"} does not add any edge attribute. + \code{"auto"} (the default) adds the attribute if and only if there is at least one explicit edge weight in the input file. -} + } \item{directed}{ Whether to create a directed graph (default: \code{FALSE}). -As this format was originally used only for undirected graphs + As this format was originally used only for undirected graphs there is no information in the file about the directedness of the graph. -} + } } } \section{GraphML format}{ GraphML is an XML-based file format for representing various types of graphs. -Currently only the most basic import functionality is implemented in igraph: + Currently only the most basic import functionality is implemented in igraph: it can read GraphML files without nested graphs and hyperedges. -\describe{ + \describe{ \item{index}{Integer, specifies which graph to read from a GraphML file containing multiple graphs. Defaults to 0 for the first graph.} } @@ -120,12 +120,12 @@ called "name". Default is TRUE.} \item{weights}{ Whether to add the weights of the edges to the graph as an edge attribute called “weight”. -\code{"yes"} adds the weights (even if they are not present in the file, + \code{"yes"} adds the weights (even if they are not present in the file, in this case they are assumed to be zero). -\code{"no"} does not add any edge attribute. -\code{"auto"} (the default) adds the attribute if and only + \code{"no"} does not add any edge attribute. + \code{"auto"} (the default) adds the attribute if and only if there is at least one explicit edge weight in the input file. -} + } \item{directed}{Logical, whether to create a directed graph. Default is FALSE.} } } @@ -133,19 +133,19 @@ if there is at least one explicit edge weight in the input file. \section{DIMACS format}{ This is a line-oriented text file (ASCII) format. -The first character of each line defines the type of the line. -If the first character is c the line is a comment line and it is ignored. -There is one problem line (p in the file), it must appear before any node and arc descriptor lines. -The problem line has three fields separated by spaces: the problem type (max or edge), the number of vertices, + The first character of each line defines the type of the line. + If the first character is c the line is a comment line and it is ignored. + There is one problem line (p in the file), it must appear before any node and arc descriptor lines. + The problem line has three fields separated by spaces: the problem type (max or edge), the number of vertices, and number of edges in the graph. -In MAX problems, exactly two node identification lines are expected (n), one for the source, and one for the target vertex. -These have two fields: the ID of the vertex and the type of the vertex, either s ( = source) or t ( = target). -Arc lines start with a and have three fields: the source vertex, the target vertex and the edge capacity. -In EDGE problems, there may be a node line (n) for each node. -It specifies the node index and an integer node label. -Nodes for which no explicit label was specified will use their index as label. -In EDGE problems, each edge is specified as an edge line (e). -\describe{ + In MAX problems, exactly two node identification lines are expected (n), one for the source, and one for the target vertex. + These have two fields: the ID of the vertex and the type of the vertex, either s ( = source) or t ( = target). + Arc lines start with a and have three fields: the source vertex, the target vertex and the edge capacity. + In EDGE problems, there may be a node line (n) for each node. + It specifies the node index and an integer node label. + Nodes for which no explicit label was specified will use their index as label. + In EDGE problems, each edge is specified as an edge line (e). + \describe{ \item{directed}{Logical, whether to create a directed graph. Default is TRUE.} } } @@ -153,13 +153,13 @@ In EDGE problems, each edge is specified as an edge line (e). \section{DL format}{ This is a simple textual file format used by UCINET. -See \url{http://www.analytictech.com/networks/dataentry.htm} for examples. -All the forms described here are supported by igraph. -Vertex names and edge weights are also supported and they are added as attributes. -(If an attribute handler is attached.) -Note the specification does not mention whether the format is case sensitive or not. -For igraph DL files are case sensitive, i.e. Larry and larry are not the same. -\describe{ + See \url{http://www.analytictech.com/networks/dataentry.htm} for examples. + All the forms described here are supported by igraph. + Vertex names and edge weights are also supported and they are added as attributes. + (If an attribute handler is attached.) + Note the specification does not mention whether the format is case sensitive or not. + For igraph DL files are case sensitive, i.e. Larry and larry are not the same. + \describe{ \item{directed}{Logical, whether to create a directed graph. Default is TRUE.} } } @@ -167,13 +167,13 @@ For igraph DL files are case sensitive, i.e. Larry and larry are not the same. \section{GML format}{ GML is a quite general textual format. -For the specifics of the implementation, see the linked documentation of the cClibrary. + For the specifics of the implementation, see the linked documentation of the cClibrary. } \section{GraphDB format}{ This is a binary format, used in the ARG Graph Database for isomorphism testing. -For more information, see \url{https://mivia.unisa.it/datasets/graph-database/arg-database/} + For more information, see \url{https://mivia.unisa.it/datasets/graph-database/arg-database/} \describe{ \item{directed}{Logical, whether to create a directed graph. Default is TRUE.} } diff --git a/man/realize_bipartite_degseq.Rd b/man/realize_bipartite_degseq.Rd index db33dcb5380..de0e3ceee3b 100644 --- a/man/realize_bipartite_degseq.Rd +++ b/man/realize_bipartite_degseq.Rd @@ -20,8 +20,8 @@ realize_bipartite_degseq( \item{...}{These dots are for future extensions and must be empty.} \item{allowed.edge.types}{Character, specifies the types of allowed edges. -\dQuote{simple} allows simple graphs only (no multiple edges). -\dQuote{multiple} allows multiple edges.} + \dQuote{simple} allows simple graphs only (no multiple edges). + \dQuote{multiple} allows multiple edges.} \item{method}{Character, the method for generating the graph; see below.} } @@ -32,19 +32,19 @@ The new graph object. \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#experimental}{\figure{lifecycle-experimental.svg}{options: alt='[Experimental]'}}}{\strong{[Experimental]}} Constructs a bipartite graph from the degree sequences of its partitions, if one exists. -This function uses a Havel-Hakimi style construction algorithm. + This function uses a Havel-Hakimi style construction algorithm. } \details{ The \sQuote{method} argument controls in which order the vertices are selected during the course of the algorithm. The \dQuote{smallest} method selects the vertex with the smallest remaining degree, from either partition. -The result is usually a graph with high negative degree assortativity. -In the undirected case, this method is guaranteed to generate a connected graph, regardless of whether multi-edges are allowed, + The result is usually a graph with high negative degree assortativity. + In the undirected case, this method is guaranteed to generate a connected graph, regardless of whether multi-edges are allowed, provided that a connected realization exists. -This is the default method. + This is the default method. The \dQuote{largest} method selects the vertex with the largest remaining degree. -The result is usually a graph with high positive degree assortativity, and is often disconnected. + The result is usually a graph with high positive degree assortativity, and is often disconnected. The \dQuote{index} method selects the vertices in order of their index. } diff --git a/man/realize_degseq.Rd b/man/realize_degseq.Rd index b4c62dc5f09..13f60328e61 100644 --- a/man/realize_degseq.Rd +++ b/man/realize_degseq.Rd @@ -14,20 +14,20 @@ realize_degseq( } \arguments{ \item{out.deg}{Numeric vector, the sequence of degrees (for undirected graphs) or out-degrees (for directed graphs). -For undirected graphs its sum should be even. -For directed graphs its sum should be the same as the sum of \code{in.deg}.} + For undirected graphs its sum should be even. + For directed graphs its sum should be the same as the sum of \code{in.deg}.} \item{in.deg}{For directed graph, the in-degree sequence. -By default this is \code{NULL} and an undirected graph is created.} + By default this is \code{NULL} and an undirected graph is created.} \item{...}{These dots are for future extensions and must be empty.} \item{allowed.edge.types}{Character, specifies the types of allowed edges. -\dQuote{simple} allows simple graphs only (no loops, no multiple edges). -\dQuote{multiple} allows multiple edges but disallows loop. -\dQuote{loops} allows loop edges but disallows multiple edges (currently unimplemented). -\dQuote{all} allows all types of edges. -The default is \dQuote{simple}.} + \dQuote{simple} allows simple graphs only (no loops, no multiple edges). + \dQuote{multiple} allows multiple edges but disallows loop. + \dQuote{loops} allows loop edges but disallows multiple edges (currently unimplemented). + \dQuote{all} allows all types of edges. + The default is \dQuote{simple}.} \item{method}{Character, the method for generating the graph; see below.} } @@ -36,26 +36,26 @@ The new graph object. } \description{ It is often useful to create a graph with given vertex degrees. -This function creates such a graph in a deterministic manner. + This function creates such a graph in a deterministic manner. } \details{ Simple undirected graphs are constructed using the Havel-Hakimi algorithm (undirected case), or the analogous Kleitman-Wang algorithm (directed case). -These algorithms work by choosing an arbitrary vertex and connecting all its stubs to other vertices. -This step is repeated until all degrees have been connected up. + These algorithms work by choosing an arbitrary vertex and connecting all its stubs to other vertices. + This step is repeated until all degrees have been connected up. The \sQuote{method} argument controls in which order the vertices are selected during the course of the algorithm. The \dQuote{smallest} method selects the vertex with the smallest remaining degree. -The result is usually a graph with high negative degree assortativity. -In the undirected case, this method is guaranteed to generate a connected graph, regardless of whether multi-edges are allowed, + The result is usually a graph with high negative degree assortativity. + In the undirected case, this method is guaranteed to generate a connected graph, regardless of whether multi-edges are allowed, provided that a connected realization exists. -See Horvát and Modes (2021) for details. -In the directed case it tends to generate weakly connected graphs, but this is not guaranteed. -This is the default method. + See Horvát and Modes (2021) for details. + In the directed case it tends to generate weakly connected graphs, but this is not guaranteed. + This is the default method. The \dQuote{largest} method selects the vertex with the largest remaining degree. -The result is usually a graph with high positive degree assortativity, and is often disconnected. + The result is usually a graph with high positive degree assortativity, and is often disconnected. The \dQuote{index} method selects the vertices in order of their index. } @@ -98,16 +98,16 @@ https://eudml.org/doc/19050 S. L. Hakimi, On Realizability of a Set of Integers as Degrees of the Vertices of a Linear Graph, Journal of the SIAM 10, 3 (1962). -\doi{10.1137/0111010} + \doi{10.1137/0111010} D. J. Kleitman and D. L. Wang, Algorithms for Constructing Graphs and Digraphs with Given Valences and Factors, Discrete Mathematics 6, 1 (1973). -\doi{10.1016/0012-365X(73)90037-X} + \doi{10.1016/0012-365X(73)90037-X} Sz. Horvát and C. D. Modes, Connectedness matters: construction and exact random sampling of connected networks (2021). -\doi{10.1088/2632-072X/abced5} + \doi{10.1088/2632-072X/abced5} } \seealso{ \code{\link[=sample_degseq]{sample_degseq()}} for a randomized variant that samples from graphs with the given degree sequence. diff --git a/man/reciprocity.Rd b/man/reciprocity.Rd index f5526a055d6..75e3c30ed14 100644 --- a/man/reciprocity.Rd +++ b/man/reciprocity.Rd @@ -23,17 +23,17 @@ Calculates the reciprocity of a directed graph. } \details{ The measure of reciprocity defines the proportion of mutual connections, in a directed graph. -It is most commonly defined as the probability that the opposite counterpart of a directed edge is also included in the graph. -Or in adjacency matrix notation: + It is most commonly defined as the probability that the opposite counterpart of a directed edge is also included in the graph. + Or in adjacency matrix notation: \eqn{1 - \left(\sum_{i,j} |A_{ij} - A_{ji}|\right) / \left(2\sum_{i,j} A_{ij}\right)}{1 - (sum_ij |A_ij - A_ji|) / (2 sum_ij A_ij)}. -This measure is calculated if the \code{mode} argument is \code{default}. + This measure is calculated if the \code{mode} argument is \code{default}. Prior to igraph version 0.6, another measure was implemented, defined as the probability of mutual connection between a vertex pair, if we know that there is a (possibly non-mutual) connection between them. -In other words, (unordered) vertex pairs are classified into three groups: (1) not-connected, (2) non-reciprocally connected, + In other words, (unordered) vertex pairs are classified into three groups: (1) not-connected, (2) non-reciprocally connected, (3) reciprocally connected. -The result is the size of group (3), divided by the sum of group sizes (2)+(3). -This measure is calculated if \code{mode} is \code{ratio}. + The result is the size of group (3), divided by the sum of group sizes (2)+(3). + This measure is calculated if \code{mode} is \code{ratio}. } \section{Related documentation in the C library}{ \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_reciprocity}{\code{reciprocity()}} diff --git a/man/reverse_edges.Rd b/man/reverse_edges.Rd index 73557fef2f1..f917dfb097f 100644 --- a/man/reverse_edges.Rd +++ b/man/reverse_edges.Rd @@ -13,7 +13,7 @@ reverse_edges(graph, eids = NULL) \item{graph}{The input graph.} \item{eids}{The edge IDs of the edges to reverse. -The default \code{NULL} reverses all edges.} + The default \code{NULL} reverses all edges.} \item{x}{The input graph.} } @@ -23,7 +23,7 @@ The result graph where the direction of the edges with the given IDs are reverse \description{ The new graph will contain the same vertices, edges and attributes as the original graph, except that the direction of the edges selected by their edge IDs in the \code{eids} argument will be reversed. -When reversing all edges, this operation is also known as graph transpose. + When reversing all edges, this operation is also known as graph transpose. } \section{Related documentation in the C library}{ \href{https://igraph.org/c/html/0.10.17/igraph-Operators.html#igraph_reverse_edges}{\code{reverse_edges()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_edges}{\code{edges()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_get_eids}{\code{get_eids()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_ecount}{\code{ecount()}} diff --git a/man/rglplot.Rd b/man/rglplot.Rd index cca9577b25b..aed286a4943 100644 --- a/man/rglplot.Rd +++ b/man/rglplot.Rd @@ -17,12 +17,12 @@ rglplot(x, ...) } \description{ Using the \code{rgl} package, \code{rglplot()} plots a graph in 3D. -The plot can be zoomed, rotated, shifted, etc. but the coordinates of the vertices is fixed. + The plot can be zoomed, rotated, shifted, etc. but the coordinates of the vertices is fixed. } \details{ Note that \code{rglplot()} is considered to be highly experimental. -It is not very useful either. -See \link{igraph.plotting} for the possible arguments. + It is not very useful either. + See \link{igraph.plotting} for the possible arguments. } \section{Related documentation in the C library}{ \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_get_edgelist}{\code{get_edgelist()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_is_directed}{\code{is_directed()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_edges}{\code{edges()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_get_eids}{\code{get_eids()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_ecount}{\code{ecount()}} diff --git a/man/running_mean.Rd b/man/running_mean.Rd index a1a78377507..4ed1ac90348 100644 --- a/man/running_mean.Rd +++ b/man/running_mean.Rd @@ -20,7 +20,7 @@ A numeric vector of length \code{length(v)-binwidth+1} } \details{ The running mean of \code{v} is a \code{w} vector of length \code{length(v)-binwidth+1}. -The first element of \code{w} ID the average of the first \code{binwidth} elements of \code{v}, + The first element of \code{w} ID the average of the first \code{binwidth} elements of \code{v}, the second element of \code{w} is the average of elements \code{2:(binwidth+1)}, etc. } \section{Related documentation in the C library}{ diff --git a/man/sample_.Rd b/man/sample_.Rd index 20b486651d5..b1f19b8b859 100644 --- a/man/sample_.Rd +++ b/man/sample_.Rd @@ -14,7 +14,7 @@ Generic function for sampling from network models. } \details{ \code{sample_()} is a generic function for creating graphs. -For every graph constructor in igraph that has a \code{sample_} prefix, + For every graph constructor in igraph that has a \code{sample_} prefix, there is a corresponding function without the prefix: e.g. for \code{\link[=sample_pa]{sample_pa()}} there is also \code{\link[=pa]{pa()}}, etc. @@ -22,8 +22,8 @@ The same is true for the deterministic graph samplers, i.e. for each constructor there is a corresponding function without that prefix. These shorter forms can be used together with \code{sample_()}. -The advantage of this form is that the user can specify constructor modifiers which work with all constructors. -E.g. the \code{\link[=with_vertex_]{with_vertex_()}} modifier adds vertex attributes to the newly created graphs. + The advantage of this form is that the user can specify constructor modifiers which work with all constructors. + E.g. the \code{\link[=with_vertex_]{with_vertex_()}} modifier adds vertex attributes to the newly created graphs. See the examples and the various constructor modifiers below. } diff --git a/man/sample_bipartite.Rd b/man/sample_bipartite.Rd index 98c7e6254ec..909fa4f612a 100644 --- a/man/sample_bipartite.Rd +++ b/man/sample_bipartite.Rd @@ -24,23 +24,23 @@ bipartite(..., type = NULL) \item{type}{Character scalar, the type of the graph, \sQuote{gnp} creates a \eqn{G(n,p)} graph, \sQuote{gnm} creates a \eqn{G(n,m)} graph. -See details below.} + See details below.} \item{p}{Real scalar, connection probability for \eqn{G(n,p)} graphs. -Should not be given for \eqn{G(n,m)} graphs.} + Should not be given for \eqn{G(n,m)} graphs.} \item{m}{Integer scalar, the number of edges for \eqn{G(n,m)} graphs. -Should not be given for \eqn{G(n,p)} graphs.} + Should not be given for \eqn{G(n,p)} graphs.} \item{directed}{Logical, whether to create a directed graph. -See also the \code{mode} argument.} + See also the \code{mode} argument.} \item{mode}{Character scalar, specifies how to direct the edges in directed graphs. -If it is \sQuote{out}, then directed edges point from bottom vertices to top vertices. -If it is \sQuote{in}, edges point from top vertices to bottom vertices. -\sQuote{out} and \sQuote{in} do not generate mutual edges. -If this argument is \sQuote{all}, then each edge direction is considered independently and mutual edges might be generated. -This argument is ignored for undirected graphs.} + If it is \sQuote{out}, then directed edges point from bottom vertices to top vertices. + If it is \sQuote{in}, edges point from top vertices to bottom vertices. + \sQuote{out} and \sQuote{in} do not generate mutual edges. + If this argument is \sQuote{all}, then each edge direction is considered independently and mutual edges might be generated. + This argument is ignored for undirected graphs.} \item{...}{Passed to \code{sample_bipartite()}.} } @@ -49,7 +49,7 @@ A bipartite igraph graph. } \description{ \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} Generate bipartite graphs using the Erdős-Rényi model. -Use \code{\link[=sample_bipartite_gnm]{sample_bipartite_gnm()}} and \code{\link[=sample_bipartite_gnp]{sample_bipartite_gnp()}} instead. + Use \code{\link[=sample_bipartite_gnm]{sample_bipartite_gnm()}} and \code{\link[=sample_bipartite_gnp]{sample_bipartite_gnp()}} instead. } \section{Related documentation in the C library}{ \href{https://igraph.org/c/html/0.10.17/igraph-Bipartite.html#igraph_bipartite_game_gnm}{\code{bipartite_game_gnm()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Bipartite.html#igraph_bipartite_game_gnp}{\code{bipartite_game_gnp()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}} diff --git a/man/sample_bipartite_gnm.Rd b/man/sample_bipartite_gnm.Rd index a317bb1f2a3..d5b1e7af5a5 100644 --- a/man/sample_bipartite_gnm.Rd +++ b/man/sample_bipartite_gnm.Rd @@ -39,14 +39,14 @@ sample_bipartite_gnp( \item{...}{These dots are for future extensions and must be empty.} \item{directed}{Logical, whether to create a directed graph. -See also the \code{mode} argument.} + See also the \code{mode} argument.} \item{mode}{Character scalar, specifies how to direct the edges in directed graphs. -If it is \sQuote{out}, then directed edges point from bottom vertices to top vertices. -If it is \sQuote{in}, edges point from top vertices to bottom vertices. -\sQuote{out} and \sQuote{in} do not generate mutual edges. -If this argument is \sQuote{all}, then each edge direction is considered independently and mutual edges might be generated. -This argument is ignored for undirected graphs.} + If it is \sQuote{out}, then directed edges point from bottom vertices to top vertices. + If it is \sQuote{in}, edges point from top vertices to bottom vertices. + \sQuote{out} and \sQuote{in} do not generate mutual edges. + If this argument is \sQuote{all}, then each edge direction is considered independently and mutual edges might be generated. + This argument is ignored for undirected graphs.} \item{p}{Real scalar, connection probability for \eqn{G(n,p)} graphs.} } @@ -56,9 +56,9 @@ Generate bipartite graphs using the Erdős-Rényi model \details{ Similarly to unipartite (one-mode) networks, we can define the \eqn{G(n,p)}, and \eqn{G(n,m)} graph classes for bipartite graphs, via their generating process. -In \eqn{G(n,p)} every possible edge between top and bottom vertices is realized with probability \eqn{p}, + In \eqn{G(n,p)} every possible edge between top and bottom vertices is realized with probability \eqn{p}, independently of the rest of the edges. -In \eqn{G(n,m)}, we uniformly choose \eqn{m} edges to realize. + In \eqn{G(n,m)}, we uniformly choose \eqn{m} edges to realize. } \section{Related documentation in the C library}{ \href{https://igraph.org/c/html/0.10.17/igraph-Bipartite.html#igraph_bipartite_game_gnm}{\code{bipartite_game_gnm()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Bipartite.html#igraph_bipartite_game_gnp}{\code{bipartite_game_gnp()}} diff --git a/man/sample_chung_lu.Rd b/man/sample_chung_lu.Rd index a1345fe7105..0f6418e6b64 100644 --- a/man/sample_chung_lu.Rd +++ b/man/sample_chung_lu.Rd @@ -23,31 +23,31 @@ chung_lu( } \arguments{ \item{out.weights}{A vector of non-negative vertex weights (or out-weights). -In sparse graphs, these will be approximately equal to the expected (out-)degrees.} + In sparse graphs, these will be approximately equal to the expected (out-)degrees.} \item{in.weights}{A vector of non-negative in-weights, approximately equal to the expected in-degrees in sparse graphs. -May be set to \code{NULL}, in which case undirected graphs are generated.} + May be set to \code{NULL}, in which case undirected graphs are generated.} \item{...}{These dots are for future extensions and must be empty.} \item{loops}{Logical, whether to allow the creation of self-loops. -Since vertex pairs are connected independently, + Since vertex pairs are connected independently, setting this to \code{FALSE} is equivalent to simply discarding self-loops from an existing loopy Chung-Lu graph.} \item{variant}{The model variant to sample from, with different definitions of the connection probability between vertices \eqn{i} and \eqn{j}. -Given \eqn{q_{ij} = \frac{w_i w_j}{S}}{q_ij = w_i w_j / S}, the following formulations are available: + Given \eqn{q_{ij} = \frac{w_i w_j}{S}}{q_ij = w_i w_j / S}, the following formulations are available: \describe{ \item{\dQuote{original}}{ the original Chung-Lu model, \eqn{p_{ij} = \min(q_{ij}, 1)}{p_ij = min(q_ij, 1)}. -} + } \item{\dQuote{maxent}}{ maximum entropy model with fixed expected degrees, \eqn{p_{ij} = \frac{q_{ij}}{1 + q_{ij}}}{p_ij = q_ij / (1 + q_ij)}. -} + } \item{\dQuote{nr}}{ Norros and Reittu's model, \eqn{p_{ij} = 1 - \exp(-q_{ij})}{p_ij = 1 - exp(-q_ij)}. -} + } }} } \value{ @@ -57,7 +57,7 @@ An igraph graph. \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#experimental}{\figure{lifecycle-experimental.svg}{options: alt='[Experimental]'}}}{\strong{[Experimental]}} The Chung-Lu model is useful for generating random graphs with fixed expected degrees. -This function implements both the original model of Chung and Lu, as well as some additional variants with useful properties. + This function implements both the original model of Chung and Lu, as well as some additional variants with useful properties. } \details{ In the original Chung-Lu model, each pair of vertices \eqn{i} and \eqn{j} is connected with independent probability @@ -65,42 +65,42 @@ In the original Chung-Lu model, each pair of vertices \eqn{i} and \eqn{j} is con where \eqn{w_i} is a weight associated with vertex \eqn{i} and \deqn{S = \sum_k w_k}{S = sum_k w_k} is the sum of weights. -In the directed variant, vertices have both out-weights, \eqn{w^\text{out}}{w^out}, and in-weights, \eqn{w^\text{in}}{w^in}, + In the directed variant, vertices have both out-weights, \eqn{w^\text{out}}{w^out}, and in-weights, \eqn{w^\text{in}}{w^in}, with equal sums, \deqn{S = \sum_k w^\text{out}_k = \sum_k w^\text{in}_k.}{S = sum_k w^out_k = sum_k w^in_k.} The connection probability between \eqn{i} and \eqn{j} is \deqn{p_{ij} = \frac{w^\text{out}_i w^\text{in}_j.}{S}}{p_ij = w^out_i w^in_j / S.} This model is commonly used to create random graphs with a fixed \emph{expected} degree sequence. -The expected degree of vertex \eqn{i} is approximately equal to the weight \eqn{w_i}. -Specifically, if the graph is directed and self-loops are allowed, + The expected degree of vertex \eqn{i} is approximately equal to the weight \eqn{w_i}. + Specifically, if the graph is directed and self-loops are allowed, then the expected out- and in-degrees are precisely \eqn{w^\text{out}}{w^out} and \eqn{w^\text{in}}{w^in}. -If self-loops are disallowed, + If self-loops are disallowed, then the expected out- and in-degrees are \eqn{\frac{w^\text{out} (S - w^\text{in})}{S}}{w^out (S - w^in) / S} and \eqn{\frac{w^\text{in} (S - w^\text{out})}{S}}{w^in (S - w^out) / S}, respectively. -If the graph is undirected, + If the graph is undirected, then the expected degrees with and without self-loops are \eqn{\frac{w (S + w)}{S}}{w (S + w) / S} and \eqn{\frac{w (S - w)}{S}}{w (S - w) / S}, respectively. A limitation of the original Chung-Lu model is that when some of the weights are large, the formula for \eqn{p_{ij}}{p_ij} yields values larger than 1. Chung and Lu's original paper excludes the use of such weights. -When \eqn{p_{ij} > 1}{p_ij > 1}, this function simply issues a warning and creates a connection between \eqn{i} and \eqn{j}. -However, in this case the expected degrees will no longer relate to the weights in the manner stated above. -Thus, the original Chung-Lu model cannot produce certain (large) expected degrees. + When \eqn{p_{ij} > 1}{p_ij > 1}, this function simply issues a warning and creates a connection between \eqn{i} and \eqn{j}. + However, in this case the expected degrees will no longer relate to the weights in the manner stated above. + Thus, the original Chung-Lu model cannot produce certain (large) expected degrees. To overcome this limitation, this function implements additional variants of the model, with modified expressions for the connection probability \eqn{p_{ij}}{p_ij} between vertices \eqn{i} and \eqn{j}. -Let \eqn{q_{ij} = \frac{w_i w_j}{S}}{q_ij = w_i w_j / S}, or \eqn{q_{ij} = \frac{w^\text{out}_i w^\text{in}_j}{S}}{q_ij = w^out_i w^in_j / S} in the directed case. -All model variants become equivalent in the limit of sparse graphs where \eqn{q_{ij}} approaches zero. -In the original Chung-Lu model, selectable by setting \code{variant} to \dQuote{original}, + Let \eqn{q_{ij} = \frac{w_i w_j}{S}}{q_ij = w_i w_j / S}, or \eqn{q_{ij} = \frac{w^\text{out}_i w^\text{in}_j}{S}}{q_ij = w^out_i w^in_j / S} in the directed case. + All model variants become equivalent in the limit of sparse graphs where \eqn{q_{ij}} approaches zero. + In the original Chung-Lu model, selectable by setting \code{variant} to \dQuote{original}, \eqn{p_{ij} = \min(q_{ij}, 1)}{p_ij = min(q_ij, 1)}. -The \dQuote{maxent} variant, sometimes referred to as the generalized random graph, uses \eqn{p_{ij} = \frac{q_{ij}}{1 + q_{ij}}}{p_ij = q_ij / (1 + q_ij)}, + The \dQuote{maxent} variant, sometimes referred to as the generalized random graph, uses \eqn{p_{ij} = \frac{q_{ij}}{1 + q_{ij}}}{p_ij = q_ij / (1 + q_ij)}, and is equivalent to a maximum entropy model (i.e., exponential random graph model) with a constraint on expected degrees; see Park and Newman (2004), Section B, setting \eqn{\exp(-\Theta_{ij}) = \frac{w_i w_j}{S}}{exp(-Theta_ij) = w_i w_j / S}. -This model is also discussed by Britton, Deijfen, and Martin-Löf (2006). -By virtue of being a degree-constrained maximum entropy model, + This model is also discussed by Britton, Deijfen, and Martin-Löf (2006). + By virtue of being a degree-constrained maximum entropy model, it generates graphs with the same degree sequence with the same probability. -A third variant can be requested with \dQuote{nr}, and uses \eqn{p_{ij} = 1 - \exp(-q_{ij})}{p_ij = 1 - exp(-q_ij)}. -This is the underlying simple graph of a multigraph model introduced by Norros and Reittu (2006). -For a discussion of these three model variants, see Section 16.4 of Bollobás, Janson, Riordan (2007), as well as Van Der Hofstad (2013). + A third variant can be requested with \dQuote{nr}, and uses \eqn{p_{ij} = 1 - \exp(-q_{ij})}{p_ij = 1 - exp(-q_ij)}. + This is the underlying simple graph of a multigraph model introduced by Norros and Reittu (2006). + For a discussion of these three model variants, see Section 16.4 of Bollobás, Janson, Riordan (2007), as well as Van Der Hofstad (2013). } \section{Related documentation in the C library}{ \href{https://igraph.org/c/html/0.10.17/igraph-Generators.html#igraph_chung_lu_game}{\code{chung_lu_game()}} @@ -123,13 +123,13 @@ rowMeans(replicate( \references{ Chung, F., and Lu, L. (2002). Connected components in a random graph with given degree sequences. Annals of Combinatorics, 6, 125-145. -\doi{10.1007/PL00012580} + \doi{10.1007/PL00012580} Miller, J. C., and Hagberg, A. (2011). Efficient Generation of Networks with Given Expected Degrees. \doi{10.1007/978-3-642-21286-4_10} Park, J., and Newman, M. E. J. (2004). Statistical mechanics of networks. -Physical Review E, 70, 066117. \doi{10.1103/PhysRevE.70.066117} + Physical Review E, 70, 066117. \doi{10.1103/PhysRevE.70.066117} Britton, T., Deijfen, M., and Martin-Löf, A. (2006). Generating Simple Random Graphs with Prescribed Degree Distribution. Journal of Statistical @@ -137,20 +137,20 @@ Physics, 124, 1377-1397. \doi{10.1007/s10955-006-9168-x} Norros, I., and Reittu, H. (2006). On a conditionally Poissonian graph process. Advances in Applied Probability, 38, 59-75. -\doi{10.1239/aap/1143936140} + \doi{10.1239/aap/1143936140} Bollobás, B., Janson, S., and Riordan, O. (2007). The phase transition in inhomogeneous random graphs. Random Structures & Algorithms, 31, 3-122. -\doi{10.1002/rsa.20168} + \doi{10.1002/rsa.20168} Van Der Hofstad, R. (2013). Critical behavior in inhomogeneous random graphs. Random Structures & Algorithms, 42, 480-508. -\doi{10.1002/rsa.20450} + \doi{10.1002/rsa.20450} } \seealso{ \code{\link[=sample_fitness]{sample_fitness()}} implements a similar model with a sharp constraint on the number of edges. -\code{\link[=sample_degseq]{sample_degseq()}} samples random graphs with sharply specified degrees. -\code{\link[=sample_gnp]{sample_gnp()}} creates random graphs with a fixed connection probability \eqn{p} between all vertex pairs. + \code{\link[=sample_degseq]{sample_degseq()}} samples random graphs with sharply specified degrees. + \code{\link[=sample_gnp]{sample_gnp()}} creates random graphs with a fixed connection probability \eqn{p} between all vertex pairs. Random graph models (games): \code{\link[=bipartite_gnm]{bipartite_gnm()}}, diff --git a/man/sample_correlated_gnp.Rd b/man/sample_correlated_gnp.Rd index 26d0c58aa33..05858af72bd 100644 --- a/man/sample_correlated_gnp.Rd +++ b/man/sample_correlated_gnp.Rd @@ -15,18 +15,18 @@ the target Pearson correlation between the adjacency matrices of the original an \item{...}{These dots are for future extensions and must be empty.} \item{p}{A numeric scalar, the probability of an edge between two vertices, it must in the open (0,1) interval. -The default \code{NULL} uses the empirical edge density of the graph. -If you are resampling an Erdős-Rényi graph and you know the original edge probability of the Erdős-Rényi model, + The default \code{NULL} uses the empirical edge density of the graph. + If you are resampling an Erdős-Rényi graph and you know the original edge probability of the Erdős-Rényi model, you should supply that explicitly.} \item{permutation}{A numeric vector, a permutation vector that is applied on the vertices of the first graph, to get the second graph. -If \code{NULL}, the vertices are not permuted.} + If \code{NULL}, the vertices are not permuted.} } \value{ An unweighted graph of the same size as \code{old.graph} such that the correlation coefficient between the entries of the two adjacency matrices is \code{corr}. -Note each pair of corresponding matrix entries is a pair of correlated Bernoulli random variables. + Note each pair of corresponding matrix entries is a pair of correlated Bernoulli random variables. } \description{ Sample a new graph by perturbing the adjacency matrix of a given graph and shuffling its vertices. @@ -48,7 +48,7 @@ g2 \references{ Lyzinski, V., Fishkind, D. E., Priebe, C. E. (2013). Seeded graph matching for correlated Erdős-Rényi graphs. -\url{https://arxiv.org/abs/1304.7844} + \url{https://arxiv.org/abs/1304.7844} } \seealso{ Random graph models (games): diff --git a/man/sample_correlated_gnp_pair.Rd b/man/sample_correlated_gnp_pair.Rd index b9e413df475..1f6ea661d61 100644 --- a/man/sample_correlated_gnp_pair.Rd +++ b/man/sample_correlated_gnp_pair.Rd @@ -19,7 +19,7 @@ it must in the open (0,1) interval.} \item{permutation}{A numeric vector, a permutation vector that is applied on the vertices of the first graph, to get the second graph. -If \code{NULL}, the vertices are not permuted.} + If \code{NULL}, the vertices are not permuted.} } \value{ A list of two igraph objects, named \code{graph1} and \code{graph2}, @@ -46,7 +46,7 @@ cor(as.vector(gg[[1]][]), as.vector(gg[[2]][])) \references{ Lyzinski, V., Fishkind, D. E., Priebe, C. E. (2013). Seeded graph matching for correlated Erdős-Rényi graphs. -\url{https://arxiv.org/abs/1304.7844} + \url{https://arxiv.org/abs/1304.7844} } \seealso{ Random graph models (games): diff --git a/man/sample_degseq.Rd b/man/sample_degseq.Rd index f49ef1be561..0baad30e1b1 100644 --- a/man/sample_degseq.Rd +++ b/man/sample_degseq.Rd @@ -14,57 +14,57 @@ sample_degseq( } \arguments{ \item{out.deg}{Numeric vector, the sequence of degrees (for undirected graphs) or out-degrees (for directed graphs). -For undirected graphs its sum should be even. -For directed graphs its sum should be the same as the sum of \code{in.deg}.} + For undirected graphs its sum should be even. + For directed graphs its sum should be the same as the sum of \code{in.deg}.} \item{in.deg}{For directed graph, the in-degree sequence. -By default this is \code{NULL} and an undirected graph is created.} + By default this is \code{NULL} and an undirected graph is created.} \item{...}{These dots are for future extensions and must be empty.} \item{method}{Character, the method for generating the graph. -See Details.} + See Details.} } \value{ The new graph object. } \description{ It is often useful to create a graph with given vertex degrees. -This function creates such a graph in a randomized manner. + This function creates such a graph in a randomized manner. } \details{ The \dQuote{configuration} method (formerly called "simple") implements the configuration model. -For undirected graphs, it puts all vertex IDs in a bag such that the multiplicity of a vertex in the bag is the same as its degree. -Then it draws pairs from the bag until the bag becomes empty. -This method may generate both loop (self) edges and multiple edges. -For directed graphs, the algorithm is basically the same, but two separate bags are used for the in- and out-degrees. -Undirected graphs are generated with probability proportional to \eqn{(\prod_{i Named arguments, where the names are the attributes} \item{index}{An optional vertex sequence to set the attributes of a subset of vertices. -The default \code{NULL} selects all vertices.} + The default \code{NULL} selects all vertices.} } \value{ The graph, with the vertex attributes added or set. diff --git a/man/shapes.Rd b/man/shapes.Rd index d5eb603ac0a..238cdefd847 100644 --- a/man/shapes.Rd +++ b/man/shapes.Rd @@ -18,27 +18,27 @@ add_shape(shape, ..., clip = NULL, plot = NULL, parameters = list()) } \arguments{ \item{shape}{Character scalar, name of a vertex shape. -If it is \code{NULL} for \code{shapes()}, then the names of all defined vertex shapes are returned.} + If it is \code{NULL} for \code{shapes()}, then the names of all defined vertex shapes are returned.} \item{coords, el, params, end, v}{See parameters of the clipping/plotting functions below.} \item{...}{These dots are for future extensions and must be empty.} \item{clip}{An R function object, the clipping function. -The default \code{NULL} uses \code{shape_noclip}.} + The default \code{NULL} uses \code{shape_noclip}.} \item{plot}{An R function object, the plotting function. -The default \code{NULL} uses \code{shape_noplot}.} + The default \code{NULL} uses \code{shape_noplot}.} \item{parameters}{Named list, additional plot/vertex/edge parameters. -The element named define the new parameters, and the elements themselves define their default values. -Vertex parameters should have a prefix \sQuote{\code{vertex.}}, edge parameters a prefix \sQuote{\code{edge.}}. -Other general plotting parameters should have a prefix \sQuote{\code{plot.}}. -See Details below.} + The element named define the new parameters, and the elements themselves define their default values. + Vertex parameters should have a prefix \sQuote{\code{vertex.}}, edge parameters a prefix \sQuote{\code{edge.}}. + Other general plotting parameters should have a prefix \sQuote{\code{plot.}}. + See Details below.} } \value{ \code{shapes()} returns a character vector if the \code{shape} argument is \code{NULL}. -It returns a named list with entries named \sQuote{clip} and \sQuote{plot}, both of them R functions. + It returns a named list with entries named \sQuote{clip} and \sQuote{plot}, both of them R functions. \code{add_shape()} returns \code{TRUE}, invisibly. @@ -50,65 +50,65 @@ Starting from version 0.5.1 igraph supports different vertex shapes when plottin \details{ In igraph a vertex shape is defined by two functions: 1) provides information about the size of the shape for clipping the edges and 2) plots the shape if requested. -These functions are called \dQuote{shape functions} in the rest of this manual page. -The first one is the clipping function and the second is the plotting function. + These functions are called \dQuote{shape functions} in the rest of this manual page. + The first one is the clipping function and the second is the plotting function. The clipping function has the following arguments: \describe{ \item{coords}{ A matrix with four columns, it contains the coordinates of the vertices for the edge list supplied in the \code{el} argument. -} + } \item{el}{ A matrix with two columns, the edges of which some end points will be clipped. -It should have the same number of rows as \code{coords}. -} + It should have the same number of rows as \code{coords}. + } \item{params}{ This is a function object that can be called to query vertex/edge/plot graphical parameters. -The first argument of the function is \dQuote{\code{vertex}}, \dQuote{\code{edge}} or \dQuote{\code{plot}} + The first argument of the function is \dQuote{\code{vertex}}, \dQuote{\code{edge}} or \dQuote{\code{plot}} to decide the type of the parameter, the second is a character string giving the name of the parameter. -E.g. \code{params("vertex", "size")}. -} + E.g. \code{params("vertex", "size")}. + } \item{end}{ Character string, it gives which end points will be used. -Possible values are \dQuote{\code{both}}, \dQuote{\code{from}} and \dQuote{\code{to}}. -If \dQuote{\code{from}} the function is expected to clip the first column in the \code{el} edge list, + Possible values are \dQuote{\code{both}}, \dQuote{\code{from}} and \dQuote{\code{to}}. + If \dQuote{\code{from}} the function is expected to clip the first column in the \code{el} edge list, \dQuote{\code{to}} selects the second column, \dQuote{\code{both}} selects both. -} + } } The clipping function should return a matrix with the same number of rows as the \code{el} arguments. -If \code{end} is \code{both} then the matrix must have four columns, otherwise two. -The matrix contains the modified coordinates, with the clipping applied. + If \code{end} is \code{both} then the matrix must have four columns, otherwise two. + The matrix contains the modified coordinates, with the clipping applied. The plotting function has the following arguments: \describe{ \item{coords}{ The coordinates of the vertices, a matrix with two columns. -} + } \item{v}{ The IDs of the vertices to plot. It should match the number of rows in the \code{coords} argument. -} + } \item{params}{ The same as for the clipping function, see above. -} + } } The return value of the plotting function is not used. \code{shapes()} can be used to list the names of all installed vertex shapes, by calling it without arguments, or setting the \code{shape} argument to \code{NULL}. -If a shape name is given, then the clipping and plotting functions of that shape are returned in a named list. + If a shape name is given, then the clipping and plotting functions of that shape are returned in a named list. \code{add_shape()} can be used to add new vertex shapes to igraph. -For this one must give the clipping and plotting functions of the new shape. -It is also possible to list the plot/vertex/edge parameters, in the \code{parameters} argument, + For this one must give the clipping and plotting functions of the new shape. + It is also possible to list the plot/vertex/edge parameters, in the \code{parameters} argument, that the clipping and/or plotting functions can make use of. -An example would be a generic regular polygon shape, which can have a parameter for the number of sides. + An example would be a generic regular polygon shape, which can have a parameter for the number of sides. \code{shape_noclip()} is a very simple clipping function that the user can use in their own shape definitions. -It does no clipping, the edges will be drawn exactly until the listed vertex position coordinates. + It does no clipping, the edges will be drawn exactly until the listed vertex position coordinates. \code{shape_noplot()} is a very simple (and probably not very useful) plotting function, that does not plot anything. } diff --git a/man/shortest.paths.Rd b/man/shortest.paths.Rd index fb3d9a56b1d..42ed8e34ee6 100644 --- a/man/shortest.paths.Rd +++ b/man/shortest.paths.Rd @@ -17,32 +17,32 @@ shortest.paths( \item{graph}{The graph to work on.} \item{v}{Numeric vector, the vertices from which the shortest paths will be calculated. -The default \code{NULL} selects all vertices.} + The default \code{NULL} selects all vertices.} \item{to}{Numeric vector, the vertices to which the shortest paths will be calculated. -The default \code{NULL} includes all vertices. -Note that for \code{distances()} every vertex must be included here at most once. -(This is not required for \code{shortest_paths()}.} + The default \code{NULL} includes all vertices. + Note that for \code{distances()} every vertex must be included here at most once. + (This is not required for \code{shortest_paths()}.} \item{mode}{Character constant, gives whether the shortest paths to or from the given vertices should be calculated for directed graphs. -If \code{out} then the shortest paths \emph{from} the vertex, if \verb{in} then \emph{to} it will be considered. -If \code{all}, the default, then the graph is treated as undirected, i.e. edge directions are not taken into account. -This argument is ignored for undirected graphs.} + If \code{out} then the shortest paths \emph{from} the vertex, if \verb{in} then \emph{to} it will be considered. + If \code{all}, the default, then the graph is treated as undirected, i.e. edge directions are not taken into account. + This argument is ignored for undirected graphs.} \item{weights}{Possibly a numeric vector giving edge weights. -If this is \code{NULL} and the graph has a \code{weight} edge attribute, then the attribute is used. -If this is \code{NA} then no weights are used (even if the graph has a \code{weight} attribute). -In a weighted graph, the length of a path is the sum of the weights of its constituent edges.} + If this is \code{NULL} and the graph has a \code{weight} edge attribute, then the attribute is used. + If this is \code{NA} then no weights are used (even if the graph has a \code{weight} attribute). + In a weighted graph, the length of a path is the sum of the weights of its constituent edges.} \item{algorithm}{Which algorithm to use for the calculation. -By default igraph tries to select the fastest suitable algorithm. -If there are no weights, then an unweighted breadth-first search is used, otherwise if all weights are positive, + By default igraph tries to select the fastest suitable algorithm. + If there are no weights, then an unweighted breadth-first search is used, otherwise if all weights are positive, then Dijkstra's algorithm is used. -If there are negative weights and we do the calculation for more than 100 sources, then Johnson's algorithm is used. -Otherwise the Bellman-Ford algorithm is used. -You can override igraph's choice by explicitly giving this parameter. -Note that the igraph C core might still override your choice in obvious cases, i.e. if there are no edge weights, + If there are negative weights and we do the calculation for more than 100 sources, then Johnson's algorithm is used. + Otherwise the Bellman-Ford algorithm is used. + You can override igraph's choice by explicitly giving this parameter. + Note that the igraph C core might still override your choice in obvious cases, i.e. if there are no edge weights, then the unweighted algorithm will be used, regardless of this argument.} } \description{ diff --git a/man/similarity.Rd b/man/similarity.Rd index 488db80729f..eaf26973e27 100644 --- a/man/similarity.Rd +++ b/man/similarity.Rd @@ -17,7 +17,7 @@ similarity( \item{graph}{The input graph.} \item{vids}{The vertex IDs for which the similarity is calculated. -The default \code{NULL} selects all vertices.} + The default \code{NULL} selects all vertices.} \item{...}{These dots are for future extensions and must be empty.} @@ -31,28 +31,28 @@ possible values: \sQuote{\code{out}}, \sQuote{\verb{in}}, } \value{ A \code{length(vids)} by \code{length(vids)} numeric matrix containing the similarity scores. -This argument is ignored by the \code{invlogweighted} method. + This argument is ignored by the \code{invlogweighted} method. } \description{ These functions calculates similarity scores for vertices based on their connection patterns. } \details{ The Jaccard similarity coefficient of two vertices is the number of common neighbors divided by the number of vertices that are neighbors of at least one of the two vertices being considered. -The \code{jaccard} method calculates the pairwise Jaccard similarities for some (or all) of the vertices. + The \code{jaccard} method calculates the pairwise Jaccard similarities for some (or all) of the vertices. The Dice similarity coefficient of two vertices is twice the number of common neighbors divided by the sum of the degrees of the vertices. -Methof \code{dice} calculates the pairwise Dice similarities for some (or all) of the vertices. + Methof \code{dice} calculates the pairwise Dice similarities for some (or all) of the vertices. The inverse log-weighted similarity of two vertices is the number of their common neighbors, weighted by the inverse logarithm of their degrees. -It is based on the assumption that two vertices should be considered more similar + It is based on the assumption that two vertices should be considered more similar if they share a low-degree common neighbor, since high-degree common neighbors are more likely to appear even by pure chance. -Isolated vertices will have zero similarity to any other vertex. -Self-similarities are not calculated. -See the following paper for more details: + Isolated vertices will have zero similarity to any other vertex. + Self-similarities are not calculated. + See the following paper for more details: Lada A. Adamic and Eytan Adar: Friends and neighbors on the Web. -Social Networks, 25(3):211-230, 2003. + Social Networks, 25(3):211-230, 2003. } \section{Related documentation in the C library}{ \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_similarity_dice}{\code{similarity_dice()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_similarity_inverse_log_weighted}{\code{similarity_inverse_log_weighted()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_similarity_jaccard}{\code{similarity_jaccard()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}} @@ -66,7 +66,7 @@ similarity(g, method = "jaccard") } \references{ Lada A. Adamic and Eytan Adar: Friends and neighbors on the Web. -\emph{Social Networks}, 25(3):211-230, 2003. + \emph{Social Networks}, 25(3):211-230, 2003. } \seealso{ Other cocitation: diff --git a/man/similarity.dice.Rd b/man/similarity.dice.Rd index 4c05ea289ca..12f017ff219 100644 --- a/man/similarity.dice.Rd +++ b/man/similarity.dice.Rd @@ -15,7 +15,7 @@ similarity.dice( \item{graph}{The input graph.} \item{vids}{The vertex IDs for which the similarity is calculated. -The default \code{NULL} selects all vertices.} + The default \code{NULL} selects all vertices.} \item{mode}{The type of neighboring vertices to use for the calculation, possible values: \sQuote{\code{out}}, \sQuote{\verb{in}}, diff --git a/man/similarity.invlogweighted.Rd b/man/similarity.invlogweighted.Rd index 2db8a3c7b0f..bf1e13e25b3 100644 --- a/man/similarity.invlogweighted.Rd +++ b/man/similarity.invlogweighted.Rd @@ -14,7 +14,7 @@ similarity.invlogweighted( \item{graph}{The input graph.} \item{vids}{The vertex IDs for which the similarity is calculated. -The default \code{NULL} selects all vertices.} + The default \code{NULL} selects all vertices.} \item{mode}{The type of neighboring vertices to use for the calculation, possible values: \sQuote{\code{out}}, \sQuote{\verb{in}}, diff --git a/man/similarity.jaccard.Rd b/man/similarity.jaccard.Rd index 3c26143885b..cf48bf959f3 100644 --- a/man/similarity.jaccard.Rd +++ b/man/similarity.jaccard.Rd @@ -15,7 +15,7 @@ similarity.jaccard( \item{graph}{The input graph.} \item{vids}{The vertex IDs for which the similarity is calculated. -The default \code{NULL} selects all vertices.} + The default \code{NULL} selects all vertices.} \item{mode}{The type of neighboring vertices to use for the calculation, possible values: \sQuote{\code{out}}, \sQuote{\verb{in}}, diff --git a/man/simple_cycles.Rd b/man/simple_cycles.Rd index 423709eb513..f4e14dfed9d 100644 --- a/man/simple_cycles.Rd +++ b/man/simple_cycles.Rd @@ -17,45 +17,45 @@ simple_cycles( \item{graph}{The input graph.} \item{mode}{Character constant specifying how to handle directed graphs. -\code{out} follows edge directions, \verb{in} follows edges in the reverse direction, and \code{all} ignores edge directions. -Ignored in undirected graphs.} + \code{out} follows edge directions, \verb{in} follows edges in the reverse direction, and \code{all} ignores edge directions. + Ignored in undirected graphs.} \item{min}{Lower limit on cycle lengths to consider. -\code{NULL} means no limit.} + \code{NULL} means no limit.} \item{max}{Upper limit on cycle lengths to consider. -\code{NULL} means no limit.} + \code{NULL} means no limit.} \item{...}{These dots are for future extensions and must be empty.} \item{callback}{Optional function to call for each cycle found. -If provided, the function should accept two arguments: + If provided, the function should accept two arguments: \code{vertices} (integer vector of vertex IDs in the cycle) and \code{edges} (integer vector of edge IDs in the cycle). -The function should return \code{FALSE} to continue the search or \code{TRUE} to stop it. -If \code{NULL} (the default), all cycles are collected and returned as a list. + The function should return \code{FALSE} to continue the search or \code{TRUE} to stop it. + If \code{NULL} (the default), all cycles are collected and returned as a list. \strong{Important limitation:} Callback functions must NOT call any igraph functions (including simple queries like \code{vcount()} or \code{ecount()}). -Doing so will cause R to crash due to nested \code{.Call()} state corruption. -Extract any needed graph information before calling the function with a callback, + Doing so will cause R to crash due to nested \code{.Call()} state corruption. + Extract any needed graph information before calling the function with a callback, or use collector mode (the default) and process results afterward.} } \value{ If \code{callback} is \code{NULL}, returns a list with two elements: \code{vertices} (list of integer vectors with vertex IDs) and \code{edges} (list of integer vectors with edge IDs). -If \code{callback} is provided, returns \code{NULL} invisibly. + If \code{callback} is provided, returns \code{NULL} invisibly. If \code{callback} is \code{NULL}, returns a list with two elements: \code{vertices} (list of integer vectors with vertex IDs) and \code{edges} (list of integer vectors with edge IDs). -If \code{callback} is provided, returns \code{NULL} invisibly. + If \code{callback} is provided, returns \code{NULL} invisibly. } \description{ \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#experimental}{\figure{lifecycle-experimental.svg}{options: alt='[Experimental]'}}}{\strong{[Experimental]}} This function lists all simple cycles in a graph within a range of cycle lengths. -A cycle is called simple if it has no repeated vertices. + A cycle is called simple if it has no repeated vertices. Multi-edges and self-loops are taken into account. -Note that typical graphs have exponentially many cycles and the presence of multi-edges exacerbates this combinatorial explosion. + Note that typical graphs have exponentially many cycles and the presence of multi-edges exacerbates this combinatorial explosion. } \section{Related documentation in the C library}{ \href{https://igraph.org/c/html/0.10.17/igraph-Cycles.html#igraph_simple_cycles_callback}{\code{simple_cycles_callback()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Cycles.html#igraph_simple_cycles}{\code{simple_cycles()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_edges}{\code{edges()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_get_eids}{\code{get_eids()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_ecount}{\code{ecount()}} diff --git a/man/simplify.Rd b/man/simplify.Rd index fe03ee0ef01..30f5e74bfa1 100644 --- a/man/simplify.Rd +++ b/man/simplify.Rd @@ -25,9 +25,9 @@ simplify_and_colorize(graph) \item{remove.loops}{Logical, whether the loop edges are to be removed.} \item{edge.attr.comb}{Specifies what to do with edge attributes, if \code{remove.multiple=TRUE}. -In this case many edges might be mapped to a single one in the new graph, and their attributes are combined. -Please see \code{\link[=attribute.combination]{attribute.combination()}} for details on this. -The default \code{NULL} uses the \code{edge.attr.comb} igraph option.} + In this case many edges might be mapped to a single one in the new graph, and their attributes are combined. + Please see \code{\link[=attribute.combination]{attribute.combination()}} for details on this. + The default \code{NULL} uses the \code{edge.attr.comb} igraph option.} } \value{ a graph object with the loop and/or multiple edges removed; the input graph is returned unchanged if it is already simple. @@ -37,21 +37,21 @@ Simple graphs are graphs which do not contain loop and multiple edges. } \details{ A loop edge is an edge for which the two endpoints are the same vertex. -Two edges are multiple edges if they have exactly the same two endpoints (for directed graphs order does matter). -A graph is simple is it does not contain loop edges and multiple edges. + Two edges are multiple edges if they have exactly the same two endpoints (for directed graphs order does matter). + A graph is simple is it does not contain loop edges and multiple edges. \code{is_simple()} checks whether a graph is simple. \code{simplify()} removes the loop and/or multiple edges from a graph. -If both \code{remove.loops} and \code{remove.multiple} are \code{TRUE} the function returns a simple graph. -If the graph is already simple, it is returned unchanged. + If both \code{remove.loops} and \code{remove.multiple} are \code{TRUE} the function returns a simple graph. + If the graph is already simple, it is returned unchanged. \code{simplify_and_colorize()} constructs a new, simple graph from a graph and also sets a \code{color} attribute on both the vertices and the edges. -The colors of the vertices represent the number of self-loops that were originally incident on them, + The colors of the vertices represent the number of self-loops that were originally incident on them, while the colors of the edges represent the multiplicities of the same edges in the original graph. -This allows one to take into account the edge multiplicities and the number of loop edges in the VF2 isomorphism algorithm. -Other graph, + This allows one to take into account the edge multiplicities and the number of loop edges in the VF2 isomorphism algorithm. + Other graph, vertex and edge attributes from the original graph are discarded as the primary purpose of this function is to facilitate the usage of multigraphs with the VF2 algorithm. } \section{Related documentation in the C library}{ diff --git a/man/sir.Rd b/man/sir.Rd index 08e60e4465a..56c708d2e9d 100644 --- a/man/sir.Rd +++ b/man/sir.Rd @@ -22,76 +22,76 @@ sir(graph, beta, gamma, ..., no.sim = 100) \item{x}{A \code{sir} object, returned by the \code{sir()} function.} \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.} + 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.} \item{na.rm}{Logical, whether to ignore \code{NA} values. -\code{sir} objects do not contain any \code{NA} values currently, + \code{sir} objects do not contain any \code{NA} values currently, so this argument is effectively ignored.} \item{comp}{Character scalar. -The component to calculate the quantile of. -\code{NI} is infected agents, \code{NS} is susceptibles, \code{NR} stands for recovered.} + The component to calculate the quantile of. + \code{NI} is infected agents, \code{NS} is susceptibles, \code{NR} stands for recovered.} \item{prob}{Numeric vector of probabilities, in [0,1], they specify the quantiles to calculate.} \item{graph}{The graph to run the model on. -If directed, then edge directions are ignored and a warning is given.} + If directed, then edge directions are ignored and a warning is given.} \item{beta}{Non-negative scalar. -The rate of infection of an individual that is susceptible and has a single infected neighbor. -The infection rate of a susceptible individual with n infected neighbors is n times beta. -Formally this is the rate parameter of an exponential distribution.} + The rate of infection of an individual that is susceptible and has a single infected neighbor. + The infection rate of a susceptible individual with n infected neighbors is n times beta. + Formally this is the rate parameter of an exponential distribution.} \item{gamma}{Positive scalar. -The rate of recovery of an infected individual. -Formally, this is the rate parameter of an exponential distribution.} + The rate of recovery of an infected individual. + Formally, this is the rate parameter of an exponential distribution.} \item{no.sim}{Integer scalar, the number simulation runs to perform.} } \value{ For \code{sir()} the results are returned in an object of class \sQuote{\code{sir}}, which is a list, with one element for each simulation. -Each simulation is itself a list with the following elements. -They are all numeric vectors, with equal length: + Each simulation is itself a list with the following elements. + They are all numeric vectors, with equal length: \describe{ \item{times}{ The times of the events. -} + } \item{NS}{ The number of susceptibles in the population, over time. -} + } \item{NI}{ The number of infected individuals in the population, over time. -} + } \item{NR}{ The number of recovered individuals in the population, over time. -} + } } Function \code{time_bins()} returns a numeric vector, the middle or the boundaries of the time bins, depending on the \code{middle} argument. \code{median} returns a list of three named numeric vectors, \code{NS}, \code{NI} and \code{NR}. -The names within the vectors are created from the time bins. + The names within the vectors are created from the time bins. \code{quantile} returns the same vector as \code{median} (but only one, the one requested) if only one quantile is requested. -If multiple quantiles are requested, then a list of these vectors is returned, one for each quantile. + If multiple quantiles are requested, then a list of these vectors is returned, one for each quantile. } \description{ Run simulations for an SIR (susceptible-infected-recovered) model, on a graph } \details{ The SIR model is a simple model from epidemiology. -The individuals of the population might be in three states: susceptible, infected and recovered. -Recovered people are assumed to be immune to the disease. -Susceptibles become infected with a rate that depends on their number of infected neighbors. -Infected people become recovered with a constant rate. + The individuals of the population might be in three states: susceptible, infected and recovered. + Recovered people are assumed to be immune to the disease. + Susceptibles become infected with a rate that depends on their number of infected neighbors. + Infected people become recovered with a constant rate. The function \code{sir()} simulates the model. -This function runs multiple simulations, all starting with a single uniformly randomly chosen infected individual. -A simulation is stopped when no infected individuals are left. + This function runs multiple simulations, all starting with a single uniformly randomly chosen infected individual. + A simulation is stopped when no infected individuals are left. Function \code{time_bins()} bins the simulation steps, using the Freedman-Diaconis heuristics to determine the bin width. diff --git a/man/spectrum.Rd b/man/spectrum.Rd index 0fd0cc0d410..ea1cd4b3df2 100644 --- a/man/spectrum.Rd +++ b/man/spectrum.Rd @@ -16,14 +16,14 @@ spectrum( \item{graph}{The input graph, can be directed or undirected.} \item{algorithm}{The algorithm to use. -Currently only \code{arpack} is implemented, which uses the ARPACK solver. -See also \code{\link[=arpack]{arpack()}}.} + Currently only \code{arpack} is implemented, which uses the ARPACK solver. + See also \code{\link[=arpack]{arpack()}}.} \item{which}{A list to specify which eigenvalues and eigenvectors to calculate. -By default the leading (i.e. largest magnitude) eigenvalue and the corresponding eigenvector is calculated.} + By default the leading (i.e. largest magnitude) eigenvalue and the corresponding eigenvector is calculated.} \item{options}{Options for the ARPACK solver. -See \code{\link[=arpack_defaults]{arpack_defaults()}}.} + See \code{\link[=arpack_defaults]{arpack_defaults()}}.} } \value{ Depends on the algorithm used. @@ -32,13 +32,13 @@ For \code{arpack} a list with three entries is returned: \describe{ \item{options}{ See the return value for \code{arpack()} for a complete description. -} + } \item{values}{ Numeric vector, the eigenvalues. -} + } \item{vectors}{ Numeric matrix, with the eigenvectors as columns. -} + } } } \description{ diff --git a/man/spinglass.community.Rd b/man/spinglass.community.Rd index 12db6f74af0..ace1f401764 100644 --- a/man/spinglass.community.Rd +++ b/man/spinglass.community.Rd @@ -21,59 +21,59 @@ spinglass.community( } \arguments{ \item{graph}{The input graph. -Edge directions are ignored in directed graphs.} + Edge directions are ignored in directed graphs.} \item{weights}{The weights of the edges. -It must be a positive numeric vector, \code{NULL} or \code{NA}. -If it is \code{NULL} and the input graph has a \sQuote{weight} edge attribute, then that attribute will be used. -If \code{NULL} and no such attribute is present, then the edges will have equal weights. -Set this to \code{NA} if the graph was a \sQuote{weight} edge attribute, but you don't want to use it for community detection. -A larger edge weight means a stronger connection for this function.} + It must be a positive numeric vector, \code{NULL} or \code{NA}. + If it is \code{NULL} and the input graph has a \sQuote{weight} edge attribute, then that attribute will be used. + If \code{NULL} and no such attribute is present, then the edges will have equal weights. + Set this to \code{NA} if the graph was a \sQuote{weight} edge attribute, but you don't want to use it for community detection. + A larger edge weight means a stronger connection for this function.} \item{vertex}{This parameter can be used to calculate the community of a given vertex without calculating all communities. -Note that if this argument is present then some other arguments are ignored.} + Note that if this argument is present then some other arguments are ignored.} \item{spins}{Integer constant, the number of spins to use. -This is the upper limit for the number of communities. -It is not a problem to supply a (reasonably) big number here, in which case some spin states will be unpopulated.} + This is the upper limit for the number of communities. + It is not a problem to supply a (reasonably) big number here, in which case some spin states will be unpopulated.} \item{parupdate}{Logical, whether to update the spins of the vertices in parallel (synchronously) or not. -This argument is ignored if the second form of the function is used (i.e. the \sQuote{\code{vertex}} argument is present). -It is also not implemented in the \dQuote{neg} implementation.} + This argument is ignored if the second form of the function is used (i.e. the \sQuote{\code{vertex}} argument is present). + It is also not implemented in the \dQuote{neg} implementation.} \item{start.temp}{Real constant, the start temperature. -This argument is ignored if the second form of the function is used (i.e. the \sQuote{\code{vertex}} argument is present).} + This argument is ignored if the second form of the function is used (i.e. the \sQuote{\code{vertex}} argument is present).} \item{stop.temp}{Real constant, the stop temperature. -The simulation terminates if the temperature lowers below this level. -This argument is ignored if the second form of the function is used (i.e. the \sQuote{\code{vertex}} argument is present).} + The simulation terminates if the temperature lowers below this level. + This argument is ignored if the second form of the function is used (i.e. the \sQuote{\code{vertex}} argument is present).} \item{cool.fact}{Cooling factor for the simulated annealing. -This argument is ignored + This argument is ignored if the second form of the function is used (i.e. the \sQuote{\code{vertex}} argument is present).} \item{update.rule}{Character constant giving the \sQuote{null-model} of the simulation. -Possible values: \dQuote{simple} and \dQuote{config}. -\dQuote{simple} uses a random graph with the same number of edges as the baseline probability and \dQuote{config} uses a random graph with the same vertex degrees as the input graph.} + Possible values: \dQuote{simple} and \dQuote{config}. + \dQuote{simple} uses a random graph with the same number of edges as the baseline probability and \dQuote{config} uses a random graph with the same vertex degrees as the input graph.} \item{gamma}{Real constant, the gamma argument of the algorithm. -This specifies the balance between the importance of present and non-present edges in a community. -Roughly, a comunity is a set of vertices having many edges inside the community and few edges outside the community. -The default 1.0 value makes existing and non-existing links equally important. -Smaller values make the existing links, greater values the missing links more important.} + This specifies the balance between the importance of present and non-present edges in a community. + Roughly, a comunity is a set of vertices having many edges inside the community and few edges outside the community. + The default 1.0 value makes existing and non-existing links equally important. + Smaller values make the existing links, greater values the missing links more important.} \item{implementation}{Character scalar. -Currently igraph contains two implementations for the Spin-glass community finding algorithm. -The faster original implementation is the default. -The other implementation, that takes into account negative weights, can be chosen by supplying \sQuote{neg} here.} + Currently igraph contains two implementations for the Spin-glass community finding algorithm. + The faster original implementation is the default. + The other implementation, that takes into account negative weights, can be chosen by supplying \sQuote{neg} here.} \item{gamma.minus}{Real constant, the gamma.minus parameter of the algorithm. -This specifies the balance between the importance of present and non-present negative weighted edges in a community. -Smaller values of gamma.minus, leads to communities with lesser negative intra-connectivity. -If this argument is set to zero, the algorithm reduces to a graph coloring algorithm, + This specifies the balance between the importance of present and non-present negative weighted edges in a community. + Smaller values of gamma.minus, leads to communities with lesser negative intra-connectivity. + If this argument is set to zero, the algorithm reduces to a graph coloring algorithm, using the number of spins as the number of colors. -This argument is ignored if the \sQuote{orig} implementation is chosen.} + This argument is ignored if the \sQuote{orig} implementation is chosen.} } \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/split_join_distance.Rd b/man/split_join_distance.Rd index 6726960d903..ea3e9a4ad53 100644 --- a/man/split_join_distance.Rd +++ b/man/split_join_distance.Rd @@ -20,12 +20,12 @@ The split-join distance between partitions A and B is the sum of the projection \details{ First, each set in partition A is evaluated against all sets in partition B. For each set in partition A, the best matching set in partition B is found and the overlap size is calculated. -(Matching is quantified by the size of the overlap between the two sets). -Then, the maximal overlap sizes for each set in A are summed together and subtracted from the number of elements in A. + (Matching is quantified by the size of the overlap between the two sets). + Then, the maximal overlap sizes for each set in A are summed together and subtracted from the number of elements in A. The split-join distance will be returned as two numbers, the first is the projection distance of the first partition from the second, while the second number is the projection distance of the second partition from the first. -This makes it easier to detect whether a partition is a subpartition of the other, since in this case, + This makes it easier to detect whether a partition is a subpartition of the other, since in this case, the corresponding distance will be zero. } \section{Related documentation in the C library}{ diff --git a/man/stCuts.Rd b/man/stCuts.Rd index 68cacde140e..29ed25415c6 100644 --- a/man/stCuts.Rd +++ b/man/stCuts.Rd @@ -8,7 +8,7 @@ stCuts(graph, source, target) } \arguments{ \item{graph}{The input graph. -It must be directed.} + It must be directed.} \item{source}{The source vertex.} diff --git a/man/stMincuts.Rd b/man/stMincuts.Rd index a78a7a25eac..17ab38dde45 100644 --- a/man/stMincuts.Rd +++ b/man/stMincuts.Rd @@ -8,15 +8,15 @@ stMincuts(graph, source, target, capacity = NULL) } \arguments{ \item{graph}{The input graph. -It must be directed.} + It must be directed.} \item{source}{The ID of the source vertex.} \item{target}{The ID of the target vertex.} \item{capacity}{Numeric vector giving the edge capacities. -If this is \code{NULL} and the graph has a \code{weight} edge attribute, then this attribute defines the edge capacities. -For forcing unit edge capacities, even for graphs that have a \code{weight} edge attribute, supply \code{NA} here.} + If this is \code{NULL} and the graph has a \code{weight} edge attribute, then this attribute defines the edge capacities. + For forcing unit edge capacities, even for graphs that have a \code{weight} edge attribute, supply \code{NA} here.} } \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/st_cuts.Rd b/man/st_cuts.Rd index c8f6dddff8d..3bcda37024a 100644 --- a/man/st_cuts.Rd +++ b/man/st_cuts.Rd @@ -8,7 +8,7 @@ st_cuts(graph, source, target) } \arguments{ \item{graph}{The input graph. -It must be directed.} + It must be directed.} \item{source}{The source vertex.} @@ -19,14 +19,14 @@ A list with entries: \describe{ \item{cuts}{ A list of numeric vectors containing edge IDs. -Each vector is an \eqn{(s,t)}-cut. -} + Each vector is an \eqn{(s,t)}-cut. + } \item{partition1s}{ A list of numeric vectors containing vertex IDs, they correspond to the edge cuts. -Each vertex set is a generator of the corresponding cut, i.e. in the graph \eqn{G=(V,E)}, + Each vertex set is a generator of the corresponding cut, i.e. in the graph \eqn{G=(V,E)}, the vertex set \eqn{X} and its complementer \eqn{V-X}, generates the cut that contains exactly the edges that go from \eqn{X} to \eqn{V-X}. -} + } } } \description{ diff --git a/man/st_min_cuts.Rd b/man/st_min_cuts.Rd index dafbf231acd..7d1b09dbb6e 100644 --- a/man/st_min_cuts.Rd +++ b/man/st_min_cuts.Rd @@ -8,7 +8,7 @@ st_min_cuts(graph, source, target, ..., capacity = NULL) } \arguments{ \item{graph}{The input graph. -It must be directed.} + It must be directed.} \item{source}{The ID of the source vertex.} @@ -17,25 +17,25 @@ It must be directed.} \item{...}{These dots are for future extensions and must be empty.} \item{capacity}{Numeric vector giving the edge capacities. -If this is \code{NULL} and the graph has a \code{weight} edge attribute, then this attribute defines the edge capacities. -For forcing unit edge capacities, even for graphs that have a \code{weight} edge attribute, supply \code{NA} here.} + If this is \code{NULL} and the graph has a \code{weight} edge attribute, then this attribute defines the edge capacities. + For forcing unit edge capacities, even for graphs that have a \code{weight} edge attribute, supply \code{NA} here.} } \value{ A list with entries: \describe{ \item{value}{ Numeric scalar, the size of the minimum cut(s). -} + } \item{cuts}{ A list of numeric vectors containing edge IDs. Each vector is a minimum \eqn{(s,t)}-cut. -} + } \item{partition1s}{ A list of numeric vectors containing vertex IDs, they correspond to the edge cuts. -Each vertex set is a generator of the corresponding cut, i.e. in the graph \eqn{G=(V,E)}, + Each vertex set is a generator of the corresponding cut, i.e. in the graph \eqn{G=(V,E)}, the vertex set \eqn{X} and its complementer \eqn{V-X}, generates the cut that contains exactly the edges that go from \eqn{X} to \eqn{V-X}. -} + } } } \description{ @@ -46,7 +46,7 @@ Given a \eqn{G} directed graph and two, different and non-ajacent vertices, \eqn such that after removing these edges from \eqn{G} there is no directed path from \eqn{s} to \eqn{t}. The size of an \eqn{(s,t)}-cut is defined as the sum of the capacities (or weights) in the cut. -For unweighted (=equally weighted) graphs, this is simply the number of edges. + For unweighted (=equally weighted) graphs, this is simply the number of edges. An \eqn{(s,t)}-cut is minimum if it is of the smallest possible size. } diff --git a/man/static.fitness.game.Rd b/man/static.fitness.game.Rd index f113981e991..fb55f2c128a 100644 --- a/man/static.fitness.game.Rd +++ b/man/static.fitness.game.Rd @@ -16,11 +16,11 @@ static.fitness.game( \item{no.of.edges}{The number of edges in the generated graph.} \item{fitness.out}{A numeric vector containing the fitness of each vertex. -For directed graphs, this specifies the out-fitness of each vertex.} + For directed graphs, this specifies the out-fitness of each vertex.} \item{fitness.in}{Numeric vector that specifies the in-fitness of each vertex. -The generated graph will be directed. -Default: \code{NULL}, the generated graph will be undirected.} + The generated graph will be directed. + Default: \code{NULL}, the generated graph will be undirected.} \item{loops}{Logical, whether to allow loop edges in the graph.} diff --git a/man/static.power.law.game.Rd b/man/static.power.law.game.Rd index b0e943bc001..35dd7806245 100644 --- a/man/static.power.law.game.Rd +++ b/man/static.power.law.game.Rd @@ -20,13 +20,13 @@ static.power.law.game( \item{no.of.edges}{The number of edges in the generated graph.} \item{exponent.out}{Numeric scalar, the power law exponent of the degree distribution. -For directed graphs, this specifies the exponent of the out-degree distribution. -It must be greater than or equal to 2. If you pass \code{Inf} here, you will get back an Erdős-Rényi random network.} + For directed graphs, this specifies the exponent of the out-degree distribution. + It must be greater than or equal to 2. If you pass \code{Inf} here, you will get back an Erdős-Rényi random network.} \item{exponent.in}{Numeric scalar. -If negative, the generated graph will be undirected. -If greater than or equal to 2, this argument specifies the exponent of the in-degree distribution. -If non-negative but less than 2, an error will be generated.} + If negative, the generated graph will be undirected. + If greater than or equal to 2, this argument specifies the exponent of the in-degree distribution. + If non-negative but less than 2, an error will be generated.} \item{loops}{Logical, whether to allow loop edges in the graph.} diff --git a/man/stochastic_matrix.Rd b/man/stochastic_matrix.Rd index c6e581b7286..f073e5a5855 100644 --- a/man/stochastic_matrix.Rd +++ b/man/stochastic_matrix.Rd @@ -8,15 +8,15 @@ stochastic_matrix(graph, ..., column.wise = FALSE, sparse = NULL) } \arguments{ \item{graph}{The input graph. -Must be of class \code{igraph}.} + Must be of class \code{igraph}.} \item{...}{These dots are for future extensions and must be empty.} \item{column.wise}{If \code{FALSE}, then the rows of the stochastic matrix sum up to one; otherwise it is the columns.} \item{sparse}{Logical, whether to return a sparse matrix. -The \code{Matrix} package is needed for sparse matrices. -The default \code{NULL} uses the \code{sparsematrices} igraph option.} + The \code{Matrix} package is needed for sparse matrices. + The default \code{NULL} uses the \code{sparsematrices} igraph option.} } \value{ A regular matrix or a matrix of class \code{Matrix} if a \code{sparse} argument was \code{TRUE}. @@ -26,11 +26,11 @@ Retrieves the stochastic matrix of a graph of class \code{igraph}. } \details{ Let \eqn{M} be an \eqn{n \times n}{n x n} adjacency matrix with real non-negative entries. -Let us define \eqn{D = \textrm{diag}(\sum_{i}M_{1i}, + Let us define \eqn{D = \textrm{diag}(\sum_{i}M_{1i}, \dots, \sum_{i}M_{ni})}{D=diag( sum(M[1,i], i), ..., sum(M[n,i], i) )} The (row) stochastic matrix is defined as \deqn{W = D^{-1}M,}{W = inv(D) M,} where it is assumed that \eqn{D} is non-singular. -Column stochastic matrices are defined in a symmetric way. + Column stochastic matrices are defined in a symmetric way. } \section{Related documentation in the C library}{ \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_get_stochastic}{\code{get_stochastic()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_get_stochastic_sparse}{\code{get_stochastic_sparse()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_edges}{\code{edges()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_get_eids}{\code{get_eids()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_ecount}{\code{ecount()}} diff --git a/man/strength.Rd b/man/strength.Rd index 69448d86a83..382d8945f0a 100644 --- a/man/strength.Rd +++ b/man/strength.Rd @@ -17,19 +17,19 @@ strength( \item{graph}{The input graph.} \item{vids}{The vertices for which the strength will be calculated. -The default \code{NULL} selects all vertices.} + The default \code{NULL} selects all vertices.} \item{...}{These dots are for future extensions and must be empty.} \item{mode}{Character string, \dQuote{out} for out-degree, \dQuote{in} for in-degree or \dQuote{all} for the sum of the two. -For undirected graphs this argument is ignored.} + For undirected graphs this argument is ignored.} \item{loops}{Logical; whether the loop edges are also counted.} \item{weights}{Weight vector. -If the graph has a \code{weight} edge attribute, then this is used by default. -If the graph does not have a \code{weight} edge attribute and this argument is \code{NULL}, then a \code{\link[=degree]{degree()}} is called. -If this is \code{NA}, then no edge weights are used (even if the graph has a \code{weight} edge attribute).} + If the graph has a \code{weight} edge attribute, then this is used by default. + If the graph does not have a \code{weight} edge attribute and this argument is \code{NULL}, then a \code{\link[=degree]{degree()}} is called. + If this is \code{NA}, then no edge weights are used (even if the graph has a \code{weight} edge attribute).} } \value{ A numeric vector giving the strength of the vertices. @@ -56,7 +56,7 @@ strength(g) \references{ Alain Barrat, Marc Barthelemy, Romualdo Pastor-Satorras, Alessandro Vespignani: The architecture of complex weighted networks, Proc. -Natl. Acad. Sci. USA 101, 3747 (2004) + Natl. Acad. Sci. USA 101, 3747 (2004) } \seealso{ \code{\link[=degree]{degree()}} for the unweighted version. diff --git a/man/sub-.igraph.Rd b/man/sub-.igraph.Rd index aa6990c2abb..d6276b9fa80 100644 --- a/man/sub-.igraph.Rd +++ b/man/sub-.igraph.Rd @@ -21,25 +21,25 @@ \item{x}{The graph.} \item{i}{Index. -Vertex IDs or names or logical vectors. -See details below.} + Vertex IDs or names or logical vectors. + See details below.} \item{j}{Index. -Vertex IDs or names or logical vectors. -See details below.} + Vertex IDs or names or logical vectors. + See details below.} \item{...}{Currently ignored.} \item{from}{A numeric or character vector giving vertex IDs or names. -Together with the \code{to} argument, it can be used to query/set a sequence of edges. -See details below. -This argument cannot be present together with any of the \code{i} and \code{j} arguments and if it is present, + Together with the \code{to} argument, it can be used to query/set a sequence of edges. + See details below. + This argument cannot be present together with any of the \code{i} and \code{j} arguments and if it is present, then the \code{to} argument must be present as well.} \item{to}{A numeric or character vector giving vertex IDs or names. -Together with the \code{from} argument, it can be used to query/set a sequence of edges. -See details below. -This argument cannot be present together with any of the \code{i} and \code{j} arguments and if it is present, + Together with the \code{from} argument, it can be used to query/set a sequence of edges. + See details below. + This argument cannot be present together with any of the \code{i} and \code{j} arguments and if it is present, then the \code{from} argument must be present as well.} \item{sparse}{Logical, whether to return sparse matrices.} @@ -49,66 +49,66 @@ then the \code{from} argument must be present as well.} \item{drop}{Ignored.} \item{attr}{Name of an edge attribute. -This attribute is queried and returned. -Default: \code{NULL}.} + This attribute is queried and returned. + Default: \code{NULL}.} } \value{ A scalar or matrix. -See details below. + See details below. } \description{ Query and manipulate a graph as it were an adjacency matrix } \details{ The single bracket indexes the (possibly weighted) adjacency matrix of the graph. -Here is what you can do with it: + Here is what you can do with it: \enumerate{ \item Check whether there is an edge between two vertices (\eqn{v} and \eqn{w}) in the graph: \preformatted{ graph[v, w]} A numeric scalar is returned, one if the edge exists, zero otherwise. -\item Extract the (sparse) adjacency matrix of the graph, or part of + \item Extract the (sparse) adjacency matrix of the graph, or part of it: \preformatted{ graph[] graph[1:3,5:6] graph[c(1,3,5),]} The first variants returns the full adjacency matrix, the other two return part of it. -\item The \code{from} and \code{to} arguments can be used to check the existence of many edges. -In this case, both \code{from} and \code{to} must be present and they must have the same length. -They must contain vertex IDs or names. -A numeric vector is returned, of the same length as \code{from} and \code{to}, it contains ones for existing edges edges + \item The \code{from} and \code{to} arguments can be used to check the existence of many edges. + In this case, both \code{from} and \code{to} must be present and they must have the same length. + They must contain vertex IDs or names. + A numeric vector is returned, of the same length as \code{from} and \code{to}, it contains ones for existing edges edges and zeros for non-existing ones. -Example: \preformatted{ graph[from=1:3, to=c(2,3,5)]}. -\item For weighted graphs, the \code{[} operator returns the edge weights. -For non-esistent edges zero weights are returned. -Other edge attributes can be queried as well, by giving the \code{attr} argument. -\item Querying edge IDs instead of the existance of edges or edge + Example: \preformatted{ graph[from=1:3, to=c(2,3,5)]}. + \item For weighted graphs, the \code{[} operator returns the edge weights. + For non-esistent edges zero weights are returned. + Other edge attributes can be queried as well, by giving the \code{attr} argument. + \item Querying edge IDs instead of the existance of edges or edge attributes. E.g. \preformatted{ graph[1, 2, edges=TRUE]} returns the ID of the edge between vertices 1 and 2, or zero if there is no such edge. -\item Adding one or more edges to a graph. For this the element(s) of + \item Adding one or more edges to a graph. For this the element(s) of the imaginary adjacency matrix must be set to a non-zero numeric value (or \code{TRUE}): \preformatted{ graph[1, 2] <- 1 graph[1:3,1] <- 1 graph[from=1:3, to=c(2,3,5)] <- TRUE} This does not affect edges that are already present in the graph, i.e. no multiple edges are created. -\item Adding weighted edges to a graph. The \code{attr} argument + \item Adding weighted edges to a graph. The \code{attr} argument contains the name of the edge attribute to set, so it does not have to be \sQuote{weight}: \preformatted{ graph[1, 2, attr="weight"]<- 5 graph[from=1:3, to=c(2,3,5)] <- c(1,-1,4)} If an edge is already present in the network, then only its weights or other attribute are updated. -If the graph is already weighted, then the \code{attr="weight"} setting is implicit, and one does not need to give it explicitly. -\item Deleting edges. The replacement syntax allow the deletion of + If the graph is already weighted, then the \code{attr="weight"} setting is implicit, and one does not need to give it explicitly. + \item Deleting edges. The replacement syntax allow the deletion of edges, by specifying \code{FALSE} or \code{NULL} as the replacement value: \preformatted{ graph[v, w] <- FALSE} removes the edge from vertex \eqn{v} to vertex \eqn{w}. -As this can be used to delete edges between two sets of vertices, + As this can be used to delete edges between two sets of vertices, either pairwise: \preformatted{ graph[from=v, to=w] <- FALSE} or not: \preformatted{ graph[v, w] <- FALSE } if \eqn{v} and \eqn{w} are vectors of edge IDs or names. -} + } \sQuote{\code{[}} allows logical indices and negative indices as well, with the usual R semantics. E.g. \preformatted{ graph[degree(graph)==0, 1] <- 1} diff --git a/man/sub-sub-.igraph.Rd b/man/sub-sub-.igraph.Rd index ba4c1da8de9..c6d95dba747 100644 --- a/man/sub-sub-.igraph.Rd +++ b/man/sub-sub-.igraph.Rd @@ -14,21 +14,21 @@ \item{j}{Index, integer, character or logical, see details below.} \item{from}{A numeric or character vector giving vertex IDs or names. -Together with the \code{to} argument, it can be used to query/set a sequence of edges. -See details below. -This argument cannot be present together with any of the \code{i} and \code{j} arguments and if it is present, + Together with the \code{to} argument, it can be used to query/set a sequence of edges. + See details below. + This argument cannot be present together with any of the \code{i} and \code{j} arguments and if it is present, then the \code{to} argument must be present as well.} \item{to}{A numeric or character vector giving vertex IDs or names. -Together with the \code{from} argument, it can be used to query/set a sequence of edges. -See details below. -This argument cannot be present together with any of the \code{i} and \code{j} arguments and if it is present, + Together with the \code{from} argument, it can be used to query/set a sequence of edges. + See details below. + This argument cannot be present together with any of the \code{i} and \code{j} arguments and if it is present, then the \code{from} argument must be present as well.} \item{...}{Additional arguments are not used currently.} \item{directed}{Logical, whether to consider edge directions in directed graphs. -It is ignored for undirected graphs.} + It is ignored for undirected graphs.} \item{edges}{Logical, whether to return edge IDs.} @@ -39,14 +39,14 @@ Query and manipulate a graph as it were an adjacency list } \details{ The double bracket operator indexes the (imaginary) adjacency list of the graph. -This can used for the following operations: + This can used for the following operations: \enumerate{ \item Querying the adjacent vertices for one or more vertices: \preformatted{ graph[[1:3,]] graph[[,1:3]]} The first form gives the successors, the second the predecessors or the 1:3 vertices. (For undirected graphs they are equivalent.) -\item Querying the incident edges for one or more vertices, + \item Querying the incident edges for one or more vertices, if the \code{edges} argument is set to \code{TRUE}: \preformatted{ graph[[1:3, , edges=TRUE]] graph[[, 1:3, edges=TRUE]]} @@ -54,7 +54,7 @@ graph[[, 1:3, edges=TRUE]]} if both indices are used. E.g. \preformatted{ graph[[v, w, edges=TRUE]]} gives the edge IDs of all the edges that exist from vertices \eqn{v} to vertices \eqn{w}. -} + } The alternative argument names \code{from} and \code{to} can be used instead of the usual \code{i} and \code{j}, to make the code more readable: \preformatted{ graph[[from = 1:3]] diff --git a/man/subcomponent.Rd b/man/subcomponent.Rd index c80f28501b7..1e826cb234f 100644 --- a/man/subcomponent.Rd +++ b/man/subcomponent.Rd @@ -14,10 +14,10 @@ subcomponent(graph, v, ..., mode = c("all", "out", "in")) \item{...}{These dots are for future extensions and must be empty.} \item{mode}{Character string, either \dQuote{in}, \dQuote{out} or \dQuote{all}. -If \dQuote{in} all vertices from which \code{v} is reachable are listed. -If \dQuote{out} all vertices reachable from \code{v} are returned. -If \dQuote{all} returns the union of these. -It is ignored for undirected graphs.} + If \dQuote{in} all vertices from which \code{v} is reachable are listed. + If \dQuote{out} all vertices reachable from \code{v} are returned. + If \dQuote{all} returns the union of these. + It is ignored for undirected graphs.} } \value{ Numeric vector, the IDs of the vertices in the same component as \code{v}. diff --git a/man/subgraph.Rd b/man/subgraph.Rd index 4dfbc1dd999..fcbb8b7c060 100644 --- a/man/subgraph.Rd +++ b/man/subgraph.Rd @@ -25,9 +25,9 @@ subgraph_from_edges(graph, eids, ..., delete.vertices = TRUE) \item{...}{These dots are for future extensions and must be empty.} \item{impl}{Character scalar, to choose between two implementation of the subgraph calculation. -\sQuote{\code{copy_and_delete}} copies the graph first, and then deletes the vertices and edges that are not included in the result graph. -\sQuote{\code{create_from_scratch}} searches for all vertices and edges that must be kept and then uses them to create the graph from scratch. -\sQuote{\code{auto}} chooses between the two implementations automatically, + \sQuote{\code{copy_and_delete}} copies the graph first, and then deletes the vertices and edges that are not included in the result graph. + \sQuote{\code{create_from_scratch}} searches for all vertices and edges that must be kept and then uses them to create the graph from scratch. + \sQuote{\code{auto}} chooses between the two implementations automatically, using heuristics based on the size of the original and the result graph.} \item{eids}{The edge IDs of the edges that will be kept in the result graph.} @@ -42,15 +42,15 @@ A new graph object. } \details{ \code{induced_subgraph()} calculates the induced subgraph of a set of vertices in a graph. -This means that exactly the specified vertices and all the edges between them will be kept in the result graph. + This means that exactly the specified vertices and all the edges between them will be kept in the result graph. \code{subgraph_from_edges()} calculates the subgraph of a graph. -For this function one can specify the vertices and edges to keep. -This function will be renamed to \code{subgraph()} in the next major version of igraph. + For this function one can specify the vertices and edges to keep. + This function will be renamed to \code{subgraph()} in the next major version of igraph. The \code{subgraph()} function currently does the same as \code{induced_subgraph()} (assuming \sQuote{\code{auto}} as the \code{impl} argument), but this behaviour is deprecated. -In the next major version, \code{subgraph()} will overtake the functionality of \code{subgraph_from_edges()}. + In the next major version, \code{subgraph()} will overtake the functionality of \code{subgraph_from_edges()}. } \section{Related documentation in the C library}{ \href{https://igraph.org/c/html/0.10.17/igraph-Operators.html#igraph_induced_subgraph}{\code{induced_subgraph()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Operators.html#igraph_subgraph_from_edges}{\code{subgraph_from_edges()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_get_eids}{\code{get_eids()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_edges}{\code{edges()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_ecount}{\code{ecount()}} diff --git a/man/subgraph.centrality.Rd b/man/subgraph.centrality.Rd index 09a215c4797..aabf53272b4 100644 --- a/man/subgraph.centrality.Rd +++ b/man/subgraph.centrality.Rd @@ -8,10 +8,10 @@ subgraph.centrality(graph, diag = FALSE) } \arguments{ \item{graph}{The input graph. -It will be treated as undirected.} + It will be treated as undirected.} \item{diag}{Logical, whether to include the diagonal of the adjacency matrix in the analysis. -Giving \code{FALSE} here effectively eliminates the loops edges from the graph before the calculation.} + Giving \code{FALSE} here effectively eliminates the loops edges from the graph before the calculation.} } \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/subgraph_centrality.Rd b/man/subgraph_centrality.Rd index bc4ee2fe36f..932d88b1c1c 100644 --- a/man/subgraph_centrality.Rd +++ b/man/subgraph_centrality.Rd @@ -8,12 +8,12 @@ subgraph_centrality(graph, ..., diag = FALSE) } \arguments{ \item{graph}{The input graph. -It will be treated as undirected.} + It will be treated as undirected.} \item{...}{These dots are for future extensions and must be empty.} \item{diag}{Logical, whether to include the diagonal of the adjacency matrix in the analysis. -Giving \code{FALSE} here effectively eliminates the loops edges from the graph before the calculation.} + Giving \code{FALSE} here effectively eliminates the loops edges from the graph before the calculation.} } \value{ A numeric vector, the subgraph centrality scores of the vertices. @@ -26,7 +26,7 @@ The subgraph centrality of a vertex is defined as the number of closed walks ori where longer walks are downweighted by the factorial of their length. Currently the calculation is performed by explicitly calculating all eigenvalues and eigenvectors of the adjacency matrix of the graph. -This effectively means that the measure can only be calculated for small graphs. + This effectively means that the measure can only be calculated for small graphs. } \section{Related documentation in the C library}{ \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_is_directed}{\code{is_directed()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_get_adjacency}{\code{get_adjacency()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_get_adjacency_sparse}{\code{get_adjacency_sparse()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_edges}{\code{edges()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_get_eids}{\code{get_eids()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_ecount}{\code{ecount()}} diff --git a/man/subgraph_isomorphic.Rd b/man/subgraph_isomorphic.Rd index 7ae25ab58af..916d0b594a9 100644 --- a/man/subgraph_isomorphic.Rd +++ b/man/subgraph_isomorphic.Rd @@ -18,14 +18,14 @@ is_subgraph_isomorphic_to( } \arguments{ \item{pattern}{The smaller graph, it might be directed or undirected. -Undirected graphs are treated as directed graphs with mutual edges.} + Undirected graphs are treated as directed graphs with mutual edges.} \item{target}{The bigger graph, it might be directed or undirected. -Undirected graphs are treated as directed graphs with mutual edges.} + Undirected graphs are treated as directed graphs with mutual edges.} \item{method}{The method to use. -Possible values: \sQuote{auto}, \sQuote{lad}, \sQuote{vf2}. -See their details below.} + Possible values: \sQuote{auto}, \sQuote{lad}, \sQuote{vf2}. + See their details below.} \item{...}{Additional arguments, passed to the various methods.} } @@ -43,42 +43,42 @@ This method currently selects \sQuote{lad}, always, as it seems to be superior o \section{\sQuote{lad} method}{ This is the LAD algorithm by Solnon, see the reference below. -It has the following extra arguments: + It has the following extra arguments: \describe{ \item{domains}{ Matching restrictions. -It must be a list of \code{target} vertex sets, given as numeric vertex IDs or symbolic vertex names. -The length of the list must be \code{vcount(pattern)} and for each vertex in \code{pattern} + It must be a list of \code{target} vertex sets, given as numeric vertex IDs or symbolic vertex names. + The length of the list must be \code{vcount(pattern)} and for each vertex in \code{pattern} it gives the allowed matching vertices in \code{target}. -Defaults to \code{NULL}. -} + Defaults to \code{NULL}. + } \item{induced}{ Logical scalar, whether to search for an induced subgraph. -It is \code{FALSE} by default. -} + It is \code{FALSE} by default. + } \item{time.limit}{ The processor time limit for the computation, in seconds. -It defaults to \code{Inf}, which means no limit. -} + It defaults to \code{Inf}, which means no limit. + } } } \section{\sQuote{vf2} method}{ This method uses the VF2 algorithm by Cordella, Foggia et al., see references below. -It supports vertex and edge colors and have the following extra arguments: + It supports vertex and edge colors and have the following extra arguments: \describe{ \item{vertex.color1, vertex.color2}{ Optional integer vectors giving the colors of the vertices for colored graph isomorphism. -If they are not given, but the graph has a \dQuote{color} vertex attribute, then it will be used. -If you want to ignore these attributes, then supply \code{NULL} for both of these arguments. -See also examples below. -} + If they are not given, but the graph has a \dQuote{color} vertex attribute, then it will be used. + If you want to ignore these attributes, then supply \code{NULL} for both of these arguments. + See also examples below. + } \item{edge.color1, edge.color2}{ Optional integer vectors giving the colors of the edges for edge-colored (sub)graph isomorphism. -If they are not given, but the graph has a \dQuote{color} edge attribute, then it will be used. -If you want to ignore these attributes, then supply \code{NULL} for both of these arguments. -} + If they are not given, but the graph has a \dQuote{color} edge attribute, then it will be used. + If you want to ignore these attributes, then supply \code{NULL} for both of these arguments. + } } } diff --git a/man/subgraph_isomorphisms.Rd b/man/subgraph_isomorphisms.Rd index 03e97138de4..cef775ec280 100644 --- a/man/subgraph_isomorphisms.Rd +++ b/man/subgraph_isomorphisms.Rd @@ -15,33 +15,33 @@ subgraph_isomorphisms( } \arguments{ \item{pattern}{The smaller graph, it might be directed or undirected. -Undirected graphs are treated as directed graphs with mutual edges.} + Undirected graphs are treated as directed graphs with mutual edges.} \item{target}{The bigger graph, it might be directed or undirected. -Undirected graphs are treated as directed graphs with mutual edges.} + Undirected graphs are treated as directed graphs with mutual edges.} \item{method}{The method to use. -Possible values: \sQuote{auto}, \sQuote{lad}, \sQuote{vf2}. -See their details below.} + Possible values: \sQuote{auto}, \sQuote{lad}, \sQuote{vf2}. + See their details below.} \item{...}{Additional arguments, passed to the various methods.} \item{callback}{Optional callback function to call for each subisomorphism found. -If provided, the function should accept two arguments: + If provided, the function should accept two arguments: \code{map12} (integer vector mapping vertex IDs from pattern to target, 1-based indexing) and \code{map21} (integer vector mapping vertex IDs from target to pattern, 1-based indexing). -The function should return \code{FALSE} to continue the search or \code{TRUE} to stop it. -If \code{NULL} (the default), all subisomorphisms are collected and returned as a list. -Only supported for \code{method = "vf2"}. + The function should return \code{FALSE} to continue the search or \code{TRUE} to stop it. + If \code{NULL} (the default), all subisomorphisms are collected and returned as a list. + Only supported for \code{method = "vf2"}. \strong{Important limitation:} Callback functions must NOT call any igraph functions (including simple queries like \code{vcount()} or \code{ecount()}). -Doing so will cause R to crash due to reentrancy issues. -Extract any needed graph information before calling the function with a callback, + Doing so will cause R to crash due to reentrancy issues. + Extract any needed graph information before calling the function with a callback, or use collector mode (the default) and process results afterward.} } \value{ If \code{callback} is \code{NULL}, returns a list of vertex sequences, corresponding to all mappings from the pattern graph to the target graph. -If \code{callback} is provided, returns \code{NULL} invisibly. + If \code{callback} is provided, returns \code{NULL} invisibly. } \description{ All isomorphic mappings between a graph and subgraphs of another graph @@ -49,42 +49,42 @@ All isomorphic mappings between a graph and subgraphs of another graph \section{\sQuote{lad} method}{ This is the LAD algorithm by Solnon, see the reference below. -It has the following extra arguments: + It has the following extra arguments: \describe{ \item{domains}{ Matching restrictions. -It must be a list of \code{target} vertex sets, given as numeric vertex IDs or symbolic vertex names. -The length of the list must be \code{vcount(pattern)} and for each vertex in \code{pattern} + It must be a list of \code{target} vertex sets, given as numeric vertex IDs or symbolic vertex names. + The length of the list must be \code{vcount(pattern)} and for each vertex in \code{pattern} it gives the allowed matching vertices in \code{target}. -Defaults to \code{NULL}. -} + Defaults to \code{NULL}. + } \item{induced}{ Logical scalar, whether to search for an induced subgraph. -It is \code{FALSE} by default. -} + It is \code{FALSE} by default. + } \item{time.limit}{ The processor time limit for the computation, in seconds. -It defaults to \code{Inf}, which means no limit. -} + It defaults to \code{Inf}, which means no limit. + } } } \section{\sQuote{vf2} method}{ This method uses the VF2 algorithm by Cordella, Foggia et al., see references below. -It supports vertex and edge colors and have the following extra arguments: + It supports vertex and edge colors and have the following extra arguments: \describe{ \item{vertex.color1, vertex.color2}{ Optional integer vectors giving the colors of the vertices for colored graph isomorphism. -If they are not given, but the graph has a \dQuote{color} vertex attribute, then it will be used. -If you want to ignore these attributes, then supply \code{NULL} for both of these arguments. -See also examples below. -} + If they are not given, but the graph has a \dQuote{color} vertex attribute, then it will be used. + If you want to ignore these attributes, then supply \code{NULL} for both of these arguments. + See also examples below. + } \item{edge.color1, edge.color2}{ Optional integer vectors giving the colors of the edges for edge-colored (sub)graph isomorphism. -If they are not given, but the graph has a \dQuote{color} edge attribute, then it will be used. -If you want to ignore these attributes, then supply \code{NULL} for both of these arguments. -} + If they are not given, but the graph has a \dQuote{color} edge attribute, then it will be used. + If you want to ignore these attributes, then supply \code{NULL} for both of these arguments. + } } } diff --git a/man/tail_of.Rd b/man/tail_of.Rd index c223e227805..d9bb5f20476 100644 --- a/man/tail_of.Rd +++ b/man/tail_of.Rd @@ -16,7 +16,7 @@ A vertex sequence with the tail(s) of the edge(s). } \description{ For undirected graphs, head and tail is not defined. -In this case \code{tail_of()} returns vertices incident to the supplied edges, and \code{head_of()} returns the other end(s) of the edge(s). + In this case \code{tail_of()} returns vertices incident to the supplied edges, and \code{head_of()} returns the other end(s) of the edge(s). } \section{Related documentation in the C library}{ \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_edges}{\code{edges()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_get_eids}{\code{get_eids()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_ecount}{\code{ecount()}} diff --git a/man/tkplot.Rd b/man/tkplot.Rd index 246243c5fff..1e92a1acd43 100644 --- a/man/tkplot.Rd +++ b/man/tkplot.Rd @@ -42,7 +42,7 @@ tk_canvas(tkp.id) \item{canvas.width, canvas.height}{The size of the tkplot drawing area.} \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.} + 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.} @@ -75,33 +75,33 @@ For \code{tk_close()}, \code{tk_fit()}, \code{tk_coords()} and \code{tk_rotate() } \description{ \code{tkplot()} and its companion functions serve as an interactive graph drawing facility. -Not all parameters of the plot can be changed interactively right now though, e.g. the colors of vertices, edges, + Not all parameters of the plot can be changed interactively right now though, e.g. the colors of vertices, edges, and also others have to be pre-defined. } \details{ \code{tkplot()} is an interactive graph drawing facility. -It is not very well developed at this stage, but it should be still useful. + It is not very well developed at this stage, but it should be still useful. It's handling should be quite straightforward most of the time, here are some remarks and hints. There are different popup menus, activated by the right mouse button, for vertices and edges. -Both operate on the current selection + Both operate on the current selection if the vertex/edge under the cursor is part of the selection and operate on the vertex/edge under the cursor if it is not. One selection can be active at a time, either a vertex or an edge selection. -A vertex/edge can be added to a selection by holding the \code{control} key while clicking on it with the left mouse button. -Doing this again deselect the vertex/edge. + A vertex/edge can be added to a selection by holding the \code{control} key while clicking on it with the left mouse button. + Doing this again deselect the vertex/edge. Selections can be made also from the "Select" menu. -The "Select some vertices" dialog allows to give an expression for the vertices to be selected: + The "Select some vertices" dialog allows to give an expression for the vertices to be selected: this can be a list of numeric R expessions separated by commas, like \verb{1,2:10,12,14,15} for example. -Similarly in the "Select some edges" dialog two such lists can be given and all edges connecting a vertex in the first list to one in the second list will be selected. + Similarly in the "Select some edges" dialog two such lists can be given and all edges connecting a vertex in the first list to one in the second list will be selected. In the color dialog a color name like 'orange' or RGB notation can also be used. The \code{tkplot()} command creates a new Tk window with the graphical representation of \code{graph}. -The command returns an integer number, the tkplot ID. -The other commands utilize this ID to be able to query or manipulate the plot. + The command returns an integer number, the tkplot ID. + The other commands utilize this ID to be able to query or manipulate the plot. \code{tk_close()} closes the Tk plot with ID \code{tkp.id}. @@ -115,14 +115,14 @@ if some of these are \code{NULL} the actual physical width od height of the plot \code{tk_postscript()} creates a dialog window for saving the plot in postscript format. \code{tk_canvas()} returns the Tk canvas object that belongs to a graph plot. -The canvas can be directly manipulated then, e.g. labels can be added, it could be saved to a file programmatically, + The canvas can be directly manipulated then, e.g. labels can be added, it could be saved to a file programmatically, etc. See an example below. \code{tk_coords()} returns the coordinates of the vertices in a matrix. -Each row corresponds to one vertex. + Each row corresponds to one vertex. \code{tk_set_coords()} sets the coordinates of the vertices. -A two-column matrix specifies the new positions, with each row corresponding to a single vertex. + A two-column matrix specifies the new positions, with each row corresponding to a single vertex. \code{tk_center()} shifts the figure to the center of its plot window. diff --git a/man/tkplot.reshape.Rd b/man/tkplot.reshape.Rd index 162e1e3bcc6..4578cb054e5 100644 --- a/man/tkplot.reshape.Rd +++ b/man/tkplot.reshape.Rd @@ -12,7 +12,7 @@ tkplot.reshape(tkp.id, newlayout, ..., params) \item{newlayout}{The new layout, see the \code{layout} parameter of tkplot.} \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.} + 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/to_prufer.Rd b/man/to_prufer.Rd index f019acc2e46..19dbc203da1 100644 --- a/man/to_prufer.Rd +++ b/man/to_prufer.Rd @@ -17,9 +17,9 @@ The Prüfer sequence of the graph, represented as a numeric vector of vertex IDs } \details{ The Prüfer sequence of a tree graph with n labeled vertices is a sequence of n-2 numbers, constructed as follows. -If the graph has more than two vertices, find a vertex with degree one, + If the graph has more than two vertices, find a vertex with degree one, remove it from the tree and add the label of the vertex that it was connected to to the sequence. -Repeat until there are only two vertices in the remaining graph. + Repeat until there are only two vertices in the remaining graph. } \section{Related documentation in the C library}{ \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_to_prufer}{\code{to_prufer()}} diff --git a/man/topo_sort.Rd b/man/topo_sort.Rd index 1ad3f903b73..c5d30c39c7e 100644 --- a/man/topo_sort.Rd +++ b/man/topo_sort.Rd @@ -12,10 +12,10 @@ topo_sort(graph, ..., mode = c("out", "all", "in")) \item{...}{These dots are for future extensions and must be empty.} \item{mode}{Specifies how to use the direction of the edges. -For \dQuote{\code{out}}, + For \dQuote{\code{out}}, the sorting order ensures that each node comes before all nodes to which it has edges, so nodes with no incoming edges go first. -For \dQuote{\verb{in}}, it is quite the opposite: each node comes before all nodes from which it receives edges. -Nodes with no outgoing edges go first.} + For \dQuote{\verb{in}}, it is quite the opposite: each node comes before all nodes from which it receives edges. + Nodes with no outgoing edges go first.} } \value{ A vertex sequence (by default, but see the \code{return.vs.es} option of \code{\link[=igraph_options]{igraph_options()}}) containing vertices in topologically sorted order. @@ -26,8 +26,8 @@ where each node comes before all nodes to which it has edges. } \details{ Every DAG has at least one topological sort, and may have many. -This function returns a possible topological sort among them. -If the graph is not acyclic (it has at least one cycle), a partial topological sort is returned and a warning is issued. + This function returns a possible topological sort among them. + If the graph is not acyclic (it has at least one cycle), a partial topological sort is returned and a warning is issued. } \section{Related documentation in the C library}{ \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_topological_sorting}{\code{topological_sorting()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}} diff --git a/man/topological.sort.Rd b/man/topological.sort.Rd index b6bbdb084f0..453b7a8665d 100644 --- a/man/topological.sort.Rd +++ b/man/topological.sort.Rd @@ -10,10 +10,10 @@ topological.sort(graph, mode = c("out", "all", "in")) \item{graph}{The input graph, should be directed} \item{mode}{Specifies how to use the direction of the edges. -For \dQuote{\code{out}}, + For \dQuote{\code{out}}, the sorting order ensures that each node comes before all nodes to which it has edges, so nodes with no incoming edges go first. -For \dQuote{\verb{in}}, it is quite the opposite: each node comes before all nodes from which it receives edges. -Nodes with no outgoing edges go first.} + For \dQuote{\verb{in}}, it is quite the opposite: each node comes before all nodes from which it receives edges. + Nodes with no outgoing edges go first.} } \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/transitive_closure.Rd b/man/transitive_closure.Rd index 088d6756100..644f2ef5cb3 100644 --- a/man/transitive_closure.Rd +++ b/man/transitive_closure.Rd @@ -8,22 +8,22 @@ transitive_closure(graph) } \arguments{ \item{graph}{The input graph. -It can be directed or undirected.} + It can be directed or undirected.} } \value{ A new graph object representing the transitive closure. -The returned graph will have the same directedness as the input. + The returned graph will have the same directedness as the input. } \description{ \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#experimental}{\figure{lifecycle-experimental.svg}{options: alt='[Experimental]'}}}{\strong{[Experimental]}} Computes the transitive closure of a graph. -The resulting graph will have an edge from vertex \eqn{i} to vertex \eqn{j} if \eqn{j} is reachable from \eqn{i} in the original graph. + The resulting graph will have an edge from vertex \eqn{i} to vertex \eqn{j} if \eqn{j} is reachable from \eqn{i} in the original graph. The transitive closure of a graph is a new graph where there is an edge between any two vertices if there is a path between them in the original graph. -For directed graphs, an edge from \eqn{i} to \eqn{j} is added if there is a directed path from \eqn{i} to \eqn{j}. -For undirected graphs, this is equivalent to connecting all vertices that are in the same connected component. + For directed graphs, an edge from \eqn{i} to \eqn{j} is added if there is a directed path from \eqn{i} to \eqn{j}. + For undirected graphs, this is equivalent to connecting all vertices that are in the same connected component. } \section{Related documentation in the C library}{ \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_transitive_closure}{\code{transitive_closure()}} diff --git a/man/transitivity.Rd b/man/transitivity.Rd index 4d338b69dc8..b60eab31c1f 100644 --- a/man/transitivity.Rd +++ b/man/transitivity.Rd @@ -18,54 +18,54 @@ transitivity( \item{graph}{The graph to analyze.} \item{type}{The type of the transitivity to calculate. -Possible values: + Possible values: \describe{ \item{"global"}{ The global transitivity of an undirected graph. -This is simply the ratio of the count of triangles and connected triples in the graph. -In directed graphs, edge directions are ignored. -} + This is simply the ratio of the count of triangles and connected triples in the graph. + In directed graphs, edge directions are ignored. + } \item{"local"}{ The local transitivity of an undirected graph. -It is calculated for each vertex given in the \code{vids} argument. -The local transitivity of a vertex is the ratio of the count of triangles connected to the vertex + It is calculated for each vertex given in the \code{vids} argument. + The local transitivity of a vertex is the ratio of the count of triangles connected to the vertex and the triples centered on the vertex. -In directed graphs, edge directions are ignored. -} + In directed graphs, edge directions are ignored. + } \item{"undirected"}{ This is the same as \code{global}. -} + } \item{"globalundirected"}{ This is the same as \code{global}. -} + } \item{"localundirected"}{ This is the same as \code{local}. -} + } \item{"barrat"}{ The weighted transitivity as defined by A. Barrat. See details below. -} + } \item{"weighted"}{ The same as \code{barrat}. -} + } }} \item{...}{These dots are for future extensions and must be empty.} \item{vids}{The vertex IDs for the local transitivity will be calculated. -This will be ignored for global transitivity types. -The default value is \code{NULL}, in this case all vertices are considered. -It is slightly faster to supply \code{NULL} here than \code{V(graph)}.} + This will be ignored for global transitivity types. + The default value is \code{NULL}, in this case all vertices are considered. + It is slightly faster to supply \code{NULL} here than \code{V(graph)}.} \item{weights}{Optional weights for weighted transitivity. -It is ignored for other transitivity measures. -If it is \code{NULL} (the default) and the graph has a \code{weight} edge attribute, then it is used automatically.} + It is ignored for other transitivity measures. + If it is \code{NULL} (the default) and the graph has a \code{weight} edge attribute, then it is used automatically.} \item{isolates}{Character scalar, for local versions of transitivity, it defines how to treat vertices with degree zero and one. -If it is \sQuote{\code{NaN}} then their local transitivity is reported as \code{NaN} and they are not included in the averaging, + If it is \sQuote{\code{NaN}} then their local transitivity is reported as \code{NaN} and they are not included in the averaging, for the transitivity types that calculate an average. -If there are no vertices with degree two or higher, then the averaging will still result \code{NaN}. -If it is \sQuote{\code{zero}}, then we report 0 transitivity for them, and they are included in the averaging, if an average is calculated. -For the global transitivity, it controls how to handle graphs with no connected triplets: + If there are no vertices with degree two or higher, then the averaging will still result \code{NaN}. + If it is \sQuote{\code{zero}}, then we report 0 transitivity for them, and they are included in the averaging, if an average is calculated. + For the global transitivity, it controls how to handle graphs with no connected triplets: \code{NaN} or zero will be returned according to the respective setting.} } \value{ @@ -75,7 +75,7 @@ For \sQuote{\code{local}} a vector of transitivity scores, one for each vertex i } \description{ Transitivity measures the probability that the adjacent vertices of a vertex are connected. -This is sometimes also called the clustering coefficient. + This is sometimes also called the clustering coefficient. } \details{ Note that there are essentially two classes of transitivity measures, one is a vertex-level, the other a graph level property. @@ -92,7 +92,7 @@ weighted C_i = 1/s_i 1/(k_i-1) sum( (w_ij+w_ih)/2 a_ij a_ih a_jh, j, h)} This formula gives back the normal not-weighted local transitivity if all the edge weights are the same. The \code{barrat} type of transitivity does not work for graphs with multiple and/or loop edges. -If you want to calculate it for a directed graph, call \code{\link[=as_undirected]{as_undirected()}} with the \code{collapse} mode first. + If you want to calculate it for a directed graph, call \code{\link[=as_undirected]{as_undirected()}} with the \code{collapse} mode first. } \section{Related documentation in the C library}{ \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_transitivity_avglocal_undirected}{\code{transitivity_avglocal_undirected()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_transitivity_barrat}{\code{transitivity_barrat()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_transitivity_local_undirected}{\code{transitivity_local_undirected()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_transitivity_undirected}{\code{transitivity_undirected()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_edges}{\code{edges()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_get_eids}{\code{get_eids()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_ecount}{\code{ecount()}} @@ -127,7 +127,7 @@ Analysis: Methods and Applications.} Cambridge: Cambridge University Press. Alain Barrat, Marc Barthelemy, Romualdo Pastor-Satorras, Alessandro Vespignani: The architecture of complex weighted networks, Proc. Natl. Acad. -Sci. USA 101, 3747 (2004) + Sci. USA 101, 3747 (2004) } \seealso{ Other structural.properties: diff --git a/man/triad.census.Rd b/man/triad.census.Rd index a3513dd6d5a..d666484ec90 100644 --- a/man/triad.census.Rd +++ b/man/triad.census.Rd @@ -8,7 +8,7 @@ triad.census(graph) } \arguments{ \item{graph}{The input graph, it should be directed. -An undirected graph results a warning, and undefined results.} + An undirected graph results a warning, and undefined results.} } \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/triad_census.Rd b/man/triad_census.Rd index e6dc7923eee..dc1e6dfdb1e 100644 --- a/man/triad_census.Rd +++ b/man/triad_census.Rd @@ -8,7 +8,7 @@ triad_census(graph) } \arguments{ \item{graph}{The input graph, it should be directed. -An undirected graph results a warning, and undefined results.} + An undirected graph results a warning, and undefined results.} } \value{ A numeric vector, the subgraph counts, in the order given in the above description. @@ -18,26 +18,26 @@ This function counts the different induced subgraphs of three vertices in a grap } \details{ Triad census was defined by David and Leinhardt (see References below). -Every triple of vertices (A, B, C) are classified into the 16 possible states: + Every triple of vertices (A, B, C) are classified into the 16 possible states: \describe{ \item{003}{ A,B,C, the empty graph. -} + } \item{012}{ A->B, C, the graph with a single directed edge. -} + } \item{102}{ A<->B, C, the graph with a mutual connection between two vertices. -} + } \item{021D}{ A<-B->C, the out-star. -} + } \item{021U}{ A->B<-C, the in-star. -} + } \item{021C}{ A->B->C, directed line. -} + } \item{111D}{ A<->B<-C. } @@ -67,7 +67,7 @@ A->B<->C, A<->C. } \item{300}{ A<->B<->C, A<->C, the complete graph. -} + } } This functions uses the RANDESU motif finder algorithm to find and count the subgraphs, see \code{\link[=motifs]{motifs()}}. diff --git a/man/unfold.tree.Rd b/man/unfold.tree.Rd index b888fe76d0f..6d6931fd1d3 100644 --- a/man/unfold.tree.Rd +++ b/man/unfold.tree.Rd @@ -10,11 +10,11 @@ unfold.tree(graph, mode = c("all", "out", "in", "total"), roots) \item{graph}{The input graph, it can be either directed or undirected.} \item{mode}{Character string, defined the types of the paths used for the breadth-first search. -\dQuote{out} follows the outgoing, \dQuote{in} the incoming edges, \dQuote{all} and \dQuote{total} both of them. -This argument is ignored for undirected graphs.} + \dQuote{out} follows the outgoing, \dQuote{in} the incoming edges, \dQuote{all} and \dQuote{total} both of them. + This argument is ignored for undirected graphs.} \item{roots}{A vector giving the vertices from which the breadth-first search is performed. -Typically it contains one vertex per component.} + Typically it contains one vertex per component.} } \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/unfold_tree.Rd b/man/unfold_tree.Rd index 5daa6c7aeb2..d9fe62004a9 100644 --- a/man/unfold_tree.Rd +++ b/man/unfold_tree.Rd @@ -12,21 +12,21 @@ unfold_tree(graph, ..., mode = c("all", "out", "in", "total"), roots) \item{...}{These dots are for future extensions and must be empty.} \item{mode}{Character string, defined the types of the paths used for the breadth-first search. -\dQuote{out} follows the outgoing, \dQuote{in} the incoming edges, \dQuote{all} and \dQuote{total} both of them. -This argument is ignored for undirected graphs.} + \dQuote{out} follows the outgoing, \dQuote{in} the incoming edges, \dQuote{all} and \dQuote{total} both of them. + This argument is ignored for undirected graphs.} \item{roots}{A vector giving the vertices from which the breadth-first search is performed. -Typically it contains one vertex per component.} + Typically it contains one vertex per component.} } \value{ A list with two components: \describe{ \item{tree}{ The result, an \code{igraph} object, a tree or a forest. -} + } \item{vertex_index}{ A numeric vector, it gives a mapping from the vertices of the new graph to the vertices of the old graph. -} + } } } \description{ diff --git a/man/union.Rd b/man/union.Rd index d0b6e81365a..ca0f55b6382 100644 --- a/man/union.Rd +++ b/man/union.Rd @@ -14,9 +14,9 @@ Depends on the function that implements this method. } \description{ This is an S3 generic function. -See \code{methods("union")} for the actual implementations for various S3 classes. -Initially it is implemented for igraph graphs and igraph vertex and edge sequences. -See \code{\link[=union.igraph]{union.igraph()}}, and \code{\link[=union.igraph.vs]{union.igraph.vs()}}. + See \code{methods("union")} for the actual implementations for various S3 classes. + Initially it is implemented for igraph graphs and igraph vertex and edge sequences. + See \code{\link[=union.igraph]{union.igraph()}}, and \code{\link[=union.igraph.vs]{union.igraph.vs()}}. } \seealso{ Other functions for manipulating graph structure: diff --git a/man/union.igraph.Rd b/man/union.igraph.Rd index 7bcb4641cd3..72b860621be 100644 --- a/man/union.igraph.Rd +++ b/man/union.igraph.Rd @@ -17,40 +17,40 @@ \item{\dots}{Graph objects or lists of graph objects.} \item{byname}{A Logical, or the character scalar \code{auto}. -Whether to perform the operation based on symbolic vertex names. -If it is \code{auto}, that means \code{TRUE} if all graphs are named and \code{FALSE} otherwise. -A warning is generated if \code{auto} and some (but not all) graphs are named.} + Whether to perform the operation based on symbolic vertex names. + If it is \code{auto}, that means \code{TRUE} if all graphs are named and \code{FALSE} otherwise. + A warning is generated if \code{auto} and some (but not all) graphs are named.} \item{graph.attr.comb, vertex.attr.comb, edge.attr.comb}{Specification for combining clashing graph, vertex and edge attributes. -\code{vertex.attr.comb} and \code{edge.attr.comb} default to \code{"rename"}; + \code{vertex.attr.comb} and \code{edge.attr.comb} default to \code{"rename"}; \code{graph.attr.comb} defaults to the \code{graph.attr.comb} igraph option (\code{"rename"} unless changed via \code{\link[=igraph_options]{igraph_options()}}). -\code{"rename"} preserves the historical behaviour of appending \verb{_1}, \verb{_2}, ... suffixes. -See \link{igraph-attribute-combination} for the available combiners.} + \code{"rename"} preserves the historical behaviour of appending \verb{_1}, \verb{_2}, ... suffixes. + See \link{igraph-attribute-combination} for the available combiners.} } \value{ A new graph object. } \description{ The union of two or more graphs are created. -The graphs may have identical or overlapping vertex sets. + The graphs may have identical or overlapping vertex sets. } \details{ \code{union()} creates the union of two or more graphs. -Edges which are included in at least one graph will be part of the new graph. -This function can be also used via the \verb{\%u\%} operator. + Edges which are included in at least one graph will be part of the new graph. + This function can be also used via the \verb{\%u\%} operator. If the \code{byname} argument is \code{TRUE} (or \code{auto} and all graphs are named), then the operation is performed on symbolic vertex names instead of the internal numeric vertex IDs. \code{union()} keeps the attributes of all graphs. -All graph, vertex and edge attributes are copied to the result. -By default, if an attribute is present in multiple graphs and would result in a name clash, that attribute is renamed by adding suffixes: + All graph, vertex and edge attributes are copied to the result. + By default, if an attribute is present in multiple graphs and would result in a name clash, that attribute is renamed by adding suffixes: \verb{_1}, \verb{_2}, etc. Pass \code{graph.attr.comb}, \code{vertex.attr.comb} or \code{edge.attr.comb} to combine clashing attributes instead, e.g. by summing or by taking the first non-\code{NA} value. -See \link{igraph-attribute-combination} for the available combiners. + See \link{igraph-attribute-combination} for the available combiners. The \code{name} vertex attribute is treated specially if the operation is performed based on symbolic vertex names. -In this case \code{name} must be present in all graphs, and it is not renamed in the result graph. + In this case \code{name} must be present in all graphs, and it is not renamed in the result graph. An error is generated if some input graphs are directed and others are undirected. } diff --git a/man/union.igraph.es.Rd b/man/union.igraph.es.Rd index 1f4234223d9..ef3ccd012f1 100644 --- a/man/union.igraph.es.Rd +++ b/man/union.igraph.es.Rd @@ -17,8 +17,8 @@ Union of edge sequences } \details{ They must belong to the same graph. -Note that this function has \sQuote{set} semantics and the multiplicity of edges is lost in the result. -(This is to match the behavior of the based \code{unique} function.) + Note that this function has \sQuote{set} semantics and the multiplicity of edges is lost in the result. + (This is to match the behavior of the based \code{unique} function.) } \examples{ g <- make_(ring(10), with_vertex_(name = LETTERS[1:10])) diff --git a/man/union.igraph.vs.Rd b/man/union.igraph.vs.Rd index f45c1190701..dd19f5b4a41 100644 --- a/man/union.igraph.vs.Rd +++ b/man/union.igraph.vs.Rd @@ -17,8 +17,8 @@ Union of vertex sequences } \details{ They must belong to the same graph. -Note that this function has \sQuote{set} semantics and the multiplicity of vertices is lost in the result. -(This is to match the behavior of the based \code{unique} function.) + Note that this function has \sQuote{set} semantics and the multiplicity of vertices is lost in the result. + (This is to match the behavior of the based \code{unique} function.) } \examples{ g <- make_(ring(10), with_vertex_(name = LETTERS[1:10])) diff --git a/man/unique.igraph.es.Rd b/man/unique.igraph.es.Rd index 9b7623cbc62..cef12b04426 100644 --- a/man/unique.igraph.es.Rd +++ b/man/unique.igraph.es.Rd @@ -10,8 +10,8 @@ \item{x}{An edge sequence.} \item{incomparables}{a vector of values that cannot be compared. -Passed to base function \code{duplicated}. -See details there.} + Passed to base function \code{duplicated}. + See details there.} \item{...}{Passed to base function \code{duplicated()}.} } diff --git a/man/unique.igraph.vs.Rd b/man/unique.igraph.vs.Rd index e404d94f6ca..f893e65e24a 100644 --- a/man/unique.igraph.vs.Rd +++ b/man/unique.igraph.vs.Rd @@ -10,8 +10,8 @@ \item{x}{A vertex sequence.} \item{incomparables}{a vector of values that cannot be compared. -Passed to base function \code{duplicated}. -See details there.} + Passed to base function \code{duplicated}. + See details there.} \item{...}{Passed to base function \code{duplicated()}.} } diff --git a/man/upgrade_graph.Rd b/man/upgrade_graph.Rd index 3a67456d600..8edcb29508c 100644 --- a/man/upgrade_graph.Rd +++ b/man/upgrade_graph.Rd @@ -14,7 +14,7 @@ The graph in the current format. } \description{ igraph's internal data representation changes sometimes between versions. -This means that it is not possible to use igraph objects that were created (and possibly saved to a file) with an older igraph version. + This means that it is not possible to use igraph objects that were created (and possibly saved to a file) with an older igraph version. } \details{ \code{\link[=graph_version]{graph_version()}} queries the current data format, diff --git a/man/vertex.Rd b/man/vertex.Rd index 1375b1e6217..78444df70fb 100644 --- a/man/vertex.Rd +++ b/man/vertex.Rd @@ -22,7 +22,7 @@ This is a helper function that simplifies adding and deleting vertices to/from g \code{vertices()} is an alias for \code{vertex()}. When adding vertices via \code{+}, all unnamed arguments are interpreted as vertex names of the new vertices. -Named arguments are interpreted as vertex attributes for the new vertices. + Named arguments are interpreted as vertex attributes for the new vertices. When deleting vertices via \code{-}, all arguments of \code{vertex()} (or \code{vertices()}) are concatenated via \code{c()} and passed to \code{\link[=delete_vertices]{delete_vertices()}}. diff --git a/man/vertex.connectivity.Rd b/man/vertex.connectivity.Rd index 5d23ee3bc4e..e2b3121cdeb 100644 --- a/man/vertex.connectivity.Rd +++ b/man/vertex.connectivity.Rd @@ -12,11 +12,11 @@ vertex.connectivity(graph, source = NULL, target = NULL, checks = TRUE) \item{target}{The ID of the target vertex, for \code{vertex_connectivity()} it can be \code{NULL}, see details below.} \item{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 degree is one then the vertex connectivity is also one. -It is a good idea to perform these checks, as they can be done quickly compared to the connectivity calculation itself. -They were suggested by Peter McMahan, thanks Peter.} + 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 degree is one then the vertex connectivity is also one. + It is a good idea to perform these checks, as they can be done quickly compared to the connectivity calculation itself. + They were suggested by Peter McMahan, thanks Peter.} } \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/vertex.shape.pie.Rd b/man/vertex.shape.pie.Rd index 9dc5b0ac431..b106247bbaf 100644 --- a/man/vertex.shape.pie.Rd +++ b/man/vertex.shape.pie.Rd @@ -5,30 +5,30 @@ \title{Using pie charts as vertices in graph plots} \description{ More complex vertex images can be used to express addtional information about vertices. -E.g. pie charts can be used as vertices, to denote vertex classes, fuzzy classification of vertices, etc. + E.g. pie charts can be used as vertices, to denote vertex classes, fuzzy classification of vertices, etc. } \details{ The vertex shape \sQuote{pie} makes igraph draw a pie chart for every vertex. -There are some extra graphical vertex parameters that specify how the pie charts will look like: + There are some extra graphical vertex parameters that specify how the pie charts will look like: \describe{ \item{pie}{ Numeric vector, gives the sizes of the pie slices. -} + } \item{pie.color}{ A list of color vectors to use for the pies. -If it is a list of a single vector, then this is used for all pies. -It the color vector is shorter than the number of areas in a pie, then it is recycled. -} + If it is a list of a single vector, then this is used for all pies. + It the color vector is shorter than the number of areas in a pie, then it is recycled. + } \item{pie.angle}{ The slope of shading lines, given as an angle in degrees (counter-clockwise). -} + } \item{pie.density}{ The density of the shading lines, in lines per inch. -Non-positive values inhibit the drawing of shading lines. -} + Non-positive values inhibit the drawing of shading lines. + } \item{pie.lty}{ The line type of the border of the slices. -} + } } } \examples{ diff --git a/man/vertex.shapes.Rd b/man/vertex.shapes.Rd index c3474628d25..b8e3a26fe05 100644 --- a/man/vertex.shapes.Rd +++ b/man/vertex.shapes.Rd @@ -8,7 +8,7 @@ vertex.shapes(shape = NULL) } \arguments{ \item{shape}{Character scalar, name of a vertex shape. -If it is \code{NULL} for \code{shapes()}, then the names of all defined vertex shapes are returned.} + If it is \code{NULL} for \code{shapes()}, then the names of all defined vertex shapes are returned.} } \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/vertex_attr-set.Rd b/man/vertex_attr-set.Rd index 275bf3e7d08..596d970801c 100644 --- a/man/vertex_attr-set.Rd +++ b/man/vertex_attr-set.Rd @@ -11,10 +11,10 @@ vertex_attr(graph, name, index = NULL) <- value \item{graph}{The graph.} \item{name}{The name of the vertex attribute to set. -If missing, then \code{value} must be a named list, and its entries are set as vertex attributes.} + If missing, then \code{value} must be a named list, and its entries are set as vertex attributes.} \item{index}{An optional vertex sequence to set the attributes of a subset of vertices. -The default \code{NULL} selects all vertices.} + The default \code{NULL} selects all vertices.} \item{value}{The new value of the attribute(s) for all (or \code{index}) vertices.} } diff --git a/man/vertex_attr.Rd b/man/vertex_attr.Rd index 6c2ed468304..403fc74751c 100644 --- a/man/vertex_attr.Rd +++ b/man/vertex_attr.Rd @@ -11,10 +11,10 @@ vertex_attr(graph, name, index = NULL) \item{graph}{The graph.} \item{name}{Name of the attribute to query. -If missing, then all vertex attributes are returned in a list.} + If missing, then all vertex attributes are returned in a list.} \item{index}{An optional vertex sequence to query the attribute only for these vertices. -The default \code{NULL} selects all vertices.} + The default \code{NULL} selects all vertices.} } \value{ The value of the vertex attribute, or the list of all vertex attributes, if \code{name} is missing. diff --git a/man/vertex_connectivity.Rd b/man/vertex_connectivity.Rd index c6a45602846..378dd783a82 100644 --- a/man/vertex_connectivity.Rd +++ b/man/vertex_connectivity.Rd @@ -21,14 +21,14 @@ vertex_disjoint_paths(graph, source = NULL, target = NULL) \item{target}{The ID of the target vertex, for \code{vertex_connectivity()} it can be \code{NULL}, see details below.} \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.} + 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) connected then the connectivity is obviously zero. -Otherwise if the minimum degree is one then the vertex connectivity is also one. -It is a good idea to perform these checks, as they can be done quickly compared to the connectivity calculation itself. -They were suggested by Peter McMahan, thanks Peter.} + 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 degree is one then the vertex connectivity is also one. + It is a good idea to perform these checks, as they can be done quickly compared to the connectivity calculation itself. + They were suggested by Peter McMahan, thanks Peter.} } \value{ A scalar real value. @@ -38,22 +38,22 @@ The vertex connectivity of a graph or two vertices, this is recently also called } \details{ The vertex connectivity of two vertices (\code{source} and \code{target}) in a graph is the minimum number of vertices that must be deleted to eliminate all (directed) paths from \code{source} to \code{target}. -\code{vertex_connectivity()} calculates this quantity if both the \code{source} and \code{target} arguments are given and they're not \code{NULL}. + \code{vertex_connectivity()} calculates this quantity if both the \code{source} and \code{target} arguments are given and they're not \code{NULL}. The vertex connectivity of a pair is the same as the number of different (i.e. node-independent) paths from source to target, assuming no direct edges between them. The vertex connectivity of a graph is the minimum vertex connectivity of all (ordered) pairs of vertices in the graph. -In other words this is the minimum number of vertices needed to remove to make the graph not strongly connected. -(If the graph is not strongly connected then this is zero.) -\code{vertex_connectivity()} calculates this quantity if neither the \code{source} nor \code{target} arguments are given. -(I.e. they are both \code{NULL}.) + In other words this is the minimum number of vertices needed to remove to make the graph not strongly connected. + (If the graph is not strongly connected then this is zero.) + \code{vertex_connectivity()} calculates this quantity if neither the \code{source} nor \code{target} arguments are given. + (I.e. they are both \code{NULL}.) A set of vertex disjoint directed paths from \code{source} to \code{vertex} is a set of directed paths between them whose vertices do not contain common vertices (apart from \code{source} and \code{target}). -The maximum number of vertex disjoint paths between two vertices is the same as their vertex connectivity in most cases (if the two vertices are not connected by an edge). + The maximum number of vertex disjoint paths between two vertices is the same as their vertex connectivity in most cases (if the two vertices are not connected by an edge). The cohesion of a graph (as defined by White and Harary, see references), is the vertex connectivity of the graph. -This is calculated by \code{cohesion()}. + This is calculated by \code{cohesion()}. These three functions essentially calculate the same measure(s), more precisely \code{vertex_connectivity()} is the most general, the other two are included only for the ease of using more descriptive function names. @@ -81,7 +81,7 @@ cohesion(g) \references{ White, Douglas R and Frank Harary 2001. The Cohesiveness of Blocks In Social Networks: Node Connectivity and Conditional Density. -\emph{Sociological Methodology} 31 (1) : 305-359. + \emph{Sociological Methodology} 31 (1) : 305-359. } \seealso{ Other flow: diff --git a/man/voronoi_cells.Rd b/man/voronoi_cells.Rd index 30789b8aafe..5574f044d44 100644 --- a/man/voronoi_cells.Rd +++ b/man/voronoi_cells.Rd @@ -21,24 +21,24 @@ voronoi_cells( \item{...}{These dots are for future extensions and must be empty.} \item{weights}{Possibly a numeric vector giving edge weights. -If this is \code{NULL} and the graph has a \code{weight} edge attribute, then the attribute is used. -If this is \code{NA} then no weights are used (even if the graph has a \code{weight} attribute). -In a weighted graph, the length of a path is the sum of the weights of its constituent edges.} + If this is \code{NULL} and the graph has a \code{weight} edge attribute, then the attribute is used. + If this is \code{NA} then no weights are used (even if the graph has a \code{weight} attribute). + In a weighted graph, the length of a path is the sum of the weights of its constituent edges.} \item{mode}{Character string. -In directed graphs, whether to compute distances from generator vertices to other vertices (\code{"out"}), + In directed graphs, whether to compute distances from generator vertices to other vertices (\code{"out"}), to generator vertices from other vertices (\code{"in"}), or ignore edge directions entirely (\code{"all"}). -Ignored in undirected graphs.} + Ignored in undirected graphs.} \item{tiebreaker}{Character string that specifies what to do when a vertex is at the same distance from multiple generators. -\code{"random"} assigns a minimal-distance generator randomly, \code{"first"} takes the first one, and \code{"last"} takes the last one.} + \code{"random"} assigns a minimal-distance generator randomly, \code{"first"} takes the first one, and \code{"last"} takes the last one.} } \value{ A named list with two components: \describe{ \item{membership}{ numeric vector giving the cluster ID to which each vertex belongs. -} + } \item{distances}{ numeric vector giving the distance of each vertex from its generator } @@ -48,7 +48,7 @@ numeric vector giving the distance of each vertex from its generator \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#experimental}{\figure{lifecycle-experimental.svg}{options: alt='[Experimental]'}}}{\strong{[Experimental]}} This function partitions the vertices of a graph based on a set of generator vertices. -Each vertex is assigned to the generator vertex from (or to) which it is closest. + Each vertex is assigned to the generator vertex from (or to) which it is closest. \code{\link[=groups]{groups()}} may be used on the output of this function. } diff --git a/man/walktrap.community.Rd b/man/walktrap.community.Rd index a9949a4a019..8be68365683 100644 --- a/man/walktrap.community.Rd +++ b/man/walktrap.community.Rd @@ -15,22 +15,22 @@ walktrap.community( } \arguments{ \item{graph}{The input graph. -Edge directions are ignored in directed graphs.} + Edge directions are ignored in directed graphs.} \item{weights}{The weights of the edges. -It must be a positive numeric vector, \code{NULL} or \code{NA}. -If it is \code{NULL} and the input graph has a \sQuote{weight} edge attribute, then that attribute will be used. -If \code{NULL} and no such attribute is present, then the edges will have equal weights. -Set this to \code{NA} if the graph was a \sQuote{weight} edge attribute, but you don't want to use it for community detection. -Larger edge weights increase the probability that an edge is selected by the random walker. -In other words, larger edge weights correspond to stronger connections.} + It must be a positive numeric vector, \code{NULL} or \code{NA}. + If it is \code{NULL} and the input graph has a \sQuote{weight} edge attribute, then that attribute will be used. + If \code{NULL} and no such attribute is present, then the edges will have equal weights. + Set this to \code{NA} if the graph was a \sQuote{weight} edge attribute, but you don't want to use it for community detection. + Larger edge weights increase the probability that an edge is selected by the random walker. + In other words, larger edge weights correspond to stronger connections.} \item{steps}{The length of the random walks to perform.} \item{merges}{Logical, whether to include the merge matrix in the result.} \item{modularity}{Logical, whether to include the vector of the modularity scores in the result. -If the \code{membership} argument is true, then it will always be calculated.} + If the \code{membership} argument is true, then it will always be calculated.} \item{membership}{Logical, whether to calculate the membership vector for the split corresponding to the highest modularity value.} } diff --git a/man/weighted_cliques.Rd b/man/weighted_cliques.Rd index d88a98cb283..885595db2ce 100644 --- a/man/weighted_cliques.Rd +++ b/man/weighted_cliques.Rd @@ -19,34 +19,34 @@ weighted_cliques( \item{...}{These dots are for future extensions and must be empty.} \item{vertex.weights}{Vertex weight vector. -If the graph has a \code{weight} vertex attribute, then this is used by default. -If the graph does not have a \code{weight} vertex attribute and this argument is \code{NULL}, + If the graph has a \code{weight} vertex attribute, then this is used by default. + If the graph does not have a \code{weight} vertex attribute and this argument is \code{NULL}, then every vertex is assumed to have a weight of 1. Note that the current implementation of the weighted clique finder supports positive integer weights only.} \item{min.weight}{Numeric constant, lower limit on the weight of the cliques to find. -\code{NULL} means no limit, i.e. it is the same as 0.} + \code{NULL} means no limit, i.e. it is the same as 0.} \item{max.weight}{Numeric constant, upper limit on the weight of the cliques to find. -\code{NULL} means no limit.} + \code{NULL} means no limit.} \item{maximal}{Specifies whether to look for all weighted cliques (\code{FALSE}) or only the maximal ones (\code{TRUE}).} } \value{ \code{weighted_cliques()} and \code{largest_weighted_cliques()} return a list containing numeric vectors of vertex IDs. -Each list element is a weighted clique, i.e. a vertex sequence of class \link[=V]{igraph.vs}. + Each list element is a weighted clique, i.e. a vertex sequence of class \link[=V]{igraph.vs}. \code{weighted_clique_num()} returns an integer scalar. } \description{ These functions find all, the largest or all the maximal weighted cliques in an undirected graph. -The weight of a clique is the sum of the weights of its vertices. + The weight of a clique is the sum of the weights of its vertices. } \details{ \code{weighted_cliques()} finds all complete subgraphs in the input graph, obeying the weight limitations given in the \code{min} and \code{max} arguments. \code{largest_weighted_cliques()} finds all largest weighted cliques in the input graph. -A clique is largest if there is no other clique whose total weight is larger than the weight of this clique. + A clique is largest if there is no other clique whose total weight is larger than the weight of this clique. \code{weighted_clique_num()} calculates the weight of the largest weighted clique(s). } diff --git a/man/which_multiple.Rd b/man/which_multiple.Rd index 6f7a2ec002a..d9ff4fa4c96 100644 --- a/man/which_multiple.Rd +++ b/man/which_multiple.Rd @@ -25,18 +25,18 @@ count_loops(graph) \item{graph}{The input graph.} \item{eids}{The edges to which the query is restricted. -The default \code{NULL} selects all edges.} + The default \code{NULL} selects all edges.} } \value{ \code{any_loop()} and \code{any_multiple()} return a Logical. -\code{which_loop()} and \code{which_multiple()} return a logical vector. -\code{count_loops()} returns a numeric scalar with the total number of loop edges. -\code{count_multiple()} returns a numeric vector. + \code{which_loop()} and \code{which_multiple()} return a logical vector. + \code{count_loops()} returns a numeric scalar with the total number of loop edges. + \code{count_multiple()} returns a numeric vector. } \description{ A loop edge is an edge from a vertex to itself. -An edge is a multiple edge if it has exactly the same head and tail vertices as another edge. -A graph without multiple and loop edges is called a simple graph. + An edge is a multiple edge if it has exactly the same head and tail vertices as another edge. + A graph without multiple and loop edges is called a simple graph. } \details{ \code{any_loop()} decides whether the graph has any loop edges. @@ -52,8 +52,8 @@ A graph without multiple and loop edges is called a simple graph. \code{count_multiple()} counts the multiplicity of each edge of a graph. Note that the semantics for \code{which_multiple()} and \code{count_multiple()} is different. -\code{which_multiple()} gives \code{TRUE} for all occurrences of a multiple edge except for one. -I.e. if there are three \code{i-j} edges in the graph then \code{which_multiple()} returns \code{TRUE} for only two of them + \code{which_multiple()} gives \code{TRUE} for all occurrences of a multiple edge except for one. + I.e. if there are three \code{i-j} edges in the graph then \code{which_multiple()} returns \code{TRUE} for only two of them while \code{count_multiple()} returns \sQuote{3} for all three. See the examples for getting rid of multiple edges while keeping their original multiplicity as an edge attribute. diff --git a/man/which_mutual.Rd b/man/which_mutual.Rd index e663f7ff24e..4b1a8e10526 100644 --- a/man/which_mutual.Rd +++ b/man/which_mutual.Rd @@ -10,7 +10,7 @@ which_mutual(graph, eids = NULL, ..., loops = TRUE) \item{graph}{The input graph.} \item{eids}{Edge sequence, the edges that will be probed. -The default \code{NULL} includes all edges in the order of their IDs.} + The default \code{NULL} includes all edges in the order of their IDs.} \item{...}{These dots are for future extensions and must be empty.} diff --git a/man/with_edge_.Rd b/man/with_edge_.Rd index b56a3e06a7e..2200e022623 100644 --- a/man/with_edge_.Rd +++ b/man/with_edge_.Rd @@ -8,7 +8,7 @@ with_edge_(...) } \arguments{ \item{...}{The attributes to add. -They must be named.} + They must be named.} } \description{ Constructor modifier to add edge attributes diff --git a/man/with_graph_.Rd b/man/with_graph_.Rd index 0e9352b794f..a7ebe38026e 100644 --- a/man/with_graph_.Rd +++ b/man/with_graph_.Rd @@ -8,7 +8,7 @@ with_graph_(...) } \arguments{ \item{...}{The attributes to add. -They must be named.} + They must be named.} } \description{ Constructor modifier to add graph attributes diff --git a/man/with_vertex_.Rd b/man/with_vertex_.Rd index 80a015a8f99..9f6ad1d1a2e 100644 --- a/man/with_vertex_.Rd +++ b/man/with_vertex_.Rd @@ -8,7 +8,7 @@ with_vertex_(...) } \arguments{ \item{...}{The attributes to add. -They must be named.} + They must be named.} } \description{ Constructor modifier to add vertex attributes diff --git a/man/write.graph.Rd b/man/write.graph.Rd index e0ee7878d4e..2791f554ed6 100644 --- a/man/write.graph.Rd +++ b/man/write.graph.Rd @@ -18,8 +18,8 @@ write.graph( \item{file}{A connection or a string giving the file name to write the graph to.} \item{format}{Character string giving the file format. -Right now \code{pajek}, \code{graphml}, \code{dot}, \code{gml}, \code{edgelist}, \code{lgl}, \code{ncol}, \code{leda} and \code{dimacs} are implemented. -As of igraph 0.4 this argument is case insensitive.} + Right now \code{pajek}, \code{graphml}, \code{dot}, \code{gml}, \code{edgelist}, \code{lgl}, \code{ncol}, \code{leda} and \code{dimacs} are implemented. + As of igraph 0.4 this argument is case insensitive.} \item{...}{Other, format specific arguments, see below.} } diff --git a/man/write_graph.Rd b/man/write_graph.Rd index e129d70ced7..d851f355f8e 100644 --- a/man/write_graph.Rd +++ b/man/write_graph.Rd @@ -18,8 +18,8 @@ write_graph( \item{file}{A connection or a string giving the file name to write the graph to.} \item{format}{Character string giving the file format. -Right now \code{pajek}, \code{graphml}, \code{dot}, \code{gml}, \code{edgelist}, \code{lgl}, \code{ncol}, \code{leda} and \code{dimacs} are implemented. -As of igraph 0.4 this argument is case insensitive.} + Right now \code{pajek}, \code{graphml}, \code{dot}, \code{gml}, \code{edgelist}, \code{lgl}, \code{ncol}, \code{leda} and \code{dimacs} are implemented. + As of igraph 0.4 this argument is case insensitive.} \item{\dots}{Other, format specific arguments, see below.} } @@ -28,69 +28,69 @@ A `NULL``, invisibly. } \description{ \code{write_graph()} is a general function for exporting graphs to foreign file formats. -The recommended formats for data exchange are GraphML and GML. + The recommended formats for data exchange are GraphML and GML. } \section{Edge list format}{ The \code{edgelist} format is a simple text file, with one edge per line, the two zero-based numerical vertex IDs separated by a space character. -Note that vertices are indexed starting with zero. -The file is sorted by the first and the second column. -This format has no additional arguments. + Note that vertices are indexed starting with zero. + The file is sorted by the first and the second column. + This format has no additional arguments. } \section{NCOL format}{ This format is a plain text edge list in which vertices are referred to by name rather than numerical ID. -Edge weights may be optionally written. -Additional parameters: + Edge weights may be optionally written. + Additional parameters: \describe{ \item{names}{ The name of a vertex attribute to take vertex names from or \code{NULL} to use zero-based numerical IDs. -} + } \item{weights}{ The name of an edge attribute to take edge weights from or \code{NULL} to omit edge weights. -} + } } } \section{Pajek format}{ The \code{pajek} format is provided for interoperability with the Pajek software only. -Since the format does not have a formal specification, it is not recommended for general data exchange or archival. + Since the format does not have a formal specification, it is not recommended for general data exchange or archival. } \section{LGL format}{ The .lgl format is used by the Large Graph Layout visualization software (\url{https://lgl.sourceforge.net}), it can describe undirected optionally weighted graphs. -\describe{ + \describe{ \item{names}{The name of a vertex attribute to use for vertex names, or NULL to use numeric IDs.} \item{weights}{The name of an edge attribute to use for edge weights, or NULL to omit weights.} \item{isolates}{Logical, whether to include isolated vertices in the file. -Default is FALSE.} + Default is FALSE.} } } \section{DIMACS format}{ This is a line-oriented text file (ASCII) format. -The first character of each line defines the type of the line. -If the first character is c the line is a comment line and it is ignored. -There is one problem line (p in the file), it must appear before any node and arc descriptor lines. -The problem line has three fields separated by spaces: the problem type (max or edge), the number of vertices, + The first character of each line defines the type of the line. + If the first character is c the line is a comment line and it is ignored. + There is one problem line (p in the file), it must appear before any node and arc descriptor lines. + The problem line has three fields separated by spaces: the problem type (max or edge), the number of vertices, and number of edges in the graph. -In MAX problems, exactly two node identification lines are expected (n), one for the source, and one for the target vertex. -These have two fields: the ID of the vertex and the type of the vertex, either s ( = source) or t ( = target). -Arc lines start with a and have three fields: the source vertex, the target vertex and the edge capacity. -In EDGE problems, there may be a node line (n) for each node. -It specifies the node index and an integer node label. -Nodes for which no explicit label was specified will use their index as label. -In EDGE problems, each edge is specified as an edge line (e). -\describe{ + In MAX problems, exactly two node identification lines are expected (n), one for the source, and one for the target vertex. + These have two fields: the ID of the vertex and the type of the vertex, either s ( = source) or t ( = target). + Arc lines start with a and have three fields: the source vertex, the target vertex and the edge capacity. + In EDGE problems, there may be a node line (n) for each node. + It specifies the node index and an integer node label. + Nodes for which no explicit label was specified will use their index as label. + In EDGE problems, each edge is specified as an edge line (e). + \describe{ \item{source}{Numeric ID of the source vertex.} \item{target}{Numeric ID of the target vertex.} \item{capacity}{The name of an edge attribute to use for edge capacities, @@ -101,7 +101,7 @@ or NULL to use the "capacity" attribute if it exists.} \section{GML format}{ GML is a quite general textual format. -\describe{ + \describe{ \item{ID}{Optional numeric vertex IDs to use.} \item{creator}{Optional string specifying the creator of the file.} } @@ -110,11 +110,11 @@ GML is a quite general textual format. \section{GraphML format}{ GraphML is an XML-based file format for representing various types of graphs. -When a numerical attribute value is NaN, it will be omitted from the file. -This function assumes that non-ASCII characters in attribute names and string attribute values are UTF-8 encoded. -If this is not the case, the resulting XML file will be invalid. -Control characters, i.e. character codes up to and including 31 (with the exception of tab, cr and lf), are not allowed. -\describe{ + When a numerical attribute value is NaN, it will be omitted from the file. + This function assumes that non-ASCII characters in attribute names and string attribute values are UTF-8 encoded. + If this is not the case, the resulting XML file will be invalid. + Control characters, i.e. character codes up to and including 31 (with the exception of tab, cr and lf), are not allowed. + \describe{ \item{prefixAttr}{Logical, whether to prefix attribute names to ensure uniqueness across vertex/edge/graph attributes. Default is TRUE.} } @@ -123,11 +123,11 @@ uniqueness across vertex/edge/graph attributes. Default is TRUE.} \section{LEDA format}{ This function writes a graph to an output stream in LEDA format. -See \url{https://www.algorithmic-solutions.info/leda_guide/graphs/leda_native_graph_fileformat.html}. -The support for the LEDA format is very basic at the moment; + See \url{https://www.algorithmic-solutions.info/leda_guide/graphs/leda_native_graph_fileformat.html}. + The support for the LEDA format is very basic at the moment; igraph writes only the LEDA graph section which supports one selected vertex and edge attribute and no layout information or visual attributes. -\describe{ + \describe{ \item{vertex.attr}{Name of vertex attribute to include in the file.} \item{edge.attr}{Name of edge attribute to include in the file.} } @@ -136,10 +136,10 @@ which supports one selected vertex and edge attribute and no layout information \section{DOT format}{ DOT is the format used by the widely known GraphViz software, see \url{https://www.graphviz.org} for details. -The grammar of the DOT format can be found here: \url{https://www.graphviz.org/doc/info/lang.html}. -This is only a preliminary implementation, no visualization information is written. -This format is meant solely for interoperability with Graphviz. -It is not recommended for data exchange or archival. + The grammar of the DOT format can be found here: \url{https://www.graphviz.org/doc/info/lang.html}. + This is only a preliminary implementation, no visualization information is written. + This format is meant solely for interoperability with Graphviz. + It is not recommended for data exchange or archival. } \section{Related documentation in the C library}{