# NOT RUN {
(a <- gantt(DATA$state, DATA$person))
plot(a)
plot(a, base = TRUE)
(b <- gantt(DATA$state, DATA$person, sums = TRUE))
plot(b)
plot(b, base = FALSE)
(d <- gantt(DATA$state, list(DATA$sex, DATA$adult)))
plot(d)
x <- gantt(mraja1$dialogue, mraja1$person)
plot(x, base = TRUE)
plot(x, , base = TRUE, box.color = "black")
z <- gantt(mraja1$dialogue, mraja1$sex)
plot(z)
e <- with(mraja1, gantt(dialogue, list(fam.aff, sex, died),
units = "characters", sums = TRUE))
plot(e)
f <- gantt(mraja1$dialogue, mraja1$person, units = "syllables",
sums = TRUE)
plot(f, box.color = "red")
plot(f, base = FALSE)
dat <- gantt(mraja1$dialogue, list(mraja1$fam.aff, mraja1$sex),
units = "sentences", col.sep = "_")
## Animate It
##=================
ani_gannt <- with(DATA.SPLIT, gantt(state, person))
Animate(ani_gannt)
Animate(plot(ani_gannt))
library(animation)
loc <- reports::folder(animation_gantt)
## Set up the plotting function
oopt <- animation::ani.options(interval = 0.1)
FUN <- function() {
out <- Animate(ani_gannt)
lapply(out, function(x) {
print(x)
animation::ani.pause()
})
}
type <- if(.Platform$OS.type == "windows") shell else system
saveGIF(FUN(), interval = 0.1, outdir = loc, cmd.fun = type)
# }
Run the code above in your browser using DataLab