xMarkNet | R Documentation |
xMarkNet
is supposed to mark a network within another network.
xMarkNet(ig1, ig2, verbose = TRUE)
ig1 |
a "igraph" object within which the mark happens |
ig2 |
a "igraph" object to be marked. Only overlapped nodes and edges are marked |
verbose |
logical to indicate whether the messages will be displayed in the screen. By default, it sets to true for display |
an object of class "igraph" appended with a node attribute 'highlight' (0 for the background, 1 for the highlighted) and an edge attribute 'mark' (0 for the background, 1 for the marked)
none
xMarkNet
## Not run: # Load the library library(XGR) ## End(Not run) RData.location <- "http://galahad.well.ox.ac.uk/bigdata" ## Not run: ig1 <- xDefineNet(network="KEGG_environmental", RData.location=RData.location) ig2 <- xDefineNet(network="KEGG_organismal", RData.location=RData.location) ig <- xMarkNet(ig1, ig2) E(ig)$color <- ifelse(E(ig)$mark==0, 'lightblue1', 'darkgreen') E(ig)$color.alpha <- ifelse(E(ig)$mark==0, 0.3, 0.7) ig <- ig %>% xLayout("gplot.layout.fruchtermanreingold") gp <- xGGnetwork(ig, node.xcoord='xcoord', node.ycoord='ycoord', node.color="highlight", colormap="orange-darkgreen", node.color.alpha=0.7, edge.color="color", edge.color.alpha="color.alpha", edge.arrow.gap=0) + theme(legend.position='none') ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.