filmov
tv
How to fix R package installation problems on Linux (libraries and their dependencies won't install)

Показать описание
This tutorial shows you how to fix, once and for all, a very bad problem with running R (and Rstudio) on Linux. This problem is not well documented online, although I'm sure you've experienced this problem, too. This is where you try to install an R package, either through R directly or through Rstudio, and you get an error that one or more of the dependent packages were not installed. Therefore the installation fails. When you try to install the dependent packages, they also fail to install, because some of their dependencies were not installed, and so on. It makes no differences whether or not you use the "dependencies = TRUE" flag when performing the installation. You'll get the same problem.
The solution is provided in this video! I posted about it on an R help forum, and a couple of contributors helped me out. I share the solution here.
The overall steps are to uninstall all of the R libraries, uninstall R, uninstall Rstudio, reboot, and then reinstall R and Rstudio, and then install the r2u package, which provides the entire CRAN (R) repository as local binaries. From then on, R will install your packages from the local binaries with no problems.
All the code you'll need is found here:
Here is a link for installing R and Rstudio under Ubuntu Linux:
Комментарии