RE: [R] animation?

About this list Date view Thread view Subject view Author view

From: Matthew Nelson (
Date: Tue 20 Mar 2001 - 21:37:22 EST

Message-ID: <>


It is quite easy to do with ImageMagick (, which can be
installed on most OSes. I tried this simple sequence and it worked

In R:

> for(i in 1:5) {
+ jpeg(paste("fig", i, ".jpg", sep = ""))
+ hist(rnorm(100))
+ }

Then from the command line (I tried it using Linux, though it should be the
same on any platform):

% convert -delay 50 -loop 50 fig*.jpg animated.gif

This created animated.gif, a nice animation of my sequence of files. You
can control the timing of the animation by playing with -delay and -loop.



Matthew R. Nelson, Ph.D.
Director, Information Systems
Esperion Therapeutics, Inc.
3621 S. State St.
695 KMS Place
Ann Arbor, MI 48108

Phone: (734) 222-1839 ** Note Change **
Mobile: (734) 657-6302
Fax: (734) 332-0516

> -----Original Message-----
> From: Bill Simpson []
> Sent: Tuesday, March 20, 2001 4:43 AM
> I was wondering if anyone out there has created a series of
> images (e.g.
> jpegs) using R, then animated them on a web page. I have
> looked around a
> bit and it seems fairly complicated. One approach that seems
> sensible is
> to use a java script that displays the list of images. I have
> only used
> html on web pages before so I don't know how to use java...
> Ideally the final result is easily ported to all OSes of web servers.
> Thanks very much for any help.
> Bill Simpson
r-help mailing list -- Read
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To:

About this list Date view Thread view Subject view Author view

This archive was generated by hypermail 2b30 : Fri 22 Jun 2001 - 18:58:36 EST