R/to.tidygraph.R

Defines functions to.tidygraph

Documented in to.tidygraph

#' \code{fastnet} to \code{tidygraph}
#'
#' @description Coerce a fastnet object to a tidygraph object.
#' @param g A fastnet object.
#' @return A tidygraph object
#' @author Xu Dong
#' @export

to.tidygraph <- function(g) {

  net.tidy <- tidygraph::as_tbl_graph(igraph::graph_from_adj_list(g))
  net.tidy
}

Try the fastnet package in your browser

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

fastnet documentation built on Jan. 13, 2021, 5:28 p.m.