How To Install r-cran-rcppgsl on Ubuntu 18.04

In this tutorial we learn how to install r-cran-rcppgsl on Ubuntu 18.04. r-cran-rcppgsl is GNU R package for integration with the GNU GSL

Introduction

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

What is r-cran-rcppgsl

r-cran-rcppgsl is:

The ‘GNU Scientific Library’ (or ‘GSL’) is a collection of numerical routines for scientific computing. It is particularly useful for C and C++ programs as it provides a standard C interface to a wide range of mathematical routines such as special functions, permutations, combinations, fast fourier transforms, eigensystems, random numbers, quadrature, random distributions, quasi-random sequences, Monte Carlo integration, N-tuples, differential equations, simulated annealing, numerical differentiation, interpolation, series acceleration, Chebyshev approximations, root-finding, discrete Hankel transforms physical constants, basis splines and wavelets. There are over 1000 functions in total with an extensive test suite.

The ‘RcppGSL’ package provides an easy-to-use interface between ‘GSL’ data structures and R using concepts from ‘Rcpp’ which is itself a package that eases the interfaces between R and C++.

This package also serves as a prime example of how to build a package that uses ‘Rcpp’ to connect to another third-party library. The ‘autoconf’ script, ‘inline’ plugin and example package can all be used as a stanza to write a similar package against another library.

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

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

Install r-cran-rcppgsl Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install r-cran-rcppgsl

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

sudo aptitude -y install r-cran-rcppgsl

How To Uninstall r-cran-rcppgsl on Ubuntu 18.04

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

sudo apt-get remove r-cran-rcppgsl

Uninstall r-cran-rcppgsl And Its Dependencies

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

Remove r-cran-rcppgsl Configurations and Data

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

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

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

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

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

References

Summary

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