# Graphs definition
G0 <- as.undirected(sachs$graph)
# Reference graph-based orientation
G1 <- orientEdges(ug = G0, dg = sachs$graph)
# Graphs plotting
old.par <- par(no.readonly = TRUE)
par(mfrow=c(1,2), mar=rep(2,4))
plot(G0, layout=layout.circle, main = "Input undirected graph")
plot(G1, layout=layout.circle, main = "Output directed graph")
par(old.par)
Run the code above in your browser using DataLab