[R] Working with the Animation package in R

Christofer Bogaso bogaso.christofer at gmail.com
Thu Jul 31 22:16:37 CEST 2014


Hi again,

I am trying to create a animation with Animation package. I preferred
to create animation with HTML file than through GIF because this
requires additional installation of ImageMagick which is not possible
with my system.

So I just run following code available in help page:

saveHTML({
    par(mar = c(4, 4, 0.5, 0.5))
    for (i in 1:20) {
        plot(runif(20), ylim = c(0, 1))
        ani.pause()
    }
}, img.name = "unif_plot", imgdir = "unif_dir", htmlfile =
"random.html", autobrowse = FALSE,
    title = "Demo of 20 uniform random numbers", description = c("This
is a silly example.\n\n",
        "You can describe it in more detail.", "For example, bla bla..."))

How this code will create an HTML file in default folder with name
random.html and underlying image files are placed in unif_dir which is
again in the default folder.

However my goal is to carry this entire animation package to some
other system. As a first try I moved the unif_dir to some other
location. However in that case, the random.html failed to work
properly.

I will really appreciate if someone previously worked with this
package can help me on how I can achieve my goal.



More information about the R-help mailing list