Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Update R version from 3.0.3 to 3.1.2

I want to update R with ubuntu from 3.0.3 to 3.1.2. I am working on Ubuntu 14.04LTS, 64bits.

I did the following:

cd /etc/apt/
sudo gedit sources.list

I added the following line :

deb http://cran.rstudio.com/bin/linux/ubuntu trusty/

Then :

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install r-base

Some files were uploaded.

Then I checked the R version :

sudo R
version

platform       x86_64-unknown-linux-gnu    
arch           x86_64                      
os             linux-gnu                   
system         x86_64, linux-gnu           
status                                     
major          3                           
minor          0.3                         
year           2014                        
month          03                          
day            06                          
svn rev        65126                       
language       R                           
version.string R version 3.0.3 (2014-03-06)
nickname       Warm Puppy      

I still have the 3.0.3 version, can someone help me to upgrade to 3.1.2?

EDIT for ECII:

sudo apt-get dist-upgrade

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
blcr-util bwidget gcc-4.8-base:i386 ggobi jags libaudio2:i386 libcr0
libexpat1:i386 libffi6:i386 libfontconfig1:i386 libfreetype6:i386
libgcrypt11:i386 libgl1-mesa-glx:i386 libglapi-mesa:i386 libglib2.0-0:i386
libglpk36 libgpg-error0:i386 libgstreamer-plugins-base1.0-0:i386
libgstreamer1.0-0:i386 libhwloc5 libibverbs1 libice6:i386 libjbig0:i386
libjpeg-turbo8:i386 libjpeg8:i386 libodbc1 libopenmpi1.6 liborc-0.4-0:i386
libqt4-dbus:i386 libqt4-declarative:i386 libqt4-network:i386
libqt4-opengl:i386 libqt4-script:i386 libqt4-sql:i386 libqt4-xml:i386
libqt4-xmlpatterns:i386 libqtcore4:i386 libqtdbus4:i386 libqtgui4:i386
libqtwebkit4:i386 libquantlib-1.2 libsm6:i386 libsprng2 libsqlite3-0:i386
libssl1.0.0:i386 libstdc++6:i386 libtiff4 libtiff5:i386 libtk8.5 libtorque2
libx11-6:i386 libx11-xcb1:i386 libxau6:i386 libxcb-dri2-0:i386
libxcb-dri3-0:i386 libxcb-glx0:i386 libxcb-present0:i386 libxcb-sync1:i386
libxcb1:i386 libxdamage1:i386 libxdmcp6:i386 libxext6:i386 libxfixes3:i386
libxi6:i386 libxml2:i386 libxrender1:i386 libxshmfence1:i386 libxslt1.1:i386
libxss1:i386 libxt6:i386 libxv1:i386 libxxf86vm1:i386
linux-headers-3.13.0-35 linux-headers-3.13.0-35-generic
linux-image-3.11.0-26-generic linux-image-3.13.0-35-generic
linux-image-extra-3.11.0-26-generic linux-image-extra-3.13.0-35-generic lynx
mpi-default-bin openmpi-bin openmpi-checkpoint openmpi-common skype-bin:i386
tk-table tk8.5 unixodbc

EDIT for cdeterman:

sudo apt-key list
/etc/apt/trusted.gpg
--------------------
pub   1024D/437D05B5 2004-09-12
uid                  Ubuntu Archive Automatic Signing Key <[email protected]>
sub   2048g/79164387 2004-09-12

pub   1024D/FBB75451 2004-12-30
uid                  Ubuntu CD Image Automatic Signing Key <[email protected]>

pub   4096R/C0B21F32 2012-05-11
uid                  Ubuntu Archive Automatic Signing Key (2012) <[email protected]>

pub   4096R/EFE21092 2012-05-11
uid                  Ubuntu CD Image Automatic Signing Key (2012) <[email protected]>

pub   1024D/3E5C1192 2010-09-20
uid                  Ubuntu Extras Archive Automatic Signing Key <[email protected]>

pub   1024R/579F147D 2010-04-25
uid                  Launchpad RKWard Development Archive

pub   2048R/E084DAB9 2010-10-19 [expire : 2015-10-18]
uid                  Michael Rutter <[email protected]>
sub   2048R/1CFF3E8F 2010-10-19 [expire : 2015-10-18]
like image 583
Chika Avatar asked Dec 03 '14 12:12

Chika


People also ask

How do I update an existing version of R?

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 update R version from command line?

For command line use you can update R by running: require(installr) updateR() # this will open dialog boxes to take you through the steps. Or install a new software simply by running: require(installr) installr() # user can easily select (via a GUI interface) a software to install.

How do I upgrade R in RStudio?

Updating RStudio is easy, just go to Help > Check for Updates to install newer version.

How do I automatically update R?

From within RStudio, go to Help > Check for Updates to install newer version of RStudio (if available, optional). To update packages, go to Tools > Check for Package Updates. If updates are available, select All (or just tidyverse), and click Install Updates.


1 Answers

Ok, I fixed it.

In synaptic package manager, I saw that R-3.1.2 was installed in the following directory (and the executable is called R) : /usr/lib/R/bin/R

And when I type

which R

It returns:

/usr/local/bin/R

So the source of R is not the same path than the one which was updated. I've just copy-pasted the new executable (which was in /usr/lib/R/bin/ in the good directory /usr/local/bin/).

like image 101
Chika Avatar answered Sep 23 '22 23:09

Chika