How To Install r-cran-cairo on Ubuntu 18.04

In this tutorial we learn how to install r-cran-cairo on Ubuntu 18.04. r-cran-cairo is GNU R graphics device using cairo graphics library

Introduction

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

What is r-cran-cairo

r-cran-cairo is:

GNUR R graphics device using cairo graphics library for creating high- quality bitmap (PNG, JPEG, TIFF), vector (PDF, SVG, PostScript) and display (X11 and Win32) output

Cairo graphics device that can be use to create high-quality vector (PDF, PostScript and SVG) and bitmap output (PNG,JPEG,TIFF), and high- quality rendering in displays (X11 and Win32). Since it uses the same back-end for all output, copying across formats is WYSIWYG. Files are created without the dependence on X11 or other external programs. This device supports alpha channel (semi-transparent drawing) and resulting images can contain transparent and semi-transparent regions. It is ideal for use in server environments (file output) and as a replacement for other devices that don’t have Cairo’s capabilities such as alpha support or anti-aliasing. Backends are modular such that any subset of backends is supported.

There are three methods to install r-cran-cairo 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-cairo 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-cairo using apt-get by running the following command:

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

Install r-cran-cairo Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install r-cran-cairo

Install r-cran-cairo 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-cairo using aptitude by running the following command:

sudo aptitude -y install r-cran-cairo

How To Uninstall r-cran-cairo on Ubuntu 18.04

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

sudo apt-get remove r-cran-cairo

Uninstall r-cran-cairo And Its Dependencies

To uninstall r-cran-cairo 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-cairo

Remove r-cran-cairo Configurations and Data

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

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

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

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

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

References

Summary

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