R/degreeDistribution.R

Defines functions degreeDistribution

Documented in degreeDistribution

degreeDistribution <- function(g, deg=NULL){
  # check if g is a graphNEL object
  if(class(g)[1]!="graphNEL"){
    stop("'g' has to be a 'graphNEL' object")
  }
  stopifnot(.validateGraph(g))
  
  if(is.null(deg)){
    deg <- graph::degree(g)
  }
  return(table(deg))
}

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.