| setPosition,RCyjs-method {RCyjs} | R Documentation |
setPosition of nodes by their id
## S4 method for signature 'RCyjs' setPosition(obj, tbl.pos)
obj |
an RCyjs instance |
tbl.pos |
a data.frame with three columns: id, x, y |
no return value
if(interactive()){
g <- simpleDemoGraph()
rcy <- RCyjs(title="getPosition", graph=g)
layout(rcy, "cose")
tbl.pos <- getPosition(rcy)
# shift all the nodes to the right
tbl.pos$x <- tbl.pos$x + 50
setPosition(rcy, tbl.pos)
}