Skip to content

Commit

Permalink
Fix style inconsistencies in function documentation
Browse files Browse the repository at this point in the history
Break comment lines that are longer than 120 characters and adjust the
indentation of parameter descriptions.

Signed-off-by: Thomas Bock <bockthom@cs.uni-saarland.de>
  • Loading branch information
bockthom committed Apr 13, 2023
1 parent ac52407 commit a6e001a
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions util-networks-metrics.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
## Libraries ---------------------------------------------------------------

requireNamespace("igraph")
requireNamespace("logging")


## / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / /
Expand Down Expand Up @@ -103,8 +104,9 @@ metrics.density = function(network) {
#' @param directed whether to consider directed paths in directed networks [default: TRUE]
#' @param unconnected whether there are subnetworks in the network that are not connected.
#' If \code{TRUE} only the lengths of the existing paths are considered and averaged;
#' if \code{FALSE} the length of the missing paths are counted having length \code{vcount(graph)}, one longer than
#' the longest possible geodesic in the network (from igraph documentation) [default: TRUE]
#' if \code{FALSE} the length of the missing paths are counted having length \code{vcount(graph)},
#' one longer than the longest possible geodesic in the network (from igraph documentation)
#' [default: TRUE]
#'
#' @return The average path length of the given network.
metrics.avg.pathlength = function(network, directed = TRUE, unconnected = TRUE) {
Expand All @@ -131,7 +133,8 @@ metrics.clustering.coeff = function(network, cc.type = c("global", "local", "bar
#'
#' @param network the network to be examined
#' @param community.detection.algorithm the algorithm to be used for the detection of communities
#' which is required for the calculation of the clustering coefficient [default: igraph::cluster_walktrap]
#' which is required for the calculation of the clustering coefficient
#' [default: igraph::cluster_walktrap]
#'
#' @return The modularity value for the given network.
metrics.modularity = function(network, community.detection.algorithm = igraph::cluster_walktrap) {
Expand Down Expand Up @@ -212,7 +215,7 @@ metrics.is.smallworld = function(network) {
#'
#' @param network the network to be examined
#' @param minimum.number.vertices the minimum number of vertices with which
#' a network can be scale free [default: 30]
#' a network can be scale free [default: 30]
#'
#' @return A dataframe containing the different values, connected to scale-freeness.
metrics.scale.freeness = function(network, minimum.number.vertices = 30) {
Expand Down Expand Up @@ -257,7 +260,7 @@ metrics.scale.freeness = function(network, minimum.number.vertices = 30) {
#'
#' @param network the network to be examined
#' @param minimum.number.vertices the minimum number of vertices with which
#' a network can be scale free [default: 30]
#' a network can be scale free [default: 30]
#'
#' @return \code{TRUE}, if the network is scale free,
#' \code{FALSE}, otherwise.
Expand Down Expand Up @@ -306,7 +309,7 @@ VERTEX.CENTRALITIES.COLUMN.NAMES = c("vertex.name", "centrality")
#' - "network.degree"
#' - "network.eigen"
#' - "network.hierarchy"
#' [defalt: "network.degree"]
#' [default: "network.degree"]
#' @param restrict.classification.to.vertices a vector of vertex names. Only vertices that are contained within this
#' vector are to be classified. Vertices that appear in the vector but are
#' not part of the classification result (i.e., they are not present in the
Expand Down

0 comments on commit a6e001a

Please sign in to comment.