This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Why I can not update R?

Hi,

I am trying to update R in mac; I downloaded r-3.5.1.pkg, I installed that and restarted R but again the version is

> version
               _                           
platform       x86_64-apple-darwin13.4.0   
arch           x86_64                      
os             darwin13.4.0                
system         x86_64, darwin13.4.0        
status                                     
major          3                           
minor          1.2                         
year           2014                        
month          10                          
day            31                          
svn rev        66913                       
language       R                           
version.string R version 3.1.2 (2014-10-31)
nickname       Pumpkin Helmet              
>

I can not installed anything because saying

ERROR: this R is version 3.1.2, package 'updateR' requires R >= 3.2.3

Could you please help me to get why R can not be updated?

Thanks a lot in advance

r software error

Perhaps the updated R went someplace other than your $PATH, which still contains old R. Find the new R and then add that location to your $PATH at beginning.

Sorry I just know where the downloaded R-3.5.1.pkg is. How I can add this to path?

You likely have more than one R versions in /Library/Frameworks/R.framework/3.*. Do a find with find /Library/Frameworks/R.framework -name "R" -print and then change the symlink in /usr/local/bin/ to point to new R.

Thank you in

setwd("/Volumes/Macintosh HD 1/Users//Library/Frameworks/R.framework/Versions/3.5/Resources/bin")
Error in setwd("/Volumes/Macintosh HD 1/Users//Library/Frameworks/R.framework/Versions/3.5/Resources/bin") : 
  cannot change working directory
>

In R.framework/Versions I have R 2.15, 3.1, 3.2, 3.3, 3.4 and 3.5

I tried to set work directory to R 3.5 bin file but gives error

Sorry but I dont understand what should I do

> ls -l Users//Library/Frameworks/R.framework/Versions/3.5/Resources/bin
Error: unexpected symbol in "ls -l Users"
> 
>

Do the upgrade outside R. Directly from the .pkg file you downloaded from CRAN server.

Thank you, Microsoft R worked

I was updating in RStudio directly from .pkg

Are you trying to update R from within R or RStudio itself?

1 answer

Could you provide details re why this solves the original problem but the genuine R release doesn't.

Sorry, I don't know, @Raony Guimarães suggested this solution. But my problem is R does not recognise any package

Microsft R is just packaged differently than traditional R and it probably adds itself to the $PATH correctly.

You will probably need to reinstall your packages with install.packages but you will get a much better multithread performance.

Sorry, whatever I am trying I can not install anything, for all says that; Help me please

Warning in install.packages :
  installation of package ‘memoise’ had non-zero exit status

Restarting R session...

Microsoft R Open 3.5.1
The enhanced R distribution from Microsoft
Microsoft packages Copyright (C) 2018 Microsoft Corporation

Multithreaded BLAS/LAPACK libraries detected. Using 2 cores for math algorithms.

Default CRAN mirror snapshot taken on 2018-08-01.
See: https://mran.microsoft.com/.

Warning message:
In doTryCatch(return(expr), name, parentenv, handler) :
  unable to load shared object '/Library/Frameworks/R.framework/Resources/modules//R_X11.so':
  dlopen(/Library/Frameworks/R.framework/Resources/modules//R_X11.so, 6): Library not loaded: /opt/X11/lib/libSM.6.dylib
  Referenced from: /Library/Frameworks/R.framework/Resources/modules//R_X11.so
  Reason: image not found

The problem was I needed to install XQuartz

Log in to answer this question.