[R] HOW to Create Movies with R with repeated plot()?

Francisco J. Zagmutt gerifalte28 at hotmail.com
Wed Jul 27 19:47:56 CEST 2005


What platform are you working on?  On windows you can also create an 
animated gif file using ImageMagik (http://www.imagemagick.org/) from the 
cmd or you can use the more user friendly UnFREEz downloadable at 
http://www.whitsoftdev.com/unfreez/ ot Microsoft GIF animator(search for it 
on google). All the software mentioned are free and I have used them in the 
past to animate R output.  Take a look at RSiteSearch("movie") for other 
interesting threads.

Cheers

Francisco


>From: Martyn Plummer <plummer at iarc.fr>
>To: Jan Verbesselt <Jan.Verbesselt at biw.kuleuven.be>
>CC: r-help at stat.math.ethz.ch
>Subject: Re: [R] HOW to Create Movies with R with repeated plot()?
>Date: Wed, 27 Jul 2005 15:23:54 +0200
>
>On Wed, 2005-07-27 at 12:11 +0200, Jan Verbesselt wrote:
> > Dear R-helpers,
> >
> >
> >
> > Is it possible to create a type of 'movie' in R based on the output of
> > several figures (e.g., jpegs) via the plot() function.  I obtained 
>dynamic
> > results with the plotting function and would like to save these as a 
>movie
> > (e.g., avi or other formats)?
>
>You can use ImageMagick tools to convert a set of bitmap files into an
>animated GIF. For example, in R, this creates 101 separate png files:
>
>x <- seq(-1,1,length=101)
>y <- x^2
>png()
>for (i in 1:length(y)) {
>   plot(x[1:i], y[1:i], xlim=c(-1,1), ylim=c(0,1), type="l")
>}
>dev.off()
>
>Then, on the command line (on Linux) this joins them together
>
>convert -delay 10 Rplot*.png Rplot.gif
>animate Rplot.gif
>
>You can also create MNG format, but this is less widely supported.
>
>Martyn
>
>
>-----------------------------------------------------------------------
>This message and its attachments are strictly confidential. ...{{dropped}}
>
>______________________________________________
>R-help at stat.math.ethz.ch mailing list
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide! 
>http://www.R-project.org/posting-guide.html




More information about the R-help mailing list