How To Install r-cran-pammtools on Ubuntu 22.04

In this tutorial we learn how to install r-cran-pammtools on Ubuntu 22.04. r-cran-pammtools is GNU R piece-wise exponential additive mixed modeling tools

Introduction

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

What is r-cran-pammtools

r-cran-pammtools is:

This package provides piece-wise exponential additive mixed modeling tools for survival analysis. The Piece-wise exponential (Additive Mixed) Model (PAMM; Bender and others (2018) <doi: 10.1177/1471082X17748083>) is a powerful model class for the analysis of survival (or time-to- event) data, based on Generalized Additive (Mixed) Models (GA(M)Ms). It offers intuitive specification and robust estimation of complex survival models with stratified baseline hazards, random effects, time-varying effects, time-dependent covariates and cumulative effects (Bender and others (2019)), as well as support for left-truncated, competing risks and recurrent events data. pammtools provides tidy workflow for survival analysis with PAMMs, including data simulation, transformation and other functions for data preprocessing and model post-processing as well as visualization.

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

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

Install r-cran-pammtools Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install r-cran-pammtools

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

sudo aptitude -y install r-cran-pammtools

How To Uninstall r-cran-pammtools on Ubuntu 22.04

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

sudo apt-get remove r-cran-pammtools

Uninstall r-cran-pammtools And Its Dependencies

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

Remove r-cran-pammtools Configurations and Data

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

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

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

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

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

References

Summary

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