When I am sitting in front of my Mac this morning, and listening the fireworks exploding out of the window, I am sure it is the time to welcome the Chinese New Year of 2015. As I deeply depend on R programme for statistical analyses, it will be the best way to deliver my new year’s wish created by R.
To generate this animation, just run the code in the following three steps:
Open the R console, and install the animation package: install.packages('animation')
Load the animation package: library(animation)
Run the demonstration code of the fireworks: demo('fireworks')
You will receive three documents (named image, css, and js) and a webpage file (fireworks.html) in your working directory (show the working directory of your R programm by typing: getwd()). Open the webpage file by any web browser, such as Internet Explorer, Chrome, or Safari, and the animation will come out.
Happy New Year for all!
The detailed code for demo('fireworks') are as below.