# NOT RUN {
# Load the library
library(XGR)
# }
# 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')
# }
Run the code above in your browser using DataLab