How To Install r-cran-rspectra on Debian 11

In this tutorial we learn how to install r-cran-rspectra on Debian 11. r-cran-rspectra is GNU R solvers for large-scale eigenvalue and SVD problems

Introduction

In this tutorial we learn how to install r-cran-rspectra on Debian 11.

What is r-cran-rspectra

r-cran-rspectra is:

This package provides a R interface to the ‘Spectra’ library https://spectralib.org/ for large-scale eigenvalue and SVD problems. It is typically used to compute a few eigenvalues/vectors of an n by n matrix, e.g., the k largest eigenvalues, which is usually more efficient than eigen() if k « n. This package provides the ’eigs()’ function that does the similar job as in ‘Matlab’, ‘Octave’, ‘Python SciPy’ and ‘Julia’. It also provides the ‘svds()’ function to calculate the largest k singular values and corresponding singular vectors of a real matrix. The matrix to be computed on can be dense, sparse, or in the form of an operator defined by the user.

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

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

Install r-cran-rspectra Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install r-cran-rspectra

Install r-cran-rspectra 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 Debian. Update apt database with aptitude using the following command.

sudo aptitude update

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

sudo aptitude -y install r-cran-rspectra

How To Uninstall r-cran-rspectra on Debian 11

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

sudo apt-get remove r-cran-rspectra

Uninstall r-cran-rspectra And Its Dependencies

To uninstall r-cran-rspectra and its dependencies that are no longer needed by Debian 11, we can use the command below:

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

Remove r-cran-rspectra Configurations and Data

To remove r-cran-rspectra configuration and data from Debian 11 we can use the following command:

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

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

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

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

Dependencies

r-cran-rspectra have the following dependencies:

References

Summary

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