ani.start {animation} | R Documentation |
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>
).
ani.start(outdir = tempdir(), filename = "index", extension = "htm", withprompt = "ANI> ", Title = "Animated Statistics Using R")
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 <title> tag |
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
.
None (invisible `NULL
').
After calling ani.start
, either animation functions in this package or R script of your own can be used to generate & save animated pictures using savePNG
, then watch your animation by ani.stop(autobrowse = TRUE)
.
Yihui Xie
## Not run: # 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() ## End(Not run)