Learn R Programming

⚠️There's a newer version (2.8) of this package.Take me there.

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.

Copy Link

Version

Install

install.packages('animation')

Monthly Downloads

8,185

Version

2.4

License

GPL

Maintainer

Yihui Xie

Last Published

August 16th, 2015

Functions in animation (2.4)

price.ani

Demonstrate stock prices in animations
cv.nfeaturesLDA

Cross-validation to find the optimum number of features (variables) in LDA
sample.simple

Demonstration for simple random sampling without replacement
saveGIF

Convert images to a single animation file (typically GIF) using ImageMagick or GraphicsMagick
sample.cluster

Demonstration for the cluster sampling
MC.hitormiss

Hit or Miss Monte Carlo integration
moving.block

Cycle through an R object and plot each subset of elements
clt.ani

Demonstration of the Central Limit Theorem
sim.qqnorm

Simulation of QQ plots for the Normal distribution
ani.record

Record and replay animations
cv.ani

Demonstration for the process of cross-validation
newton.method

Demonstration of the Newton-Raphson method for root-finding
pdftk

A wrapper for the PDF toolkit Pdftk
conf.int

Demonstration of the concept of confidence intervals
vanke1127

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

Convert a sequence of images to a video by FFmpeg
qpdf

A wrapper for the PDF toolkit qpdf
Rosling.bubbles

The bubbles animation in Hans Rosling's Talk
BM.circle

Brownian Motion in a circle
grad.desc

Gradient Descent Algorithm for the 2D case
kmeans.ani

Demonstration of the k-Means clustering algorithm
saveLatex

Insert animations into a LaTeX document and compile it
vi.grid.illusion

Visual illusions: Scintillating grid illusion and Hermann grid illusion
bisection.method

Demonstration of the Bisection Method for root-finding on an interval
knn.ani

Demonstration of the k-Nearest Neighbour classification
brownian.motion

Demonstration of Brownian motion on the 2D plane
kfcv

Sample sizes for k-fold cross-validation
saveHTML

Insert animations into an HTML page
ani.options

Set or query animation options
animation-package

A Gallery of Animations in Statistics and Utilities to Create Animations
MC.samplemean

Sample Mean Monte Carlo integration
ObamaSpeech

Word counts of a speech by the US President Obama
lln.ani

Demonstration of Law of Large Numbers
least.squares

Demonstrate the least squares method
CLELAL09

The NBA game between CLE Cavaliers and LAL Lakers on Dec 25, 2009
im.convert

A wrapper for the `convert' utility of ImageMagick or GraphicsMagick
pageview

Page views from Sep 21, 2007 to Dec 2, 2007 of Yihui's website
boot.iid

Demonstrate bootstrapping for iid data
iatemp

Average yearly temperatures in central Iowa
flip.coin

Probability in flipping coins
g.brownian.motion

Brownian Motion using Google Visualization API
sample.system

Demonstration for the systematic sampling
sample.strat

Demonstration for the stratified sampling
boot.lowess

Bootstrapping with LOWESS
vi.lilac.chaser

Visual Illusions: Lilac Chaser
ecol.death.sim

A simulation of the death of two species with certain probabilities
HuSpeech

Word counts of a speech by the Chinese President Hu
buffon.needle

Simulation of Buffon's Needle
ani.start

Generate an HTML animation page
pollen

Synthetic dataset about the geometric features of pollen grains
saveSWF

Convert images to Flash animations
quincunx

Demonstration of the Quincunx (Bean Machine/Galton Box)
ani.pause

Pause for a while and flush the current graphical device
sample.ratio

Demonstrate the ratio estimation in sampling survey
mwar.ani

Demonstration for ``Moving Window Auto-Regression''