graph(type = "updown", gap = 1.3, penalty = 5)
graph(Edge("Dw","Dw"),
Edge("Up","Up"),
Edge("Dw","Up","up", gap = 0.5, penalty = 10),
Edge("Up","Dw","down"),
StartEnd("Dw","Dw"),
Node("Dw",0,1),
Node("Up",0,1))
graph(Edge("1", "2", type = "std"),
Edge("2", "3", type = "std"),
Edge("3", "4", type = "std"),
StartEnd(start = "1", end = "4"),
all.null.edges = TRUE)
Run the code above in your browser using DataLab