How To Install r-cran-pscl on Ubuntu 18.04

In this tutorial we learn how to install r-cran-pscl on Ubuntu 18.04. r-cran-pscl is GNU R package for discrete data models

Introduction

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

What is r-cran-pscl

r-cran-pscl is:

This package consists of R functions developed at the Political Science Computational Laboratory at Stanford University; it currently includes models for count data (hurdle regression and zero-inflated negative binomial and Poisson models), ordinal probit and logit (also available in MASS via polr), and an item-response theory model. Also included are Vuong tests for non-nested hypothesis testing and convenience functions for handling roll-call vote matrices.

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

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

Install r-cran-pscl Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install r-cran-pscl

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

sudo aptitude -y install r-cran-pscl

How To Uninstall r-cran-pscl on Ubuntu 18.04

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

sudo apt-get remove r-cran-pscl

Uninstall r-cran-pscl And Its Dependencies

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

Remove r-cran-pscl Configurations and Data

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

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

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

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

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

References

Summary

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