Learn R Programming

animation (version 0.2-0)

ani.start: Start the generation of an HTML animation page

Description

Copy JavaScript file FUN.js and CSS file ANI.css to the same directory as the HTML animation page and write the header part of the HTML page. The prompt of the current R session is modified (by default ANI>).

Usage

ani.start(outdir = tempdir(), filename = "index", extension = "htm", 
    withprompt = "ANI> ", Title = "Animated Statistics Using R")

Arguments

outdir
physical directory to store the animation output
filename
name of the target HTML main file
extension
extension of the target HTML file (htm, html,...)
withprompt
prompt to display while using ani.start (restore with ani.stop)
Title
string to pass to HTML tag

Value

  • None (invisible `NULL').

Details

A new environment called ANIenv is build, where internal variables such as physical path are stored. This environment is not visible to the user. It is destroyed when calling ani.stop. Only a part of the HTML page is written (such as the head area), and the rest part will be completed by ani.stop.

See Also

savePNG, ani.stop

Examples

Run this code
# save the animation in HTML pages and auto-browse it 
ani.start()
boot.iid(saveANI = TRUE, width = 600, height = 500, interval = 0.2)
ani.stop()

Run the code above in your browser using DataLab