How to upgrade R on CentOS - r

I am running version 3.6 of R on CentOS (CentOS Linux release 7.9.2009 (Core)). Is there a simple way to upgrade R to the latest version and upgrade all the installed libraries?
EPEL repository on my machine is epel-release-7-13.noarch and by default, it installs version 3.6 of R.
I was referring to the following post -https://stackoverflow.com/questions/1401904/painless-way-to-install-a-new-version-of-r but the package installr is only available for Windows.
There is another post (How to upgrade R in ubuntu?) that describes how to upgrade R on Ubuntu, however some of these commands do not work on CentOS.
I am sure there must be a painless way to upgrade R in CentOS.

I think this post may help you:
How can I install the newest version of R (currently 4.0.0) on CentOS?
At this point, I'm sure you've solved the problem, but perhaps this will help others.
Official centOS instructions are located here:
https://cran.r-project.org/bin/linux/fedora
With centOS, there's not an easy solution, but this may be the best you can find on the topic.

Related

Upgrade R version from 3.4.4 to 3.5.3 on Ubuntu 16.04

When we ssh onto this Linux server, it says Welcome to Ubuntu 16.04.7 LTS (GNU/Linux 4.4.0-193-generic x86_64), so this is the type of server we are on.
When we run R to launch R in the server from terminal, and then version, we get:
What is the easiest way to upgrade from version 3.4.4 to version 3.5.3? We don't want to upgrade to v4 or to the latest version quite yet until we ensure no breaking issues with our codebase on R v4, however we would like to make this upgrade to 3.5.3 so we can run an R library that requires 3.5.3+.
How can we do this from the command line on the server here, and after switching from 3.4.4 to 3.5.3 do we then need to re-install all R libraries on the server as well? I'm worried if I start running stuff from the command line and I mess up that I'll break our current R app.
I would be surprised if there is a .deb available for this OS release/R release combination.
This page only offers R 4.1, but as far back as 16.04 LTS
This page offers older R versions, but only back to 18.04 LTS
It's also possible that one of the backports on the Debian packages page would work on your system (it reports that 3.5.3 is available for Debian "jessie", although I have no idea how that lines up with Ubuntu releases).
I guess it's possible that one of those .debs works for your system though ... ? If you do install from .deb, you may have to be careful not to clobber your current version (e.g. using the --instdir argument to dpkg).
Building from source:
download the source tarball for R 3.5.3
untar, ./configure, make, sudo make install (assuming you have all the necessary development tools, system libraries, etc.; you'll have to troubleshoot/install as you go along)
It might be worth ./configure --prefix=/path/to/testdir to put the new version in a completely separate location, just to make extra-sure you don't stomp on your current install. (This would also simplify the library-path stuff below.)
Packages do need to be re-installed when switching major versions (e.g. 3.4.x to 3.5.x); one way to do it is to copy the system library of packages to a new place (adjust library paths as necessary; see R installation and administration manual).
Then, you should be able to update.packages(checkBuilt=TRUE, ask=FALSE) to update everything.
The tricky spots are (1) getting the library paths right (this will depend a bit on how things are set up in your existing installation; (2) it's conceivable that some current versions of packages on CRAN will fail to re-install/re-build under R 3.5.3. devtools::install_version() would help, although you'd have to track down the correct version manually. I recall someone posting about a package that would install an archived version by date, which could save a lot of poking around ...

Can't find MRO (Microsoft R Open) installation on MacOS, after installation

Thought I'd give MRO a spin, to see if it speeds up my usage in general.
I can't find the installed R though. Not as a separate, not as an overwrite.
/usr/local/bin/R contains R version 3.4.0 (2017-04-21) -- "You Stupid Darkness", which is also the one used by RStudio.
/Library/Frameworks/R.framework/Versions/ also only contains 3.4.
The GUI "Microsoft R Open.app" has the description R 3.3.0 GUI 1.68 Mavericks build... but it also returns 3.4.
What am I missing?
You've identified a bug in the installer. Thanks!
Looks like we are not installing the MRO framework files because the package installer is detecting a newer version (CRAN 3.4). We will get this fixed in the next release.
In the meantime, you can work around this by renaming /Library/Frameworks/R.framework/Versions/3.4 to /Library/Frameworks/R.framework/Versions/0.3.4 and reinstalling MRO. Then go ahead and rename it back.
Please note, as a part of the install we update the symlinks to point to our version, so if you would prefer the default R installation to be CRAN 3.4 please do the install in the reverse order or manually update the symlink to Current in the Versions folder.

Upgrade R version 2.15.1 to 3.3 on Debian server (linux-gnu)

I'm in internship and I'm working on a Debian server
for my R's scripts.
However, the version installed on the server is really outdated (2.15.1)
and I think, it might be the reason of some errors I have with my scripts
(which work on my windows PC with R 3.3).
But I am totally a beginner with Linux and I'm stuck.
I know there is a tutorial (https://cran.r-project.org/bin/linux/debian/)
but it's a very specific vocabulary I don't understand completely + my inexperience with Linux servers make it hard to understand exactly what I have to do.
Is it possible to have more explanations on how to install R 3.3 on Debian
server ?
Here are the details from sessionInfo() of the server :
R version 2.15.1 (2012-06-22)
Platform : i486-pc-linux-gnu (32 bit)
I would suggest that you install the '-dev' version of base R
sudo apt-get install r-base r-base-dev
and then as a regular user use R's install.packages() to install additional packages. This will result in an installation where R and it's base packages are accessible to all but owned by root (and therefore difficult for a regular user to update / mess up) and other packages belong to the regular user (and hence easy to update).
Some packages may have system dependencies, e.g., XML requires the libxml2 and libcurl libraries. The '-dev' version of these libraries also need to be installed, most easily via apt-get
sudo apt-get install libxml2-dev libcurl4-openssl-dev
It may be that your version of apt knows nothing about r-base / r-base-dev. You should then follow the section 'Installing R-devel or a release branch from svn' in the document you mention; skip over the instructions in the 'R-devel' section, and instead follow 'r-patched'.

How do I upgrade R 3.1.2 to 3.2 through R studio?

I am using R studio in linux machine. I need to upgrade R version 3.2 (the latest version) from 3.1.2.
I need an upgrade because I was trying to install a package, but gave me this error:
Bioconductor version 3.0 (BiocInstaller 1.16.5), ?biocLite for help
A new version of Bioconductor is available after installing the most recent version of R; see http://bioconductor.org/install
Please read the excellent README for Ubuntu at CRAN and follow the steps outlined therein.
You have to do this at the command-line, ie in a terminal -- NOT in RStudio.
We support all this on a dedicated mailing list r-sig-debian which you can also peruse via gmane.

Install R packages from binary in Ubuntu Lucid

I've installed R in Ubuntu Lucid with the command
sudo aptitude install r-base
When I try to "install.packages" it seems to download source and then spend ages compiling it. How can I get it to just download and install the binaries, like I'm used to on Windows?
Is there any need to compile the packages myself? I'm running inside a VM so it would be great to keep things as slim as possible.
Thanks
CRAN only distributes source for Unix, in other words no binaries are offered (unlike for Windows). So you simply have to compile the packages locally.
That said, we have been working for a few years now on a system to turn CRAN source packages into Debian binary packages -- see cran2deb / debian.cran.r-project.org. We currently build i386 binaries for Debian testing and are in the process of rewriting the backend to offer amd64 for Debian again and then eventually i386 and amd64 for Ubuntu. This already offers well over two-thousand binary packages but not yet for all the flavours we would like to support eventually.
If and when that goal will be accomplished is hard to say; this is a volunteer effort and the main developer (Charles) recently lost his laptop.
CRAN packages are available in the Ubuntu package repository, but are updated with CRAN only when Ubuntu is updated. If you want to use the latest CRAN version of a package and the repository is not at the same version, you will need to go through the compilation/installation procedure.
Details in the Ubuntu R packages can be found on CRAN, which should give you all the information you require.
As this (the provision of binaries) is all volunteer effort on the part of the CRAN maintainers, R Core and other devoted members of the community (e.g. Dirk, Vincent and Michael for the Debian and Ubuntu packages), the main effort has gone into providing binaries for systems where self-compilation is more difficult as the necessary tools are not easily available, unlike on Linux.

Resources