R/PlotGraphWithNodeNames.r

Defines functions PlotGraphWithNodeNames

Documented in PlotGraphWithNodeNames

#' @title plot graph with node names
#' @description
#' Plots an igraph with the node names. Plots a igraph to the screen displaying the names of the nodes input rather than R's internal numbering.

#' @param igraph internal an igraph representation of an interaction network
#' @return network visualisation
#' @export
#' @concept CausalR
#' @examples
#' network <- system.file(package='CausalR', 'extdata', 'testNetwork.sif')
#' ccg <- CreateCCG(network)
#' PlotGraphWithNodeNames(ccg)




PlotGraphWithNodeNames <- function(igraph) {
    
    graphics::plot(igraph, vertex.label = igraph::V(igraph)$name)
    
} 

Try the CausalR package in your browser

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

CausalR documentation built on Nov. 8, 2020, 5:25 p.m.