Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

updateR keeps failing using both R console and Rstudio

Tags:

r

I have been trying to update the R version to the latest one. I used updateR provided by R package installr. I tried to run it from both R console and Rstudio. However, I got the same message as follows. Restarting R shows that the R version is still the old one.

> updateR()
Installing the newest version of R,
please wait for the installer file to be download and executed.
Be sure to click 'next' as needed...
trying URL 'https://cran.rstudio.com/bin/windows/base/R-3.3.1-win.exe'
Content type 'application/x-msdos-program' length 73566547 bytes (70.2 Mb)
opened URL
downloaded 70.2 Mb


The file was downloaded succesfully into:
C:\Users\abcd\AppData\Local\Temp\RtmpOCjWpG/R-3.3.1-win.exe 

 Running the installer now...

 Installation status:  TRUE . Removing the file:
 C:\Users\abcd\AppData\Local\Temp\RtmpOCjWpG/R-3.3.1-win.exe 
 (In the future, you may keep the file by setting keep_install_file=TRUE) 

We can not seem to find the location if the new R you have installed.
The rest of the updating process is aborted, please take care to copy
your packages to the new R installation.
[1] TRUE
like image 496
user288609 Avatar asked Mar 11 '23 21:03

user288609


1 Answers

Okay so the possible solution would be:

In my case, i had previously installed R in different directory and were using the same directory for R to work on.

Hence one can try below solution:

Post installing updated R version set up. One can open Rstudio and follow below step:

Code to update R from Rstudio:

    # installing/loading the package:
    if(!require(installr)) {
    install.packages("installr"); require(installr)} #load / install+load 
    installr

   # using the package:
     updateR() # this will start the updating process of your R installation.  It will check for newer versions, and if one is available, will guide you through the decisions you'd need to make.

Steps post installing R:

  1. Click on "Tools".
  2. Select "Global Options".
  3. Under General tab, Look for R version and click on "Change"
  4. A Choose R installation pop up will appear, Select the appropriate version which are installed on your machine.
  5. Click "OK"
  6. Close all R instances including R studio.
  7. Now open R studio and Type version in console. Hollaaa, Hopefully this can resolve your problem.
like image 62
ayush varshney Avatar answered Mar 25 '23 04:03

ayush varshney