R/igraphtoGNAR.R

Defines functions igraphtoGNAR

Documented in igraphtoGNAR

igraphtoGNAR <- function(ig){
  stopifnot(is.igraph(ig))
  if(is.weighted(ig)){
    weimat <- get.adjacency(ig, attr="weight")
  }else{
    weimat <- get.adjacency(ig)
    weimat <- as.matrix(weimat)
  }
  net <- matrixtoGNAR(weimat)
  return(net)
}

Try the GNAR package in your browser

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

GNAR documentation built on May 29, 2024, 10:25 a.m.