Description Usage Arguments Value Note References See Also Examples
A convenience function that wraps
gantt, gantt_rep
and gantt_wrap into a single plotting
function.
1 2 3  |   gantt_plot(text.var, grouping.var, rm.var = NULL,
    fill.var = NULL, xlab = "duration (in words)",
    units = "words", col.sep = "_", ...)
 | 
text.var | 
 The text variable.  | 
grouping.var | 
 The grouping variables. Also takes a single grouping variable or a list of 1 or more grouping variables.  | 
rm.var | 
 An optional single vector or list of 1 or 2 of repeated measures to facet by  | 
fill.var | 
 An optional variable to fill the code strips by.  | 
xlab | 
 The name of the x-axis label.  | 
units | 
 The unit of measurement.  | 
col.sep | 
 The column separator.  | 
... | 
 Other arguments passed to
  | 
Returns a Gantt style visualization. Invisibly returns the ggplot2 list object.
For non repeated measures data/plotting use
gantt; for repeated measures data
output use gantt_rep; and for a
flexible gantt plot that words with code matrix functions
(cm) use gantt_wrap.
Clark, W. & Gantt, H. (1922) The Gantt chart, a working tool of management. New York, Ronald Press.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16  | with(rajSPLIT, gantt_plot(text.var = dialogue,
    grouping.var = person, size=4))
with(rajSPLIT, gantt_plot(text.var = dialogue,
    grouping.var = list(fam.aff, sex), rm.var  = act,
    title = "Romeo and Juliet's dialogue"))
with(rajSPLIT, gantt_plot(dialogue, list(fam.aff, sex), act,
    transform=T))
rajSPLIT2 <- rajSPLIT
rajSPLIT2$newb <- as.factor(sample(LETTERS[1:2], nrow(rajSPLIT2),
    replace=TRUE))
z <- with(rajSPLIT2, gantt_plot(dialogue, list(fam.aff, sex),
    list(act, newb), size = 4))
library(ggplot2); library(scales); library(RColorBrewer); library(grid)
z + theme(panel.margin = unit(1, "lines")) + scale_colour_grey()
z + scale_colour_brewer(palette="Dark2")
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.