How To Install r-cran-backports on Ubuntu 18.04

In this tutorial we learn how to install r-cran-backports on Ubuntu 18.04. r-cran-backports is reimplementation of functions introduced since R-3.0.0

Introduction

In this tutorial we learn how to install r-cran-backports on Ubuntu 18.04.

What is r-cran-backports

r-cran-backports is:

Implementations of functions which have been introduced in R since version 3.0.0. The backports are conditionally exported which results in R resolving the function names to the version shipped with R (if available) and uses the implemented backports as fallback. This way package developers can make use of the new functions without worrying about the minimum required R version.

There are three methods to install r-cran-backports on Ubuntu 18.04. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install r-cran-backports Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install r-cran-backports using apt-get by running the following command:

sudo apt-get -y install r-cran-backports

Install r-cran-backports Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install r-cran-backports using apt by running the following command:

sudo apt -y install r-cran-backports

Install r-cran-backports Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install r-cran-backports using aptitude by running the following command:

sudo aptitude -y install r-cran-backports

How To Uninstall r-cran-backports on Ubuntu 18.04

To uninstall only the r-cran-backports package we can use the following command:

sudo apt-get remove r-cran-backports

Uninstall r-cran-backports And Its Dependencies

To uninstall r-cran-backports and its dependencies that are no longer needed by Ubuntu 18.04, we can use the command below:

sudo apt-get -y autoremove r-cran-backports

Remove r-cran-backports Configurations and Data

To remove r-cran-backports configuration and data from Ubuntu 18.04 we can use the following command:

sudo apt-get -y purge r-cran-backports

Remove r-cran-backports configuration, data, and all of its dependencies

We can use the following command to remove r-cran-backports configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge r-cran-backports

References

Summary

In this tutorial we learn how to install r-cran-backports package on Ubuntu 18.04 using different package management tools: apt, apt-get and aptitude.