R/totalAdjacency.R

Defines functions totalAdjacency

Documented in totalAdjacency

totalAdjacency <- function(g, am=NULL){
  if(class(g)[1]!="graphNEL"){
    stop("'g' must be a 'graphNEL' object")
  }
  stopifnot(.validateGraph(g))
  
  if(is.null(am)){
    am <- adjacencyMatrix(g)
  }
  sum(am)/2
}

Try the QuACN package in your browser

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

QuACN documentation built on May 2, 2019, 5:46 p.m.