10

I am currently using R version 3.2.3 on Ubuntu 16.04 LTS. I am trying to install a package in R called kma which requires packages like devtools, data.table etc. When I try to install these packages, I get this :

install.packages(c("devtools", "data.table", "reshape2", "dplyr"))
Warning in install.packages :
  download had nonzero exit status
Installing packages into ‘/home/varun/R/x86_64-pc-linux-gnu-library/3.2’
(as ‘lib’ is unspecified)
Warning in install.packages :
  packages ‘devtools’, ‘data.table’, ‘reshape2’, ‘dplyr’ are not available (for R version 3.2.3)

These packages are installed without any problems if the R version is 3.3 or above. How can I upgrade my R to version 3.3 or above from my current version of 3.2. Also all my packages are in 3.2. Do I have to install all these packages again?

Hope to hear soon.

Thanks

user3138373
  • 521
  • 2
  • 6
  • 19

1 Answers1

10

Use Michael Rutter's PPA

Rutter's PPA currently has R 3.4.0. To install the PPA open a terminal by pressing Ctrl+Alt+T and enter:

sudo add-apt-repository ppa:marutter/rrutter

Followed by:

sudo apt update
sudo apt full-upgrade

This will upgrade your R installation.

Hope this helps

user68186
  • 31,376
  • 12
  • 85
  • 112
  • Hi I upgraded my R version to 3.4. Since I am running R using Rstudio , I am trying to install bioconductor for 3.4 version but I am getting this error source("https://bioconductor.org/biocLite.R") URL 'https://bioconductor.org/biocLite.R': status was 'Peer certificate cannot be authenticated with given CA certificates' How can I fix this?? – user3138373 Apr 27 '17 at 20:39
  • 1
    @user3138373 I have no idea about bioconductor. This looks like their website problem. Please ask a new question so others may help. If you are satisfied with my answer above consider accepting the answer as correct and put the green check mark against it. Thanks. – user68186 Apr 28 '17 at 12:30
  • I installed R 3.4 from a tarball, but can't seem to get Ubuntu to recognize it... I can follow this command but would prefer to just have apt recognize the new install / not have to redownload etc. any suggestions? – alexwhitworth May 30 '17 at 05:06
  • I am not sure what you mean by "Ubuntu to recognize it". If you want a launcher icon, you will have to do that yourself. That's how a tarball works. They also don't update by themselves. It is easier to delete the installation and start again. Please ask a new question with more details. – user68186 May 30 '17 at 10:06