Welcome to the documentation and examples web site for the animint package, which allows an interactive animation to be defined as a list of ggplots with clickSelects and showSelected aesthetics. To get started, install the animint package by executing the following R code:

install.packages("devtools")
library(devtools)
install_github("animint", "tdhock")
library(animint)

Interactivity

The only kind of interactivity that can be defined using animint is showing and hiding subsets of data, based on the current selection. This is controlled by specifying the following two new aesthetics in your ggplot2 geoms:

If showSelected is not specified then all the data will be shown. Also, aes(showSelected=variable1, showSelected2=variable2) means show only the subset of the data that corresponds to both selected variables, like facet_grid(variable1 ~ variable2).

Animation

By default, animint will not make a plot animated. To enable animation, you can define the following option lists:

Examples

Click the images in the table below to show the R code that generated them, alongside the interactive plot.

Data Plot animated? clickable variables shown variables
breakpoints no 2 samples, segments 13 position, signal, samples, line, first.base, mean, last.base, segments, base, error, type, FPR, TPR
change no 2 complexity, variables 12 complexity, log(log.likelihood + 0.002), set, variable, v1.x, v1.y, v2.x, v2.y, change, variables, coefficient, truth
compare no 2 set.id, norm 20 Xt.1, Xt.2, Xtp.1, Xtp.2, factor(yt), set.id, norm, N, percent, model, fit.name, mean, mean - sd, mean + sd, yintercept, x1, x2, rank, piece, what
evolution yes 2 locus, generation 5 generation, frequency, population, color, locus
prior no 3 set, prior, samples 12 positive, negative, set, dimension, prior, samples, percent, sqErr.mean, method, classifier, percent - percent.se, percent + percent.se
WorldBank yes 2 year, country 6 year, life.expectancy, country, region, fertility.rate, population
worldPop yes 2 subcontinent, year 4 subcontinent, population, year, type

Generated from R and HTML sources using animint version 2013.11.22.