[R] Creating Movies with R

Gregor Gorjanc gregor.gorjanc at bfro.uni-lj.si
Tue Sep 26 03:07:27 CEST 2006


J.R. Lockwood <lockwood <at> rand.org> writes:
> An alternative that I've used a few times is the jpg() function to
> create the sequence of images, and then converting these to an mpeg
> movie using "mencoder" distributed with "mplayer".  This works on both
> windows and linux.  I have a pretty self-contained example file
> written up that I can send to anyone who is interested.  Oddly, the
> most challenging part was creating a sequence of file names that would
> be correctly ordered - for this I use:
> lex <- function(N){
>   ## produce vector of N lexicograpically ordered strings
>   ndig <- nchar(N)
>   substr(formatC((1:N)/10^ndig,digits=ndig,format="f"),3,10000000)
> }

RWiki[1] would be a very nice place for such explanation. I am looking forwrad 
to it!



More information about the R-help mailing list