How to Install R Version 3

How to install R version 3

This is an old post and I wrote it when it was impossible to install R with simple (it was installing old 2.15 version):

sudo apt-get install r-base-core

Right now you do not need to do all written below and can simply use the abovementioned command. At the time of updating it will give you 3.1 version.

Here is previous post

Uninstall old R

sudo apt-get remove r-base-core

Open sources.list

sudo nano /etc/apt/sources.list    

and add deb to it

deb http://cran.rstudio.com/bin/linux/ubuntu precise/

precise is your ubuntu name (may be different)

Add key to sign CRAN packages

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9

Add specific PPA to the system

sudo add-apt-repository ppa:marutter/rdev
sudo apt-get update
sudo apt-get upgrade

installing

sudo apt-get install r-base

From R to check version

version

should give you

version.string R version 3.0.0 (2013-04-03)

Hope people will find this helpful

I need to use R version 3.3.3. Is there a way to install packages successfully? I am unable to install any packages

@MrFlick, thank you. I was able to navigate and ended up using this site "https://www.r-bloggers.com/using-old-versions-of-r-packages/", and used a link from that post for binaries because I was having a lot of issues with that "https://cran.r-project.org/bin/windows/contrib/", and code example for package devtools: install.packages("https://cran.r-project.org/bin/windows/contrib/3.3/devtools_1.13.5.zip", repos=NULL, type="source"). It all seems to work and load the libraries :). Thank you for the direction!

how to install R 3.5.0 (old version ) on ubuntu 18.04

The Ubuntu repositories seem to have only the 3.5.2 version, so this older version you would only find over CRAN:

https://cran.r-project.org/bin/linux/ubuntu/bionic-cran35/

There you have the r-base 3.5.0, AND you've got to resolve any dependency by hand, although the apt should give you what it needs. Some of the dependencies that my apt returns that I need here:

  • r-base-core_3.5.0-1bionic_amd64.deb
  • r-base-core-dbg_3.5.0-1bionic_amd64.deb
  • r-base_3.5.0-1bionic_all.deb
  • r-recommended_3.5.0-1bionic_all.deb

Maybe your apt asks you for other dependencies and brokens out the installation, just download them from the link above and redo the install.

BTW, for installing files already downloaded in your PC through terminal:

sudo apt install ./name-of-the-base-file.deb OR
sudo apt install /path/for/the/file/here/name-of-the-base-file.deb

R in conda environment displays version 3.6.1 rather than 4.1.3

The first screenshot is from conda-forge, which is a repository that is not being searched by default. The highest available version in the default repositories is 3.6. You need to add conda-forge as a channel to the environment, but I'm not sure how that works in the GUI. In the anaconda prompt you can do this

conda config --add channels conda-forge

in an activated environment.

Also r and r-base are different packages.

Installing a specific version of R from an Apt repository

Thanks to @Chris' tip-off, the structure of said R packages is important to understand.

r-base is a metapackage which includes, amongst other things, r-base-core and r-recommended. r-recommended is another metapackage which includes a suite of recommended R packages, which introduce the incompatibility when trying to pin to versions.

For just the R binaries and the documentation, pinned to a specific ${VERSION}, this will do the trick:

apt install -y --no-install-recommends \
r-base-core=${VERSION} \
r-base-html=${VERSION} \
r-doc-html=${VERSION}

If you want to build packages, you'd also want r-base-dev=${VERSION} in there.



Related Topics



Leave a reply



Submit