# NOT RUN {
sch <- sch_new() %>%
sch_add_activities(
id = c( 1L, 2L, 3L, 4L),
name = c("A", "B", "C", "D"),
duration = c( 2L, 3L, 1L, 2L )
) %>%
sch_add_relations(
from = c(1L, 2L, 4L, 4L),
to = c(3L, 3L, 1L, 2L)
) %>%
sch_plan()
sch_duration(sch)
xyw <- sch_xy_gantt_matrix(sch)
xyw
plot(xyw[, 1:2])
# }
Run the code above in your browser using DataLab