| RCyjs-class {RCyjs} | R Documentation |
The RCyjs class provides an R interface to cytoscape.js, a rich, interactive, full-featured, javascript network (graph) library. One constructs an RCyjs instance on a specified port (default 9000), the browser code is loaded, and a websocket connection opened.
RCyjs( portRange = 16000:16100, title = "RCyjs", graph = graphNEL(), quiet = TRUE )
portRange |
The constructor looks for a free websocket port in this range. 16000:16100 by default |
title |
Used for the web browser window, "RCyjs" by default |
graph |
a Biocondcutor graphNEL object |
quiet |
A logical variable controlling verbosity during execution |
An object of the RCyjs class
if(interactive()){
g <- simpleDemoGraph()
rcy <- RCyjs(title="rcyjs demo", graph=g)
setNodeLabelRule(rcy, "label");
setNodeSizeRule(rcy, "count", c(0, 30, 110), c(20, 50, 100));
setNodeColorRule(rcy, "count", c(0, 100), c(colors$green, colors$red), mode="interpolate")
redraw(rcy)
layout(rcy, "cose")
}