[R] how do I make a movie out of a timeseries of 2D data?

Greg Snow Greg.Snow at imail.org
Thu Jan 12 17:25:47 CET 2012


If you need the animation in a file outside of R (or possibly in R) then look at the animation package.  This allows you quite a few options on how to save an animation, some of which depend on outside programs, but options mean that if you don't have one of those programs there are other ways to do this.

If you just want to explore this within R then the development version of the TeachingDemos package (on R-Forge) has added an animate control to the tkexamp function.  Just create a function that takes the time index as the argument and creates the plot you want for each time, then run tkexamp using the animate control for the time argument.  You will see a new window with the plot for the 1st time index along with a slider that will let you move through time and a button that will step through the remaining times automatically (you can specify the speed when running tkexamp).

-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of Michael
Sent: Thursday, January 12, 2012 7:38 AM
To: r-help; r-sig-finance
Subject: [R] how do I make a movie out of a timeseries of 2D data?

Hi all,

I have an array of 10000 x 200 x 200 numbers... which is a time-series of
200x200 2D data...

The 1st dimension is the time index.

Is there a way to make a movie out of these data - i.e. playback 10000
frames(200x200) at a playback rate per second?

Thanks a lot!

	[[alternative HTML version deleted]]

______________________________________________
R-help at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list