From 0608c462b5e6db7c8e3d424a8a70305c8eb2e684 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kirill=20M=C3=BCller?= Date: Thu, 3 Apr 2025 12:16:16 +0200 Subject: [PATCH 1/3] WIP: docs: Add description --- R/community.R | 7 +++++-- R/topology.R | 6 +++++- man/graph_from_isomorphism_class.Rd | 6 ++++++ man/make_clusters.Rd | 5 +++++ 4 files changed, 21 insertions(+), 3 deletions(-) diff --git a/R/community.R b/R/community.R index fb6d9f40070..eebc4cc4cf8 100644 --- a/R/community.R +++ b/R/community.R @@ -550,8 +550,11 @@ print.communities <- function(x, ...) { #' is `TRUE` and the membership vector is available, then it the #' modularity values is calculated automatically. #' @return A `communities` object. -#' -#' +#' \describe{ +#' \item{membership}{A numeric vector giving the community id for each +#' vertex.} +#' \item{modularity}{The modularity score of the partition.} +#' } #' @family community #' @export make_clusters <- function(graph, membership = NULL, algorithm = NULL, diff --git a/R/topology.R b/R/topology.R index a166925b0cd..fb5c04ca822 100644 --- a/R/topology.R +++ b/R/topology.R @@ -774,7 +774,11 @@ graph.isoclass <- isoclass_impl #' @param directed Whether to create a directed graph (the default). #' @return An igraph object, the graph of the given size, directedness #' and isomorphism class. -#' +#' @return A list with components: +#' \describe{ +#' \item{topology}{The topology of the graph.} +#' \item{details}{Additional details about the topology.} +#' } #' #' @family graph isomorphism #' @export diff --git a/man/graph_from_isomorphism_class.Rd b/man/graph_from_isomorphism_class.Rd index 0a74cf482b3..08f908603f6 100644 --- a/man/graph_from_isomorphism_class.Rd +++ b/man/graph_from_isomorphism_class.Rd @@ -16,6 +16,12 @@ graph_from_isomorphism_class(size, number, directed = TRUE) \value{ An igraph object, the graph of the given size, directedness and isomorphism class. + +A list with components: +\describe{ +\item{topology}{The topology of the graph.} +\item{details}{Additional details about the topology.} +} } \description{ The isomorphism class is a non-negative integer number. diff --git a/man/make_clusters.Rd b/man/make_clusters.Rd index 8724d798b5a..2870f19618c 100644 --- a/man/make_clusters.Rd +++ b/man/make_clusters.Rd @@ -31,6 +31,11 @@ modularity values is calculated automatically.} } \value{ A \code{communities} object. +\describe{ +\item{membership}{A numeric vector giving the community id for each +vertex.} +\item{modularity}{The modularity score of the partition.} +} } \description{ This is useful to integrate the results of community finding algorithms From dffac01d7de10daab0f419872a023506685336a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kirill=20M=C3=BCller?= Date: Thu, 10 Apr 2025 14:25:17 +0200 Subject: [PATCH 2/3] Apply suggestions from code review Tweak Co-authored-by: David Schoch --- R/community.R | 2 ++ R/topology.R | 5 ----- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/R/community.R b/R/community.R index eebc4cc4cf8..fd9abd48e7b 100644 --- a/R/community.R +++ b/R/community.R @@ -554,6 +554,8 @@ print.communities <- function(x, ...) { #' \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.} #' } #' @family community #' @export diff --git a/R/topology.R b/R/topology.R index fb5c04ca822..808f89eee20 100644 --- a/R/topology.R +++ b/R/topology.R @@ -774,11 +774,6 @@ graph.isoclass <- isoclass_impl #' @param directed Whether to create a directed graph (the default). #' @return An igraph object, the graph of the given size, directedness #' and isomorphism class. -#' @return A list with components: -#' \describe{ -#' \item{topology}{The topology of the graph.} -#' \item{details}{Additional details about the topology.} -#' } #' #' @family graph isomorphism #' @export From 1dcd5e79d5c3eecfa1fe6f7c2f42b2607dc6af03 Mon Sep 17 00:00:00 2001 From: krlmlr Date: Thu, 10 Apr 2025 12:31:53 +0000 Subject: [PATCH 3/3] chore: Auto-update from GitHub Actions Run: https://github.com/igraph/rigraph/actions/runs/14380371851 --- man/graph_from_isomorphism_class.Rd | 6 ------ man/make_clusters.Rd | 2 ++ 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/man/graph_from_isomorphism_class.Rd b/man/graph_from_isomorphism_class.Rd index 08f908603f6..0a74cf482b3 100644 --- a/man/graph_from_isomorphism_class.Rd +++ b/man/graph_from_isomorphism_class.Rd @@ -16,12 +16,6 @@ graph_from_isomorphism_class(size, number, directed = TRUE) \value{ An igraph object, the graph of the given size, directedness and isomorphism class. - -A list with components: -\describe{ -\item{topology}{The topology of the graph.} -\item{details}{Additional details about the topology.} -} } \description{ The isomorphism class is a non-negative integer number. diff --git a/man/make_clusters.Rd b/man/make_clusters.Rd index 2870f19618c..be323fb60fb 100644 --- a/man/make_clusters.Rd +++ b/man/make_clusters.Rd @@ -35,6 +35,8 @@ A \code{communities} object. \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{