How To Install r-cran-knn.covertree on Ubuntu 22.04

In this tutorial we learn how to install r-cran-knn.covertree on Ubuntu 22.04. r-cran-knn.covertree is GNU R accurate kNN implementation with multiple distance measures

Introduction

In this tutorial we learn how to install r-cran-knn.covertree on Ubuntu 22.04.

What is r-cran-knn.covertree

r-cran-knn.covertree is:

Similarly to the ‘FNN’ package, this package allows calculation of the k nearest neighbors (kNN) of a data matrix. The implementation is based on cover trees introduced by Alina Beygelzimer, Sham Kakade, and John Langford (2006) doi:10.1145/1143844.1143857.

There are three methods to install r-cran-knn.covertree on Ubuntu 22.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-knn.covertree 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-knn.covertree using apt-get by running the following command:

sudo apt-get -y install r-cran-knn.covertree

Install r-cran-knn.covertree Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install r-cran-knn.covertree

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

sudo aptitude -y install r-cran-knn.covertree

How To Uninstall r-cran-knn.covertree on Ubuntu 22.04

To uninstall only the r-cran-knn.covertree package we can use the following command:

sudo apt-get remove r-cran-knn.covertree

Uninstall r-cran-knn.covertree And Its Dependencies

To uninstall r-cran-knn.covertree and its dependencies that are no longer needed by Ubuntu 22.04, we can use the command below:

sudo apt-get -y autoremove r-cran-knn.covertree

Remove r-cran-knn.covertree Configurations and Data

To remove r-cran-knn.covertree configuration and data from Ubuntu 22.04 we can use the following command:

sudo apt-get -y purge r-cran-knn.covertree

Remove r-cran-knn.covertree configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge r-cran-knn.covertree

References

Summary

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