diff --git a/R/graph_measures.R b/R/graph_measures.R index e95f0e7..0d2448d 100644 --- a/R/graph_measures.R +++ b/R/graph_measures.R @@ -48,11 +48,11 @@ graph_assortativity <- function(attr, in_attr = NULL, directed = TRUE) { #' @inheritParams igraph::count_automorphisms #' @importFrom igraph count_automorphisms #' @export -graph_automorphisms <- function(sh = 'fm', color = NULL) { +graph_automorphisms <- function(sh = 'fm', colors = NULL) { graph <- .G() - color <- enquo(color) - color <- eval_tidy(color, .N()) - as.numeric(count_automorphisms(graph, color = color, sh = sh)$group_size) + colors <- enquo(colors) + colors <- eval_tidy(colors, .N()) + as.numeric(count_automorphisms(graph, colors = colors, sh = sh)$group_size) } #' @describeIn graph_measures Get the size of the largest clique. Wraps [igraph::clique_num()] #' @importFrom igraph clique_num diff --git a/man/graph_measures.Rd b/man/graph_measures.Rd index 8247566..7be2b7b 100644 --- a/man/graph_measures.Rd +++ b/man/graph_measures.Rd @@ -27,7 +27,7 @@ graph_adhesion() graph_assortativity(attr, in_attr = NULL, directed = TRUE) -graph_automorphisms(sh = "fm", color = NULL) +graph_automorphisms(sh = "fm", colors = NULL) graph_clique_num() @@ -76,6 +76,13 @@ non-singleton cell, \sQuote{\code{flm}}: first largest maximally non-trivially connected non-singleton cell, \sQuote{\code{fsm}}: first smallest maximally non-trivially connected non-singleton cell.} +\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, 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.} + \item{min, max}{The upper and lower bounds of the cliques to be considered.} \item{subset}{The indexes of the nodes to start the search from (logical or integer). If provided only the cliques containing these nodes will be counted.}