How To Install r-cran-corpcor on Ubuntu 18.04

In this tutorial we learn how to install r-cran-corpcor on Ubuntu 18.04. r-cran-corpcor is GNU R for Estimation of Covariance and Correlation – corpcor

Introduction

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

What is r-cran-corpcor

r-cran-corpcor is:

GNU R package which implements a James-Stein-type shrinkage estimator for the covariance matrix, with separate shrinkage for variances and correlations. The approach is both computationally as well as statistically very efficient, it is applicable to “small n, large p” data, and always returns a positive definite and well-conditioned covariance matrix. In addition to inferring the covariance matrix the package also provides shrinkage estimators for partial correlations and partial variances. The inverse of the covariance and correlation matrix can be efficiently computed, as well as any arbitrary power of the shrinkage correlation matrix. Furthermore, functions are available for fast singular value decomposition, for computing the pseudoinverse, and for checking the rank and positive definiteness of a matrix.

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

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

Install r-cran-corpcor Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install r-cran-corpcor

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

sudo aptitude -y install r-cran-corpcor

How To Uninstall r-cran-corpcor on Ubuntu 18.04

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

sudo apt-get remove r-cran-corpcor

Uninstall r-cran-corpcor And Its Dependencies

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

Remove r-cran-corpcor Configurations and Data

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

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

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

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

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

References

Summary

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