# NOT RUN {
dat <- gantt(mraja1$dialogue, list(mraja1$fam.aff, mraja1$sex),
units = "sentences", col.sep = "_")
htruncdf(dat)
gantt_wrap(dat, "fam.aff_sex", title = "Gantt Plot")
dat$codes <- sample(LETTERS[1:3], nrow(dat), TRUE)
gantt_wrap(dat, "fam.aff_sex", fill.var = "codes",
legend.position = "bottom")
dat2 <- with(rajSPLIT, gantt_rep(act, dialogue,
list(fam.aff, sex), units = "words", col.sep = "_"))
htruncdf(dat2)
x <- gantt_wrap(dat2, "fam.aff_sex", facet.vars = "act",
title = "Repeated Measures Gantt Plot")
library(ggplot2); library(scales); library(RColorBrewer)
x + scale_color_manual(values=rep("black",
length(levels(dat2$fam.aff_sex))))
# }
Run the code above in your browser using DataLab