By using this site, you agree to the Privacy Policy and Terms of Use.
Accept
SmartData CollectiveSmartData Collective
  • Analytics
    AnalyticsShow More
    AI analytics
    AI-Based Analytics Are Changing the Future of Credit Cards
    6 Min Read
    data overload showing data analytics
    How Does Next-Gen SIEM Prevent Data Overload For Security Analysts?
    8 Min Read
    hire a marketing agency with a background in data analytics
    5 Reasons to Hire a Marketing Agency that Knows Data Analytics
    7 Min Read
    predictive analytics for amazon pricing
    Using Predictive Analytics to Get the Best Deals on Amazon
    8 Min Read
    data science anayst
    Growing Demand for Data Science & Data Analyst Roles
    6 Min Read
  • Big Data
  • BI
  • Exclusive
  • IT
  • Marketing
  • Software
Search
© 2008-23 SmartData Collective. All Rights Reserved.
Reading: Create animated graphics with R
Share
Notification Show More
Aa
SmartData CollectiveSmartData Collective
Aa
Search
  • About
  • Help
  • Privacy
Follow US
© 2008-23 SmartData Collective. All Rights Reserved.
SmartData Collective > Big Data > Data Mining > Create animated graphics with R
Data MiningPredictive Analytics

Create animated graphics with R

DavidMSmith
Last updated: 2009/04/05 at 9:01 PM
DavidMSmith
3 Min Read
SHARE

In a post last week, I wondered whether it was possible to create animated data charts with R. I think I’ve found a solution.

The animations package bills itself as “various functions for animations in statistics, covering many areas such as probability theory, mathematical statistics, multivariate statistics, nonparametric statistics, sampling survey, linear models, time series, computational statistics, data mining and machine learning”, which makes it seem like a collection of specific animation examples. Those examples are indeed there, but of arguably more value is the underlying general framework it provides for creating animations from the standard 2-D plotting tools that R provides.

The basic idea is that you create each frame of the animation as an R chart (using tools like plot, text, lines, etc.).  You bound the code creating the plots with the functions ani.start and ani.stop; within those bounds, each command that would normally create a new page for a plot instead creates a new frame of the animation. By default the animation is saved as an HTML page with an animation driven by JavaScript, but provided you have the appropriate image-conversion tools (ImageMagick and SW…

More Read

Image

Big Data Sets You Can Use with R

Visualizing Katrina’s Strongest Winds with R
Demand for R Jobs on the Rise, While SAS Jobs Decline
What is R? A New Video on the History, Community and Applications of R [VIDEO]
Forex Trading with R : Part 2

In a post last week, I wondered whether it was possible to create animated data charts with R. I think I’ve found a solution.

The animations package bills itself as “various functions for animations in statistics, covering many areas such as probability theory, mathematical statistics, multivariate statistics, nonparametric statistics, sampling survey, linear models, time series, computational statistics, data mining and machine learning”, which makes it seem like a collection of specific animation examples. Those examples are indeed there, but of arguably more value is the underlying general framework it provides for creating animations from the standard 2-D plotting tools that R provides.

The basic idea is that you create each frame of the animation as an R chart (using tools like plot, text, lines, etc.).  You bound the code creating the plots with the functions ani.start and ani.stop; within those bounds, each command that would normally create a new page for a plot instead creates a new frame of the animation. By default the animation is saved as an HTML page with an animation driven by JavaScript, but provided you have the appropriate image-conversion tools (ImageMagick and SWFtools) installed, you can also save the animation as an animated GIF, MPG movie, or SWF animation.

You can see R code examples creating various animations at AniWiki. But be sure to check out the examples of using the animations package to create some cool optical illusions, too.

TAGGED: r
DavidMSmith April 5, 2009
Share This Article
Facebook Twitter Pinterest LinkedIn
Share

Follow us on Facebook

Latest News

Data Ethics: Safeguarding Privacy and Ensuring Responsible Data Practices
Data Ethics: Safeguarding Privacy and Ensuring Responsible Data Practices
Best Practices Big Data Data Collection Data Management Privacy
data protection for SMEs
8 Crucial Tips to Help SMEs Guard Against Data Breaches
Data Management
How AI is Boosting the Customer Support Game
How AI is Boosting the Customer Support Game
Artificial Intelligence
AI analytics
AI-Based Analytics Are Changing the Future of Credit Cards
Analytics Artificial Intelligence Exclusive

Stay Connected

1.2k Followers Like
33.7k Followers Follow
222 Followers Pin

You Might also Like

Image
Big DataSoftware

Big Data Sets You Can Use with R

9 Min Read

Visualizing Katrina’s Strongest Winds with R

1 Min Read

Demand for R Jobs on the Rise, While SAS Jobs Decline

1 Min Read

What is R? A New Video on the History, Community and Applications of R [VIDEO]

2 Min Read

SmartData Collective is one of the largest & trusted community covering technical content about Big Data, BI, Cloud, Analytics, Artificial Intelligence, IoT & more.

data-driven web design
5 Great Tips for Using Data Analytics for Website UX
Big Data
AI chatbots
AI Chatbots Can Help Retailers Convert Live Broadcast Viewers into Sales!
Chatbots

Quick Link

  • About
  • Contact
  • Privacy
Follow US
© 2008-23 SmartData Collective. All Rights Reserved.
Go to mobile version
Welcome Back!

Sign in to your account

Lost your password?