# animation v2.5

## A Gallery of Animations in Statistics and Utilities to Create Animations

Provides functions for animations in statistics, covering topics
in probability theory, mathematical statistics, multivariate statistics,
non-parametric statistics, sampling survey, linear models, time series,
computational statistics, data mining and machine learning. These functions
may be helpful in teaching statistics and data analysis. Also provided in
this package are a series of functions to save animations to various formats,
e.g. Flash, 'GIF', HTML pages, 'PDF' and videos. 'PDF' animations can be
inserted into 'Sweave' / 'knitr' easily.

## Readme

# animation

## Introduction

This is an R package to create and export animations to a variety of formats (HTML/JS, GIF, Video, PDF), and it also serves as a gallery of statistical animations.

## Installation

To install the stable version on CRAN:

```
install.packages('animation')
```

To install the GitHub version under development:

```
install.packages('animation', repos = 'http://yihui.name/xran')
```

If you want to contribute, the documentation and NAMESPACE of this package
are generated by **roxygen2** and **Rd2roxygen**:

```
if (!require('Rd2roxygen') install.packages('Rd2roxygen')
library(Rd2roxygen)
rab('animation', install = TRUE)
```

## Contact

Bugs and feature requests can be filed to https://github.com/yihui/animation/issues. Pull requests are also welcome.

## Functions in animation

Name | Description | |

Rosling.bubbles | The bubbles animation in Hans Rosling's Talk | |

ani.options | Set or query animation options | |

BM.circle | Brownian Motion in a circle | |

CLELAL09 | The NBA game between CLE Cavaliers and LAL Lakers on Dec 25, 2009 | |

MC.samplemean | Sample Mean Monte Carlo integration | |

ani.pause | Pause for a while and flush the current graphical device | |

ani.record | Record and replay animations | |

animation-package | A Gallery of Animations in Statistics and Utilities to Create Animations | |

bisection.method | Demonstration of the Bisection Method for root-finding on an interval | |

boot.iid | Demonstrate bootstrapping for iid data | |

newton.method | Demonstration of the Newton-Raphson method for root-finding | |

pageview | Page views from Sep 21, 2007 to Dec 2, 2007 of Yihui's website | |

boot.lowess | Bootstrapping with LOWESS | |

brownian.motion | Demonstration of Brownian motion on the 2D plane | |

kmeans.ani | Demonstration of the k-Means clustering algorithm | |

knn.ani | Demonstration of the k-Nearest Neighbour classification | |

ani.start | Generate an HTML animation page | |

ecol.death.sim | A simulation of the death of two species with certain probabilities | |

flip.coin | Probability in flipping coins | |

least.squares | Demonstrate the least squares method | |

HuSpeech | Word counts of a speech by the Chinese President Hu | |

MC.hitormiss | Hit or Miss Monte Carlo integration | |

buffon.needle | Simulation of Buffon's Needle | |

clt.ani | Demonstration of the Central Limit Theorem | |

cv.ani | Demonstration for the process of cross-validation | |

g.brownian.motion | Brownian Motion using Google Visualization API | |

grad.desc | Gradient Descent Algorithm for the 2D case | |

sample.strat | Demonstration for the stratified sampling | |

sample.system | Demonstration for the systematic sampling | |

ObamaSpeech | Word counts of a speech by the US President Obama | |

conf.int | Demonstration of the concept of confidence intervals | |

im.convert | A wrapper for the `convert' utility of ImageMagick or GraphicsMagick | |

saveVideo | Convert a sequence of images to a video by FFmpeg | |

sim.qqnorm | Simulation of QQ plots for the Normal distribution | |

moving.block | Cycle through an R object and plot each subset of elements | |

mwar.ani | Demonstration for ``Moving Window Auto-Regression'' | |

saveGIF | Convert images to a single animation file (typically GIF) using ImageMagick or GraphicsMagick | |

saveHTML | Insert animations into an HTML page | |

lln.ani | Demonstration of Law of Large Numbers | |

sample.ratio | Demonstrate the ratio estimation in sampling survey | |

sample.simple | Demonstration for simple random sampling without replacement | |

vi.lilac.chaser | Visual Illusions: Lilac Chaser | |

cv.nfeaturesLDA | Cross-validation to find the optimum number of features (variables) in LDA | |

price.ani | Demonstrate stock prices in animations | |

qpdf | A wrapper for the PDF toolkit qpdf | |

saveLatex | Insert animations into a LaTeX document and compile it | |

saveSWF | Convert images to Flash animations | |

iatemp | Average yearly temperatures in central Iowa | |

kfcv | Sample sizes for k-fold cross-validation | |

pdftk | A wrapper for the PDF toolkit Pdftk | |

pollen | Synthetic dataset about the geometric features of pollen grains | |

quincunx | Demonstration of the Quincunx (Bean Machine/Galton Box) | |

sample.cluster | Demonstration for the cluster sampling | |

vanke1127 | Stock prices of Vanke Co., Ltd on 2009/11/27 | |

vi.grid.illusion | Visual illusions: Scintillating grid illusion and Hermann grid illusion | |

No Results! |

## Details

Type | Package |

Date | 2017-03-30 |

SystemRequirements | ImageMagick (http://imagemagick.org) or GraphicsMagick (http://www.graphicsmagick.org) or LyX (http://www.lyx.org) for saveGIF(); (PDF)LaTeX for saveLatex(); SWF Tools (http://swftools.org) for saveSWF(); FFmpeg (http://ffmpeg.org) or avconv (https://libav.org/avconv.html) for saveVideo() |

License | GPL |

URL | https://yihui.name/animation |

BugReports | https://github.com/yihui/animation/issues |

LazyData | yes |

RoxygenNote | 6.0.1 |

suggests | class , MASS , testit |

depends | R (>= 2.14.0) |

Contributors | Christian Mueller, Weicheng Zhu, Lijia Yu |

#### Include our badge in your README

```
[![Rdoc](http://www.rdocumentation.org/badges/version/animation)](http://www.rdocumentation.org/packages/animation)
```