setPosition: setPosition

Description Usage Arguments Value See Also Examples

Description

setPosition of nodes by their id

Usage

1
2
## S4 method for signature 'RCyjs'
setPosition(obj, tbl.pos)

Arguments

obj

an RCyjs instance

tbl.pos

a data.frame with three columns: id, x, y

Value

no return value

See Also

getPosition

Examples

1
2
3
4
5
6
7
8
9
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)
  }

RCyjs documentation built on Nov. 8, 2020, 8:20 p.m.