How can I make a consecutive animation of buttons?

How do I make an animation using an animation package for several independent maps plotting by ggmap package to reflect distribution changes of points by hour?

  • I have a .csv file of devices positions with columns "Date","time","lat","lon","radius", "position_method". I want to plot the points data on Google map and make animation to reflect points changes by hour. I used the powerful animation package ( http://cran.r-project.org/web/packages/animation/animation.pdf. ) and a demo (http://xccds1977.blogspot.fi/2012/06/ggmap.html). By the loop for( i in time) print(plotfunc(i) I got an  animation but it accumulated new points and old ones, so the points are  increasing as sum. It could not reflect the changes of distribution. Do you  know how to make the animation just show the points in each hour one by  one rather than accumulate them? The animation I got is like the gif in the demo from Kai Xiao, but it is not what I wish. Only what I need is just  making animation combining independent images.

  • Answer:

    The subset df statement should be : df <- subset(all,byhours>=x-1 & byhour<= x)

Chenlu Wang at Quora Visit the source

Was this solution helpful to you?

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.