Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to downgrade R version 3.2.2 to version 3.1.1 on Ubuntu

Tags:

r

I installed it using apt get and it now says 3.2.2 - this is an offending version. How do I downgrade to 3.1.1?

Update:

install.packages(c("batch", "bitops", "boot", "caTools", "data.table", "doMC", "doSNOW", "ggplot2", "glmnet", "lda", "Matrix", "matrixStats", "moments", "plotrix", "psych", "reshape", "topicmodels", "wordcloud", "methods"), dependencies=TRUE)

Warning messages:
1: package ‘methods’ is not available (for R version 3.2.2) 
2: In install.packages(c("boot", "caTools", "data.table", "doMC", "doSNOW",  :
  installation of package ‘RCurl’ had non-zero exit status
3: In install.packages(c("boot", "caTools", "data.table", "doMC", "doSNOW",  :
  installation of package ‘curl’ had non-zero exit status
4: In install.packages(c("boot", "caTools", "data.table", "doMC", "doSNOW",  :
  installation of package ‘XML’ had non-zero exit status
5: In install.packages(c("boot", "caTools", "data.table", "doMC", "doSNOW",  :
  installation of package ‘OAIHarvester’ had non-zero exit status
6: In install.packages(c("boot", "caTools", "data.table", "doMC", "doSNOW",  :
  installation of package ‘topicmodels’ had non-zero exit status

How do I downgrade?

like image 802
user5331677 Avatar asked Oct 07 '15 05:10

user5331677


People also ask

How do I change R version in Linux?

To change the current version of R. Framework, you can either: Run the installer from CRAN for the R version you want to be current. Use the RSwitch utility available at: https://rud.is/rswitch/


1 Answers

So I've encountered the same problem recently. Here's a solution:

  1. Remove the currently installed R version,

    sudo apt-get remove r-base-core
    sudo apt-get autoremove 
    
  2. Find the version you need by,

    apt-cache showpkg r-base
    

It will look like the following:

Package: r-base
Versions: 
3.2.2-1precise0     (/var/lib/apt/lists/cran.rstudio.com_bin_linux_ubuntu_precise_Packages)
 Description Language: 
             File:     /var/lib/apt/lists/cran.rstudio.com_bin_linux_ubuntu_precise_Packages
              MD5: 5787ca79ed716232c4cc2087ed9b425b

After that, look for the required version and install it. But, the installation of the r-base will throw errors again, so just execute:

sudo apt-get install r-base-core=3.1.1-1precise0
like image 186
Mihkorz Avatar answered Sep 20 '22 14:09

Mihkorz