How To Install r-cran-progressr on Ubuntu 22.04

In this tutorial we learn how to install r-cran-progressr on Ubuntu 22.04. r-cran-progressr is GNU R inclusive, unifying API for progress updates

Introduction

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

What is r-cran-progressr

r-cran-progressr is:

A minimal, unifying API for scripts and packages to report progress updates from anywhere including when using parallel processing. The package is designed such that the developer can to focus on what progress should be reported on without having to worry about how to present it. The end user has full control of how, where, and when to render these progress updates, e.g. in the terminal using utils::txtProgressBar() or progress::progress_bar(), in a graphical user interface using utils::winProgressBar(), tcltk::tkProgressBar() or shiny::withProgress(), via the speakers using beep::beepr(), or on a file system via the size of a file. Anyone can add additional, customized, progression handlers. The ‘progressr’ package uses R’s condition framework for signaling progress updated. Because of this, progress can be reported from almost anywhere in R, e.g. from classical for and while loops, from map-reduce APIs like the lapply() family of functions, ‘purrr’, ‘plyr’, and ‘foreach’. It will also work with parallel processing via the ‘future’ framework, e.g. future.apply::future_lapply(), furrr::future_map(), and ‘foreach’ with ‘doFuture’. The package is compatible with Shiny applications.

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

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

Install r-cran-progressr Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install r-cran-progressr

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

sudo aptitude -y install r-cran-progressr

How To Uninstall r-cran-progressr on Ubuntu 22.04

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

sudo apt-get remove r-cran-progressr

Uninstall r-cran-progressr And Its Dependencies

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

Remove r-cran-progressr Configurations and Data

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

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

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

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

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

References

Summary

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