Description Usage Arguments Value Examples
Get the minimum/maximum start/end time among elements
1 2 3 | getMinTime(gantt, a, which, strict = T)
getMaxTime(gantt, a, which, strict = T)
|
gantt |
A gantt object (created by makeGantt) |
a |
a vector of elements to compare |
which |
Which time to compare ("start" or "end") |
strict |
If TRUE and an element among the compared is not present, NA is returned. |
Returns minimum/maximum time in seconds of the earliest/latest element starting/ending
1 2 3 4 5 6 | response<-matrix(c("{'response':'1/8 17:00;;1/8 17:00 - 1/8 18:00;1/8 18:00, 1/8 20:00 - 1/8 21:00;1/8 20:30;1/8 20:00 - 1/8 20:30;1/8 19:30 - 1/8 20:30'}"))
gantt<-makeGantt(response,names=c("waitress","actor","pianist","bartender","cleaning","ticketer","musician"),timespan=30,time.format="%d/%m %H:%M")
getMinTime(gantt,c("pianist","bartender"),which="start")
getMaxTime(gantt,c("actor","bartender"),which="end",strict=F)
getMaxTime(gantt,"actor",which="end")
as.difftime(getMaxTime(gantt,c("pianist","bartender"),which="end")-getMinTime(gantt,c("pianist","bartender"),which="start"),units = "secs")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.