To cite animation in publications use:

Yihui Xie (2013). animation: An R Package for Creating Animations and Demonstrating Statistical Methods. Journal of Statistical Software, 53(1), 1-27. URL http://www.jstatsoft.org/v53/i01/.

Yihui Xie [aut, cre], Christian Mueller [ctb], Lijia Yu [ctb], Weicheng Zhu [ctb] (2017). animation: A Gallery of Animations in Statistics and Utilities to Create Animations. R package version 2.5.

Corresponding BibTeX entries:

  @Article{,
    title = {{animation}: An {R} Package for Creating Animations and
      Demonstrating Statistical Methods},
    author = {Yihui Xie},
    journal = {Journal of Statistical Software},
    year = {2013},
    volume = {53},
    number = {1},
    pages = {1--27},
    url = {http://www.jstatsoft.org/v53/i01/},
  }
  @Manual{,
    title = {animation: A Gallery of Animations in Statistics and
      Utilities to Create Animations},
    author = {Yihui Xie and Christian Mueller and Lijia Yu and Weicheng
      Zhu},
    year = {2017},
    note = {R package version 2.5},
    url = {https://yihui.name/animation},
  }