I installed R 4 in an MX Linux 19.3 (XFCE) laptop, and it works fine, including Rstudio. However, attempts to install Rcmdr (install.packages("Rcmdr", dependencies=TRUE) failed, producing a list of errors about unavailable packages, etc.
I tried several repositories, but all produced the same disappointing result. Previously, I used Rcmdr with R 3.5 and 3.6, so I sort of thought I knew how to do it-- until now.
Any ideas would be welcome.
Asked
Active
Viewed 146 times
0

user212409
- 1
- 1
-
If you could post the specific error output you get, it would help us help you! Even if it seems like a lot of text, sometimes the package that caused the problem is way back on the command line. Some packages rely on a variety of non-R libraries that need to be installed before the R package that wraps that binary can be installed. Tracking down the specific ones you need can depend on your setup. – Andrew Brown Dec 03 '20 at 08:08
-
Also, a tip is to restart your R session (Ctrl+Shift+F10 in Rstudio) to unload any packages that may be currently loaded. Some packages are used by Rstudio itself and I find that I have to install from the regular terminal. – Andrew Brown Dec 03 '20 at 08:10
-
Thanks, Andrew. I had installed many missing packages outside R, but it still does not work. I see many instances of: Error: package ‘XXX’ was installed before R 4.0.0: please re-install it Is there a way to tell R/Rstudio to re-install all those packages that need to be re-installed? Otherwise, I shall never finish re-installing all those nested dependencies. – user212409 Dec 03 '20 at 11:36
-
Ooh. That is a very interesting piece of information that would have been evident if you had edited your post to add the console log. It sounds like your R library path is messed up and is directed at a folder containing 3.x.x installed packages. – Andrew Brown Dec 03 '20 at 16:48
-
Check out https://stackoverflow.com/questions/31707941/how-do-i-change-the-default-library-path-for-r-packages/42643674 – Andrew Brown Dec 03 '20 at 16:49
-
Thanks for your help-- I suspect you are right about the old version contamination-- it looks like R 4 was being installed in the same folder as 3.5 and 3.6. I removed those, but I am still getting the error. I tried to post the console output, but stackOverflow has some draconian rules about the acceptable format for such pastes, which it considers "code" that must be formatted properly, and I gave up on that after a few attempts. I did nothing about setting up the Library-- I just left everything as default. In R 3.5 or 3.6 I had no such problems. – user212409 Dec 03 '20 at 17:05
-
I would delete your library folder. Most library paths returned by `.libPaths()` should have a version-specific subfolder. But you could have a setup with a local library where all of your R installations are dumping their installations into. If you have multiple versions of R installed, might be best to cull them and make sure your $PATH is set up to use the correct one from command line, etc. – Andrew Brown Dec 03 '20 at 17:13
-
I have now removed the old versions and made sure that the PATH points to the correct location where R 4 files are, but the problem persists-- it seems to gag on ggplot2. – user212409 Dec 03 '20 at 22:03
-
1Getting rid of the library-site in /usr/local/lib/R and reinstalling solved the problem. It shouldn't be that hard, but I am ignorant... – user212409 Dec 04 '20 at 12:18
1 Answers
0
Getting rid of the library-site in /usr/local/lib/R and reinstalling Rcmdr solved the problem. It shouldn't be that hard, but I am ignorant...

user212409
- 1
- 1