Package tweenr package is another creation from Thomas Lin Pedersen. It works works well with gganimate, making it easier to interpolate your data between different states. With this package, a higher level of customization can be achieved with much less effort, and the possibilities are nothing but amazing.
There are mainly three functions used to create animations with tweenr, and this recipe introduces the most versatile of them all, tween_elements. It basically works with the data set by setting three roles to variables: time, id, and ease.
The following example does bear no meaning but the final result is very funny and shows what tweenr is capable of doing.