Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Updating R in Windows

Tags:

r

Following this post and also this link , I tried to update my R version .

 sessionInfo()
 R version 2.14.0 (2011-10-31)
 Platform: i386-pc-mingw32/i386 (32-bit)

 locale:
 [1] LC_COLLATE=English_United States.1252 
 [2] LC_CTYPE=English_United States.1252   
 [3] LC_MONETARY=English_United States.1252
 [4] LC_NUMERIC=C                          
 [5] LC_TIME=English_United States.1252    

 attached base packages:
 [1] stats     graphics  grDevices utils     datasets  methods   base     

 other attached packages:
 [1] installr_0.9

 loaded via a namespace (and not attached):
 [1] tools_2.14.0

But when I ran the code

  updateR()
  Error in file(con, "r") : cannot open the connection

It shows exactly the same error while running the following command :

 check.for.updates.R() # tells you if there is a new version of R or not.
 Error in file(con, "r") : cannot open the connection

 install.R() # download and run the latest R installer
 Error in file(con, "r") : cannot open the connection

How can I update my R version ?

like image 359
user81411 Avatar asked Jul 09 '15 05:07

user81411


People also ask

How do I update Windows R to latest version?

If you want to update R and RStudio: There, you can go to the “R” menu and click “Check for R Updates” (see image below). If you do that, R will tell you the current version you're on, and whether or not there is a more updated version that you can download (circled in blue).

How do I upgrade R?

The easiest way to update R is to simply download the newest version. Install that, and it will overwrite your current version. There are also packages to do the updating: updateR for Mac, and installr for Windows.

How do I upgrade to Windows 10 R?

Upgrading your version of R If you decide to upgrade your version of R, simply choose a CRAN mirror in the download page and follow the procedure you used to initially download and install R. The installation will automatically install the new version and make it available within RStudio.


1 Answers

Per https://github.com/talgalili/installr/#troubleshooting,

Try running:

setInternet2(TRUE)

That worked for me when I was getting the below error message:

Error in file(con, "r") : cannot open the connection

like image 169
Ryan McGibony Avatar answered Sep 20 '22 12:09

Ryan McGibony