rgl is a R package for three-dimensional visualisation using OpenGL. The package provides functions implementing a new graphics device suitable for visualisation of R objects in three dimensions using the OpenGL libraries.
It can be installed from the Ubuntu repostitories with
sudo aptitude install r-cran-rgl
or on all platforms inside R with
install.packages("rgl")
BUT:
It depends on some GL libraries installed, which do not get installed by default. So you might expect unsuccessful installation, with an error message like
missing required header GL/gl.h
.
The solution is to install the missing library manually with
sudo aptitude install libglu1-mesa-dev
… one of those inconveniences preventing mainstream users switching to OpenSource software – it seems to me.