April 2016
Beginner to intermediate
246 pages
5h 20m
English
When dealing with complex datasets, having the possibility to show your data in a 3D environment can be really enhancing.
This recipe will show you how to create such a plot, animate it, and export your animation as a GIF.
This recipe will leverage the rgl package specifically developed for 3D visualizations in R:
install.packages("rgl")
library(rgl)We will also need to install ImageMagick in order to perform the export into the GIF format.
You can find instructions for software installation at http://www.imagemagick.org/script/binary-releases.php.
As an explicative dataset, we will use the iris dataset, which is a built-in dataset available with all base R installations.
The iris