Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion R/adjacency.R
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ graph.adjacency <- function(
#' edge attribute named by the `weighted` argument. If it is `TRUE`
#' then a weighted graph is created and the name of the edge attribute will be
#' `weight`. See also details below.
#' @param diag Logical scalar, whether to include the diagonal of the matrix in
#' @param diag Logical, whether to include the diagonal of the matrix in
#' the calculation. If this is `FALSE` then the diagonal is zerod out
#' first.
#' @param add.colnames Character scalar, whether to add the column names as
Expand Down
4 changes: 2 additions & 2 deletions R/assortativity.R
Original file line number Diff line number Diff line change
Expand Up @@ -130,14 +130,14 @@ assortativity.degree <- function(graph, directed = TRUE) {
#' This
#' argument is ignored (with a warning) if it is not `NULL` and undirected
#' assortativity coefficient is being calculated.
#' @param directed Logical scalar, whether to consider edge directions for
#' @param directed Logical, whether to consider edge directions for
#' directed graphs.
#' This argument is ignored for undirected graphs.
#' Supply
#' `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.
#' @param normalized Boolean, whether to compute the normalized assortativity.
#' @param 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.
Expand Down
2 changes: 1 addition & 1 deletion R/bipartite.R
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ bipartite.mapping <- function(graph) {
#' one projection is requested in argument `which`.
#' @param which A character scalar to specify which projection(s) to calculate.
#' The default is to calculate both.
#' @param remove.type Logical scalar, whether to remove the `type` vertex
#' @param remove.type Logical, whether to remove the `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
Expand Down
22 changes: 11 additions & 11 deletions R/centrality.R
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ betweenness.estimate <- estimate_betweenness
#' betweenness. If the graph has a `weight` edge attribute, then this is
#' used by default. Weights are used to calculate weighted shortest paths,
#' so they are interpreted as distances.
#' @param normalized Logical scalar, whether to normalize the betweenness
#' @param normalized Logical, whether to normalize the betweenness
#' scores. If `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,
Expand Down Expand Up @@ -540,7 +540,7 @@ edge.betweenness.estimate <- estimate_edge_betweenness
#' *to* a vertex, \dQuote{out} measures paths *from* a vertex,
#' *all* uses undirected paths. This argument is ignored for undirected
#' graphs.
#' @param normalized Logical scalar, whether to calculate the normalized
#' @param 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.
Expand Down Expand Up @@ -854,7 +854,7 @@ arpack_defaults <- function() {
#' \dQuote{input matrix}. (The input matrix is never given explicitly.) The
#' second argument is `extra`.
#' @param extra Extra argument to supply to `func`.
#' @param sym Logical scalar, whether the input matrix is symmetric. Always
#' @param sym Logical, whether the input matrix is symmetric. Always
#' supply `TRUE` here if it is, since it can speed up the computation.
#' @param options Options to ARPACK, a named list to overwrite some of the
#' default option values. See details below.
Expand Down Expand Up @@ -1041,7 +1041,7 @@ arpack.unpack.complex <- function(vectors, values, nev) {
#' effectively means that the measure can only be calculated for small graphs.
#'
#' @param graph The input graph. It will be treated as undirected.
#' @param diag Boolean scalar, whether to include the diagonal of the adjacency
#' @param diag Logical, whether to include the diagonal of the adjacency
#' matrix in the analysis. Giving `FALSE` here effectively eliminates the
#' loops edges from the graph before the calculation.
#' @return A numeric vector, the subgraph centrality scores of the vertices.
Expand Down Expand Up @@ -1239,7 +1239,7 @@ eigen_defaults <- function() {
#' computation, see [arpack()] for more about ARPACK in igraph.
#'
#' @param graph Graph to be analyzed.
#' @param directed Logical scalar, whether to consider direction of the edges
#' @param directed Logical, whether to consider direction of the edges
#' in directed graphs. It is ignored for undirected graphs.
#' @param scale `r lifecycle::badge("deprecated")` Normalization will always take
#' place.
Expand Down Expand Up @@ -1441,7 +1441,7 @@ diversity <- function(graph, weights = NULL, vids = V(graph)) {
#' scores are the same as authority scores.
#'
#' @param graph The input graph.
#' @param scale Logical scalar, whether to scale the result to have a maximum
#' @param 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.
#' @param weights Optional positive weight vector for calculating weighted
Expand Down Expand Up @@ -1539,7 +1539,7 @@ authority_score <- function(
#' @title Kleinberg's hub centrality scores.
#' @rdname hub_score
#' @param graph The input graph.
#' @param scale Logical scalar, whether to scale the result to have a maximum
#' @param 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.
#' @param weights Optional positive weight vector for calculating weighted
Expand Down Expand Up @@ -1707,7 +1707,7 @@ page_rank <- function(
#' the edge directions only, \dQuote{in} traverses the edges in reverse, while
#' \dQuote{all} ignores edge directions. This argument is ignored for undirected
#' graphs.
#' @param normalized Logical scalar, whether to calculate the normalized
#' @param 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.
Expand Down Expand Up @@ -1874,7 +1874,7 @@ bonpow.sparse <- function(
#' @param graph the input graph.
#' @param nodes vertex sequence indicating which vertices are to be included in
#' the calculation. By default, all vertices are included.
#' @param loops boolean indicating whether or not the diagonal should be
#' @param loops Logical indicating whether or not the diagonal should be
#' treated as valid data. Set this true if and only if the data can contain
#' loops. `loops` is `FALSE` by default.
#' @param exponent exponent (decay rate) for the Bonacich power centrality
Expand All @@ -1883,7 +1883,7 @@ bonpow.sparse <- function(
#' 1.
#' @param tol tolerance for near-singularities during matrix inversion (see
#' [solve()])
#' @param sparse Logical scalar, whether to use sparse matrices for the
#' @param sparse Logical, whether to use sparse matrices for the
#' calculation. The \sQuote{Matrix} package is required for sparse matrix
#' support
#' @inheritParams as_adjacency_matrix
Expand Down Expand Up @@ -2069,7 +2069,7 @@ alpha.centrality.sparse <- function(
#' @inheritParams as_adjacency_matrix
#' @param tol Tolerance for near-singularities during matrix inversion, see
#' [solve()].
#' @param sparse Logical scalar, whether to use sparse matrices for the
#' @param sparse Logical, whether to use sparse matrices for the
#' calculation. The \sQuote{Matrix} package is required for sparse matrix
#' support
#' @return A numeric vector contaning the centrality scores for the selected
Expand Down
14 changes: 7 additions & 7 deletions R/centralization.R
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ NULL
#' the most centralized graph with the same number of vertices as the graph
#' under study. This is only used if the `normalized` argument is set
#' to `TRUE`.
#' @param normalized Logical scalar. Whether to normalize the graph level
#' @param normalized Logical. Whether to normalize the graph level
#' centrality score by dividing by the supplied theoretical maximum.
#' @return A real scalar, the centralization of the graph from which
#' `scores` were derived.
Expand Down Expand Up @@ -329,9 +329,9 @@ centralize <- function(scores, theoretical.max = 0, normalized = TRUE) {
#' @param graph The input graph.
#' @param mode This is the same as the `mode` argument of
#' `degree()`.
#' @param loops Logical scalar, whether to consider loops edges when
#' @param loops Logical, whether to consider loops edges when
#' calculating the degree.
#' @param normalized Logical scalar. Whether to normalize the graph level
#' @param normalized Logical. Whether to normalize the graph level
#' centrality score by dividing by the theoretical maximum.
#' @return A named list with the following components:
#' \describe{
Expand Down Expand Up @@ -435,7 +435,7 @@ centr_degree_tmax <- function(
#' See [centralize()] for a summary of graph centralization.
#'
#' @param graph The input graph.
#' @param directed logical scalar, whether to use directed shortest paths for
#' @param directed Logical, whether to use directed shortest paths for
#' calculating betweenness.
#' @inheritParams centr_degree
#' @return A named list with the following components:
Expand Down Expand Up @@ -491,7 +491,7 @@ centr_betw <- function(graph, directed = TRUE, normalized = TRUE) {
#' `nodes` and `directed` are both given.
#' @param nodes The number of vertices. This is ignored if the graph is
#' given.
#' @param directed Logical scalar, whether to use directed shortest paths
#' @param directed Logical, whether to use directed shortest paths
#' for calculating betweenness. Ignored if an undirected graph was
#' given.
#' @return Real scalar, the theoretical maximum (unnormalized) graph
Expand Down Expand Up @@ -605,7 +605,7 @@ centr_clo_tmax <- function(
#' See [centralize()] for a summary of graph centralization.
#'
#' @param graph The input graph.
#' @param directed logical scalar, whether to use directed shortest paths for
#' @param directed Logical, whether to use directed shortest paths for
#' calculating eigenvector centrality.
#' @param scale `r lifecycle::badge("deprecated")` Ignored. Computing
#' eigenvector centralization requires normalized eigenvector centrality scores.
Expand Down Expand Up @@ -682,7 +682,7 @@ centr_eigen <- function(
#' `nodes` is given.
#' @param nodes The number of vertices. This is ignored if the graph is
#' given.
#' @param directed logical scalar, whether to consider edge directions
#' @param directed Logical, whether to consider edge directions
#' during the calculation. Ignored in undirected graphs.
#' @param scale `r lifecycle::badge("deprecated")` Ignored. Computing
#' eigenvector centralization requires normalized eigenvector centrality scores.
Expand Down
4 changes: 2 additions & 2 deletions R/cohesive.blocks.R
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ blockGraphs <- function(blocks, graph) {
#' For `graphs_from_cohesive_blocks()` and `export_pajek()` the same graph must be
#' supplied whose cohesive block structure is given in the `blocks()`
#' argument.
#' @param labels Logical scalar, whether to add the vertex labels to the result
#' @param labels Logical, whether to add the vertex labels to the result
#' object. These labels can be then used when reporting and plotting the
#' cohesive blocks.
#' @param blocks,x,object A `cohesiveBlocks` object, created with the
Expand All @@ -240,7 +240,7 @@ blockGraphs <- function(blocks, graph) {
#' of the files, without extension. (But it can contain the path to the files.)
#'
#' See also details below.
#' @param project.file Logical scalar, whether to create a single Pajek project
#' @param 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.
#' @param y The graph whose cohesive blocks are supplied in the `x`
Expand Down
34 changes: 17 additions & 17 deletions R/community.R
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ code.length <- function(communities) {
#' communities are colored green and other edges are red.
#' @param hang Numeric scalar indicating how the height of leaves should be
#' computed from the heights of their parents; see [plot.hclust()].
#' @param use.modularity Logical scalar, whether to use the modularity values
#' @param use.modularity Logical, whether to use the modularity values
#' to define the height of the branches.
#' @param \dots Additional arguments. `plot.communities` passes these to
#' [plot.igraph()]. The other functions silently ignore
Expand Down Expand Up @@ -617,7 +617,7 @@ code.length <- function(communities) {
#'
#' `crossing()` returns a logical vector.
#'
#' `is_hierarchical()` returns a logical scalar.
#' `is_hierarchical()` returns a Logical.
#'
#' `merges()` returns a two-column numeric matrix.
#'
Expand Down Expand Up @@ -1391,7 +1391,7 @@ community.to.membership2 <- function(merges, vcount, steps) {
#' 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.
#' @param parupdate Logical constant, whether to update the spins of the
#' @param 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{`vertex`} argument
#' is present). It is also not implemented in the \dQuote{neg} implementation.
Expand Down Expand Up @@ -1835,12 +1835,12 @@ cluster_fluid_communities <- function(graph, no.of.communities) {
#' weights increase the probability that an edge is selected by the random
#' walker. In other words, larger edge weights correspond to stronger connections.
#' @param steps The length of the random walks to perform.
#' @param merges Logical scalar, whether to include the merge matrix in the
#' @param merges Logical, whether to include the merge matrix in the
#' result.
#' @param modularity Logical scalar, whether to include the vector of the
#' @param modularity Logical, whether to include the vector of the
#' modularity scores in the result. If the `membership` argument is true,
#' then it will always be calculated.
#' @param membership Logical scalar, whether to calculate the membership vector
#' @param membership Logical, whether to calculate the membership vector
#' for the split corresponding to the highest modularity value.
#' @return `cluster_walktrap()` returns a [communities()]
#' object, please see the [communities()] manual page for details.
Expand Down Expand Up @@ -1946,11 +1946,11 @@ cluster_walktrap <- function(
#' 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.
#' @param directed Logical constant, whether to calculate directed edge
#' @param directed Logical, whether to calculate directed edge
#' betweenness for directed graphs. It is ignored for undirected graphs.
#' @param edge.betweenness Logical constant, whether to return the edge
#' @param edge.betweenness Logical, whether to return the edge
#' betweenness of the edges at the time of their removal.
#' @param merges Logical constant, whether to return the merge matrix
#' @param merges Logical, whether to return the merge matrix
#' representing the hierarchical community structure of the network. This
#' argument is called `merges`, even if the community structure algorithm
#' itself is divisive and not agglomerative: it builds the tree from top to
Expand All @@ -1962,12 +1962,12 @@ cluster_walktrap <- function(
#' 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.
#' @param bridges Logical constant, whether to return a list the edge removals
#' @param bridges Logical, whether to return a list the edge removals
#' which actually splitted a component of the graph.
#' @param modularity Logical constant, whether to calculate the maximum
#' @param modularity Logical, whether to calculate the maximum
#' modularity score, considering all possibly community structures along the
#' edge-betweenness based edge removals.
#' @param membership Logical constant, whether to calculate the membership
#' @param membership Logical, whether to calculate the membership
#' vector corresponding to the highest possible modularity score.
#' @return `cluster_edge_betweenness()` returns a
#' [communities()] object, please see the [communities()]
Expand Down Expand Up @@ -2054,10 +2054,10 @@ cluster_edge_betweenness <- function(
#'
#' @param graph The input graph. It must be undirected and must not have
#' multi-edges.
#' @param merges Logical scalar, whether to return the merge matrix.
#' @param modularity Logical scalar, whether to return a vector containing the
#' @param merges Logical, whether to return the merge matrix.
#' @param modularity Logical, whether to return a vector containing the
#' modularity after each merge.
#' @param membership Logical scalar, whether to calculate the membership vector
#' @param membership Logical, whether to calculate the membership vector
#' corresponding to the maximum modularity score, considering all possible
#' community structures along the merges.
#' @param weights The weights of the edges. It must be a positive numeric vector,
Expand Down Expand Up @@ -2660,7 +2660,7 @@ cluster_optimal <- function(graph, weights = NULL) {
#' jumps to that vertex.
#' @param nb.trials The number of attempts to partition the network (can be any
#' integer value equal or larger than 1).
#' @param modularity Logical scalar, whether to calculate the modularity score
#' @param modularity Logical, whether to calculate the modularity score
#' of the detected community structure.
#' @return `cluster_infomap()` returns a [communities()] object,
#' please see the [communities()] manual page for details.
Expand Down Expand Up @@ -2807,7 +2807,7 @@ plot_dendrogram <- function(x, mode = igraph_opt("dend.plot.type"), ...) {
#' @param mode Which dendrogram plotting function to use. See details below.
#' @param \dots Additional arguments to supply to the dendrogram plotting
#' function.
#' @param use.modularity Logical scalar, whether to use the modularity values
#' @param use.modularity Logical, whether to use the modularity values
#' to define the height of the branches.
#' @param palette The color palette to use for colored plots.
#' @return Returns whatever the return value was from the plotting function,
Expand Down
Loading
Loading