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)

}
antiphon/spatgraphs documentation built on Dec. 15, 2017, 6:33 p.m.