Description Usage Arguments Value Note See Also Examples
xMarkNet
is supposed to mark a network within another network.
1 |
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 'mark' (0 for the background, 1 for the marked) and an edge attribute 'mark' (0 for the background, 1 for the marked)
none
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | ## 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="mark", 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.