title: Create Time Series World Traffic Animation Using ggplot2, ggmap, plyr and animate
body: <p>I am trying to use a ggplot call inside of ddply as input to the animate package to create a time series world traffic animation. Here is my code;</p>
  
  <pre><code>library("ggmap")
  library(maptools)
  library(maps)
  library(plyr)
  
  ......
  
  
  #create map which we will then populate
  mapWorld &lt;- borders("world", colour="gray50", fill="gray50") # create a layer of borders
  
  
  plots&lt;-dlply(b, .(b$day), function(b) ggplot(b, aes(x=lon, y=lat, color=country, 
  group=country)) +   mapWorld + geom_point(data=b, aes(x=lon, y=lat, 
  size=counts/100))+scale_size_identity(trans="sqrt")+guides(colour = guide_legend(override.aes 
  = list(size=3))))
  
  library(animation)
  #ani.options(interval=.05)
  
  animation::saveVideo(plots, interval=0.5, video.name="world_animation.gif")
  </code></pre>
  
  <p>b is a data frame containing <strong>day</strong> eg. 01/01/2014,<strong>lon</strong> eg 73, <strong>lat</strong> e.g. 52, <strong>country</strong> e.g. US, <strong>counts</strong> e.g. 25.</p>
  
  <p>However I keep getting the following error:</p>
  
  <pre><code>[image2 @ 0x7fd96c817000] Could find no file with path 'Rplot%d.png' and index in the range 0-4
  Rplot%d.png: No such file or directory
  </code></pre>
  
  <p>Any suggestions?</p>
  
  <p>Thanks!</p>