To cite animation in publications use:

Xie Y (2013). “animation: An R Package for Creating Animations and Demonstrating Statistical Methods.” Journal of Statistical Software, 53(1), 1–27. https://doi.org/10.18637/jss.v053.i01.

Xie Y, Mueller C, Yu L, Zhu W (2021). animation: A Gallery of Animations in Statistics and Utilities to Create Animations. R package version 2.7, https://yihui.org/animation/.

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 = {https://doi.org/10.18637/jss.v053.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 = {2021},
    note = {R package version 2.7},
    url = {https://yihui.org/animation/},
  }