oopt = ani.options(nmax = 50)
# from png
saveSWF(knn.ani(test = matrix(rnorm(16), ncol = 2),
cl.pch = c(16, 2)), 1.5, dev = "png", para = list(mar = c(3,
3, 1, 1.5), mgp = c(1.5, 0.5, 0)), swfname = "kNN.swf")
# from pdf (vector plot!)
ani.options(nmax = 50)
saveSWF(brownian.motion(pch = 21, cex = 5, col = "red", bg = "yellow"),
0.2, "brownian.swf", "pdf", fmt = "")
ani.options(oopt)
Run the code above in your browser using DataLab