Description Usage Arguments Value Examples
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.
1 2 3 4 5 6 |
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
1 2 3 4 5 6 7 8 9 | 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")
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.