Share the Gallery !Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInEmail this to someone

animated_count_down

a

a

a

This is probably the most basic animated plot (.gif format) you can do with R. Here is an explanation on how to realize it. This example has been found on Mark Heckmann’s R you ready website.

a

a

First, we have to create all the images that will compose the .gif. For example, we can do a loop and export an image at each iteration of the loop. Make sure to create a new folder first.

Now that we have created 11 images, we convert the .png files to one .gif file using ImageMagick. The system() function executes the command as if it was done in the terminal. The -delay flag sets the time between showing the frames, i.e. the speed of the animation.

Remove the individual .png images that are useless now


Not what you are looking for ? Make a new search !


Leave a Reply

Be the First to Comment!

Notify of
avatar
wpDiscuz