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=TRUE, sym =FALSE){
  if(sym) x<-sg2sym(x)

  clusters<- spatcluster_c(x$edges, verbose)

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

}

Try the spatgraphs package in your browser

Any scripts or data that you put into this service are public.

spatgraphs documentation built on Feb. 16, 2023, 8:49 p.m.