How To Install r-cran-reprex on Kali Linux

In this tutorial we learn how to install r-cran-reprex on Kali Linux. r-cran-reprex is Prepare Reproducible Example Code via the Clipboard

Introduction

In this tutorial we learn how to install r-cran-reprex on Kali Linux.

What is r-cran-reprex

r-cran-reprex is:

Convenience wrapper that uses the ‘rmarkdown’ package to render small snippets of code to target formats that include both code and output. The goal is to encourage the sharing of small, reproducible, and runnable examples on code-oriented websites, such as https://stackoverflow.com and https://github.com, or in email. The user’s clipboard is the default source of input code and the default target for rendered output. ‘reprex’ also extracts clean, runnable R code from various common formats, such as copy/paste from an R session.

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

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

Install r-cran-reprex Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install r-cran-reprex

Install r-cran-reprex Using aptitude

If you want to follow this method, you might need to install aptitude on Kali Linux first since aptitude is usually not installed by default on Kali Linux. Update apt database with aptitude using the following command.

sudo aptitude update

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

sudo aptitude -y install r-cran-reprex

How To Uninstall r-cran-reprex on Kali Linux

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

sudo apt-get remove r-cran-reprex

Uninstall r-cran-reprex And Its Dependencies

To uninstall r-cran-reprex and its dependencies that are no longer needed by Kali Linux, we can use the command below:

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

Remove r-cran-reprex Configurations and Data

To remove r-cran-reprex configuration and data from Kali Linux we can use the following command:

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

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

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

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

Dependencies

r-cran-reprex have the following dependencies:

References

Summary

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