IDEAS home Printed from https://ideas.repec.org/a/jss/jstsof/v053i01.html
   My bibliography  Save this article

animation: An R Package for Creating Animations and Demonstrating Statistical Methods

Author

Listed:
  • Xie, Yihui

Abstract

Animated graphs that demonstrate statistical ideas and methods can both attract interest and assist understanding. In this paper we first discuss how animations can be related to some statistical topics such as iterative algorithms, random simulations, (re)sampling methods and dynamic trends, then we describe the approaches that may be used to create animations, and give an overview to the R package animation, including its design, usage and the statistical topics in the package. With the animation package, we can export the animations produced by R into a variety of formats, such as a web page, a GIF animation, a Flash movie, a PDF document, or an MP4/AVI video, so that users can publish the animations fairly easily. The design of this package is flexible enough to be readily incorporated into web applications, e.g., we can generate animations online with Rweb, which means we do not even need R to be installed locally to create animations. We will show examples of the use of animations in teaching statistics and in the presentation of statistical reports using Sweave or knitr. In fact, this paper itself was written with the knitr and animation package, and the animations are embedded in the PDF document, so that readers can watch the animations in real time when they read the paper (the Adobe Reader is required). Animations can add insight and interest to traditional static approaches to teaching statistics and reporting, making statistics a more interesting and appealing subject.

Suggested Citation

  • Xie, Yihui, 2013. "animation: An R Package for Creating Animations and Demonstrating Statistical Methods," Journal of Statistical Software, Foundation for Open Access Statistics, vol. 53(i01).
  • Handle: RePEc:jss:jstsof:v:053:i01
    DOI: http://hdl.handle.net/10.18637/jss.v053.i01
    as

    Download full text from publisher

    File URL: https://www.jstatsoft.org/index.php/jss/article/view/v053i01/v53i01.pdf
    Download Restriction: no

    File URL: https://www.jstatsoft.org/index.php/jss/article/downloadSuppFile/v053i01/animation_2.2.tar.gz
    Download Restriction: no

    File URL: https://www.jstatsoft.org/index.php/jss/article/downloadSuppFile/v053i01/v53i01.R
    Download Restriction: no

    File URL: https://libkey.io/http://hdl.handle.net/10.18637/jss.v053.i01?utm_source=ideas
    LibKey link: if access is restricted and if your library uses this service, LibKey will redirect you to where you can use your library subscription to access this item
    ---><---

    References listed on IDEAS

    as
    1. Lawrence, Michael & Temple Lang, Duncan, 2010. "RGtk2: A Graphical User Interface Toolkit for R," Journal of Statistical Software, Foundation for Open Access Statistics, vol. 37(i08).
    2. C. J. Wild & M. Pfannkuch & M. Regan & N. J. Horton, 2011. "Towards more accessible conceptions of statistical inference," Journal of the Royal Statistical Society Series A, Royal Statistical Society, vol. 174(2), pages 247-295, April.
    3. Bowman, Adrian & Crawford, Ewan & Alexander, Gavin & Bowman, Richard W, 2007. "rpanel: Simple Interactive Controls for R Functions Using the tcltk Package," Journal of Statistical Software, Foundation for Open Access Statistics, vol. 17(i09).
    Full references (including those not matched with items on IDEAS)

    Citations

    Citations are extracted by the CitEc Project, subscribe to its RSS feed for this item.
    as


    Cited by:

    1. Hahsler, Michael & Bolaños, Matthew & Forrest, John, 2017. "Introduction to stream: An Extensible Framework for Data Stream Clustering Research with R," Journal of Statistical Software, Foundation for Open Access Statistics, vol. 76(i14).
    2. Apostolos Bozikas & Georgios Pitselis, 2018. "An Empirical Study on Stochastic Mortality Modelling under the Age-Period-Cohort Framework: The Case of Greece with Applications to Insurance Pricing," Risks, MDPI, vol. 6(2), pages 1-34, April.
    3. Varma, Jayanth R. & Virmani, Vineet, 2017. "Shiny Alternative for Finance in the Classroom," IIMA Working Papers WP 2017-03-05, Indian Institute of Management Ahmedabad, Research and Publication Department.
    4. Meyer, Sebastian & Held, Leonhard & Höhle, Michael, 2017. "Spatio-Temporal Analysis of Epidemic Phenomena Using the R Package surveillance," Journal of Statistical Software, Foundation for Open Access Statistics, vol. 77(i11).
    5. Wei, Kun & Zhang, Youxin & Luo, Yi, 2018. "Variance-mediated multifractal analysis of group participation in chasing a single dangerous prey," Physica A: Statistical Mechanics and its Applications, Elsevier, vol. 503(C), pages 1275-1287.

    Most related items

    These are the items that most often cite the same works as this one and are cited by the same works as this one.
    1. repec:jss:jstsof:36:i13 is not listed on IDEAS
    2. Chris J. Wild & Maxine Pfannkuch & Matt Regan & Ross Parsonage, 2017. "Accessible Conceptions of Statistical Inference: Pulling Ourselves Up by the Bootstraps," International Statistical Review, International Statistical Institute, vol. 85(1), pages 84-107, April.
    3. Taylor, Benjamin M. & Davies, Tilman M. & Rowlingson, Barry S. & Diggle, Peter J., 2013. "lgcp: An R Package for Inference with Spatial and Spatio-Temporal Log-Gaussian Cox Processes," Journal of Statistical Software, Foundation for Open Access Statistics, vol. 52(i04).
    4. Jette Reeg & Simon Heine & Christine Mihan & Sean McGee & Thomas G Preuss & Florian Jeltsch, 2020. "Herbicide risk assessments of non-target terrestrial plant communities: A graphical user interface for the plant community model IBC-grass," PLOS ONE, Public Library of Science, vol. 15(3), pages 1-18, March.
    5. Titus Felix FURTUNA & Claudiu VINTE, 2016. "Integrating R and Java for Enhancing Interactivity of Algorithmic Data Analysis Software Solutions," Romanian Statistical Review, Romanian Statistical Review, vol. 64(2), pages 29-41, June.
    6. David O'Donnell & Alastair Rushworth & Adrian W. Bowman & E. Marian Scott & Mark Hallard, 2014. "Flexible regression models over river networks," Journal of the Royal Statistical Society Series C, Royal Statistical Society, vol. 63(1), pages 47-63, January.
    7. Cheng, Xiaoyue & Cook, Dianne & Hofmann, Heike, 2015. "Visually Exploring Missing Values in Multivariable Data Using a Graphical User Interface," Journal of Statistical Software, Foundation for Open Access Statistics, vol. 68(i06).
    8. Friedrich, Sarah & Konietschke, Frank & Pauly, Markus, 2017. "GFD: An R Package for the Analysis of General Factorial Designs," Journal of Statistical Software, Foundation for Open Access Statistics, vol. 79(c01).
    9. Martin Meermeyer, 2014. "LinRegInteractive: An R Package for the Interactive Interpretation of Linear Regression Models," Schumpeter Discussion Papers SDP14014, Universitätsbibliothek Wuppertal, University Library.
    10. Bazovkin, Pavel & Mosler, Karl, 2012. "An Exact Algorithm for Weighted-Mean Trimmed Regions in Any Dimension," Journal of Statistical Software, Foundation for Open Access Statistics, vol. 47(i13).
    11. Hoffmann, Thomas J. & Laird, Nan M., 2009. "fgui: A Method for Automatically Creating Graphical User Interfaces for Command-Line R Packages," Journal of Statistical Software, Foundation for Open Access Statistics, vol. 30(i02).
    12. Thiele, Jan C, 2014. "R Marries NetLogo: Introduction to the RNetLogo Package," Journal of Statistical Software, Foundation for Open Access Statistics, vol. 58(i02).
    13. repec:jss:jstsof:30:i02 is not listed on IDEAS
    14. Amirhossein Jalali & Alberto Alvarez-Iglesias & Davood Roshan & John Newell, 2019. "Visualising statistical models using dynamic nomograms," PLOS ONE, Public Library of Science, vol. 14(11), pages 1-15, November.
    15. repec:jss:jstsof:37:i08 is not listed on IDEAS
    16. Gagolewski, Marek, 2011. "Bibliometric impact assessment with R and the CITAN package," Journal of Informetrics, Elsevier, vol. 5(4), pages 678-692.
    17. Jim Ridgway, 2016. "Implications of the Data Revolution for Statistics Education," International Statistical Review, International Statistical Institute, vol. 84(3), pages 528-549, December.

    More about this item

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:jss:jstsof:v:053:i01. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    If CitEc recognized a bibliographic reference but did not link an item in RePEc to it, you can help with this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: Christopher F. Baum (email available below). General contact details of provider: http://www.jstatsoft.org/ .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.