Index of /bin/linux/ubuntu

[ICO]NameLast modifiedSizeDescription

[DIR]Parent Directory  -
[DIR]artful/03-Jul-2018 11:07 -
[DIR]bionic-cran35/03-Jul-2018 18:02 -
[DIR]trusty-cran35/03-Jul-2018 11:07 -
[DIR]trusty/03-Jul-2018 11:05 -
[DIR]xenial/11-Apr-2018 23:07 -

UBUNTU PACKAGES FOR R

R 3.4 packages for Ubuntu on i386 and amd64 are available for all stable Desktop releases of Ubuntu prior to Bionic Beaver (18.04) until their official end of life date. However, only the latest Long Term Support (LTS) release is fully supported. As of June 11, 2018 the supported releases are Artful Aardvark (17.10), Xenial Xerus (16.04; LTS), and Trusty Tahr (14.04; LTS).

R 3.5 packages for Ubuntu on i386 and amd64 are available for most stable Desktop releases of Ubuntu until their official end of life date. However, only the latest Long Term Support (LTS) release is fully supported. As of June 11, 2018 the supported releases are Xenial Xerus (16.04; LTS), Trusty Tahr (14.04; LTS), and Bionic Beaver (18.04;LTS). Note, to install R 3.5 packages, a different sources.list entry is needed. See below for details.

See https://wiki.ubuntu.com/Releases for details.

For additional binary packages for R (currently 3,600+), check out the CRAN2deb4ubuntu PPA: https://launchpad.net/~marutter/+archive/ubuntu/c2d4u or https://launchpad.net/~marutter/+archive/ubuntu/c2d4u3.5 depending on which version of R you are using.

Installation

To obtain the latest R 3.4 packages, add an entry like

deb https://cloud.r-project.org/bin/linux/ubuntu artful/

or

deb https://cloud.r-project.org/bin/linux/ubuntu xenial/

or

deb https://cloud.r-project.org/bin/linux/ubuntu trusty/

in your /etc/apt/sources.list file. By using https://cloud.r-project.org, you will be automatically be redirected to a nearby CRAN mirror. See https://cran.r-project.org/mirrors.html for the current list of CRAN mirrors.

To obtain the latest R 3.5 packages, add an entry like

deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/

or

deb https://cloud.r-project.org/bin/linux/ubuntu xenial-cran35/

or

deb https://cloud.r-project.org/bin/linux/ubuntu trusty-cran35/

in your /etc/apt/sources.list file. By using https://cloud.r-project.org, you will be automatically be redirected to a nearby CRAN mirror. See https://cran.r-project.org/mirrors.html for the current list of CRAN mirrors.

To install the complete R system, use

sudo apt-get update
sudo apt-get install r-base

Users who need to compile R packages from source [e.g. package maintainers, or anyone installing packages with install.packages()] should also install the r-base-dev package:

sudo apt-get install r-base-dev

The R packages for Ubuntu otherwise behave like the Debian ones. One may find additional information in the Debian README file located at https://cran.R-project.org/bin/linux/debian/.

Installation and compilation of R or some of its packages may require Ubuntu packages from the “backports” repositories. Therefore, it is suggested to activate the backports repositories with an entry like

deb https://<my.favorite.ubuntu.mirror>/ bionic-backports main restricted universe

in your /etc/apt/sources.list file. See https://launchpad.net/ubuntu/+archivemirrors for the list of Ubuntu mirrors.

Supported Packages

A number of R packages are available from the Ubuntu repositories with names starting with r-cran-. The following ones are kept up-to-date on CRAN: all packages part of the r-recommended bundle, namely

as well as

The other r-cran-* packages are updated with Ubuntu releases only. Users who need to update one of these R packages (say r-cran-foo) should first make sure to obtain all the required build dependencies with

sudo apt-get build-dep r-cran-foo

Because they rely on the installed version of R, we also provide, on an experimental basis, versions of the following packages as up-to-date as the Ubuntu release allows:

Please notice that the maintainers are not necessarily themselves users of these packages, so positive or negative feedback through the usual channels (see below) would be appreciated.

Finally, as an added convenience to Ubuntu users who interact with R through Emacs, we also provide an up-to-date version of the package

Secure APT

The Ubuntu archives on CRAN are signed with the key of “Michael Rutter marutter@gmail.com” with key ID E084DAB9. To add the key to your system with one command use (thanks to Brett Presnell for the tip):

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9

An alternate method can be used by retrieving the key with

gpg --keyserver keyserver.ubuntu.com --recv-key E084DAB9

and then feed it to apt-key with

gpg -a --export E084DAB9 | sudo apt-key add -

Some people have reported difficulties using this approach. The issue is usually related to a firewall blocking port 11371. If the first gpg command fails, you may want to try (thanks to Mischan Toosarani for the tip):

gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys E084DAB9

and then feed it to apt-key with

gpg -a --export E084DAB9 | sudo apt-key add -

Another alternative approach is to search for the key at http://keyserver.ubuntu.com:11371/ and copy the key to a plain text file, say key.txt. Then, feed the key to apt-key with

sudo apt-key add key.txt

Administration and Maintances of R Packages

The R packages part of the Ubuntu r-base and r-recommended packages are installed into the directory /usr/lib/R/library. These can be updated using apt-get with

sudo apt-get update
sudo apt-get upgrade

The other r-cran-* packages shipped with Ubuntu are installed into the directory /usr/lib/R/site-library.

Installing R packages not provided with Ubuntu first requires tools to compile the packages from source. These tools are installed via the R development package with

sudo apt-get install r-base-dev

Then a site administrator can install R packages into the directory /usr/local/lib/R/site-library by running R as root and using the

> install.packages()

function. A routine update can then be undertaken from R using

> update.packages(lib.loc = "/usr/local/lib/R/site-library")

The paths above are stored in the R_LIBS_SITE environment variable defined in the /etc/R/Renviron file.

Individual users can install R packages into their home directory. The simplest procedure is to create a file ~/.Renviron containing, e.g.,

R_LIBS_USER="~/lib/R/library"

The install.packages() and update.packages() functions will then work in directory ~/lib/R/library. It is also possible to automatically create version-specific library trees; see ?.libPaths in R for more information.

Reporting Problems

The best place to report problems with these packages or ask R questions specific to Ubuntu is the R-SIG-Debian mailing list. See

https://stat.ethz.ch/mailman/listinfo/r-sig-debian

for more information.

Acknowledgements

The Debian R packages are maintained by Dirk Eddelbuettel. The Ubuntu packages are compiled for i386 and amd64 by Michael Rutter (marutter@gmail.com) using scripts developed by Vincent Goulet.