R/spatcluster.R

Defines functions spatcluster

Documented in spatcluster

#' Compute the connected components of a graph
#'
#' @param x sg-object
#' @param verbose print info
#' @param sym force symmetry of edges
#'
#' @export

spatcluster <- function(x, verbose = FALSE, sym = FALSE){
  if(sym) x<-sg2sym(x)

  clusters<- spatcluster_c(x$edges, verbose)

  as.sgc(clusters, x$type, x$parameters)

}
antiphon/spatgraphs documentation built on Feb. 23, 2023, 7:14 a.m.