[R-pkgs] Package animation update (v2.0-0)

Yihui Xie xie at yihui.name
Tue Jan 4 16:55:20 CET 2011


The animation package 2.0-0 is on CRAN now. This version is a
milestone of the animation package. It includes a new function
saveHTML() which uses a much more elegant interface and is consistent
in syntax with other save*() functions such as saveMovie(), saveSWF()
and saveLatex(). Lots of demos have been added to demonstrate the
flexibility of this package, e.g. now we can get the snapshots of rgl
3D plots and insert them into LaTeX with a single call to saveLatex(),
or even into Sweave documents.

There are some funny demos in this version too, e.g. demo('fireworks')
to set fireworks, or demo('CLEvsLAL') which is a "replay" of an NBA
game between Cavaliers and Lakers on 2009.

Have fun!

                 CHANGES IN animation VERSION 2.0-0


   o a new demo 'Xmas2': Merry Christmas with snowflakes (see
 demo('Xmas2', 'animation'); thanks, Jing Jiao)

   o a new function saveHTML() to insert animations into HTML pages
 (this was designed to replace the old ani.start() and ani.stop();
 the output is much more appealing; the JavaScript is based on the
 SciAnimator library and jQuery)

   o ani.options() gained a new option 'autoplay' to indicate whether
 to autoplay the animation in the HTML page created by saveHTML()

   o in fact ani.options() was rewritten, but this should not have
 any influence on users; the usage is the same

   o ani.options() gained a new option 'use.dev' to decide whether to
 use the graphics device provided in ani.options('ani.dev') when
 calling saveHTML(), saveLatex(), saveMovie() and saveSWF()

   o ani.options() has a couple of hidden options ('convert',
 'swftools', 'img.fmt') which can be useful too; see ?ani.options for

   o a new function ani.pause(): it is a wrapper to
 Sys.sleep(interval) but it will not pause when called in a
 non-interactive graphics device (usually the off-screen devices);
 this is the recommended way to specify the pause in the animation
 now -- all the functions in this package have been adjusted to use

   o a new demo('pollen') to show the hidden 'structure' in a large
 data (requires the rgl package)

   o a new demo('CLEvsLAL') to `replay' the NBA game between CLE and
 LAL on 2009 Christmas (with a new dataset 'CLELAL09')

   o a new demo('fireworks') to set fireworks using R (thanks,
 Weicheng Zhu)

   o saveLatex() can work with the rgl package to produce 3D animations
 in a PDF document now; see demo('rgl_animation')

   o a new demo('rgl_animation') to demonstrate how to insert rgl 3D
 animations into a LaTeX document and compile to PDF

   o a new demo('use_Cairo') to show how to use the Cairo device in
 this package to obtain high-quality output

   o a new demo('Sweave_animation') to show how to insert animations
 into Sweave documents

   o a new demo('game_of_life') to demonstrate the (amusing) Game of
 Life (thanks, Linlin Yan)


   o the documentation of this package has been tremendously revised;
 hopefully it is more clear to read now

   o several arguments in saveMovie(), im.convert(), saveSWF() and
 saveLatex() were removed, because they can be specified by
 ani.options(); this can simplify the usage of these functions


   o the argument 'para' in saveMovie() was removed; the argument
 'ani.first' was also removed from all the save*() functions, because
 this can be written in 'expr' and there is no need to provide an
 additional argument

   o the path of the output in im.convert() and gm.convert() will be
 quoted, because sometimes users might supply a path containing
 spaces (thanks, Phalkun Chheng)

   o the option 'filename' in ani.options() was renamed to 'htmlfile'
 so that the meaning of this option is more clear; 'footer' was
 renamed to 'verbose' too

   o ani.options() can accept any arguments now

   o im.convert() and gm.convert() will no longer stop() when the
 convert utility cannot be found; instead, they only issue warnings;
 a hidden option ani.options('convert') can be used to specify the
 location of convert.exe in ImageMagick

   o saveMovie(), saveHTML(), saveSWF() and saveLatex() will try to
 open the output if ani.options('autobrowse') is TRUE; and they will
 keep the current working directory untouched when evaluating 'expr'
 (i.e.  'expr' will be evaluated under getwd())

Yihui Xie <xieyihui at gmail.com>
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA

More information about the R-packages mailing list