How do I install the latest version of rgl?
The package is rgl
developed in R-forge at https://r-forge.r-project.org/projects/rgl/ . The easiest way to install the latest version should be
install.packages("rgl", repos="http://R-Forge.R-project.org")
but this often fails as R-forge does not always have current builds. How do you get it?
source to share
There are two alternatives.
The easiest way is probably to install from Github using
devtools::install_github("rforge/rgl", subdir="pkg/rgl")
EDITED ADD: It didn't work for a while as the Github mirror was not updated. This seems fine now, but if it dies again, the only one of the three methods described in this answer that still works is the one using svn.
This installs a version that can be several hours long. This requires you to have the tools to install the source; rgl
contains a lot of code that needs to be compiled. These tools are available for Windows at https://cloud.r-project.org/bin/windows/Rtools/ . OSX installation requires Xcode and XQuartz and possibly some other packages. Linux users will also need to install several libraries.
An alternative way (the only one of the three described here that still works) is to check the original tree from SVN with
svn checkout svn://svn.r-forge.r-project.org/svnroot/rgl/
You can also check from the Github mirror using
git clone https://github.com/rforge/rgl.git
The sources rgl
will be in the rgl / pkg / rgl subdirectory. Then you can install it with
R CMD INSTALL rgl
(subject to all prerequisites).
source to share