RE: [R] animation?

About this list Date view Thread view Subject view Author view

From: Matthew Nelson (mnelson@esperion.com)
Date: Tue 20 Mar 2001 - 21:37:22 EST


Message-ID: <8156A6FE684ED21194D20008C756F8DF4440DA@independence.esperion.com>

Bill,

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

In R:

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

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.

Regards,

Matt

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
email: mnelson@esperion.com
web: http://www.esperion.com

> -----Original Message-----
> From: Bill Simpson [mailto:wsi@gcal.ac.uk]
> 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 http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


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