How To Install r-cran-gsubfn on Ubuntu 22.04
Introduction
In this tutorial we learn how to install r-cran-gsubfn
on Ubuntu 22.04.
What is r-cran-gsubfn
r-cran-gsubfn is:
The gsubfn function is like gsub but can take a replacement function or certain other objects instead of the replacement string. Matches and back references are input to the replacement function and replaced by the function output. gsubfn can be used to split strings based on content rather than delimiters and for quasi-perl-style string interpolation. The package also has facilities for translating formulas to functions and allowing such formulas in function calls instead of functions. This can be used with R functions such as apply, sapply, lapply, optim, integrate, xyplot, Filter and any other function that expects another function as an input argument or functions like cat or sql calls that may involve strings where substitution is desirable. There is also a facility for returning multiple objects from functions and a version of transform that allows the RHS to refer to LHS used in the same transform.
There are three methods to install r-cran-gsubfn
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-gsubfn 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-gsubfn
using apt-get
by running the following command:
sudo apt-get -y install r-cran-gsubfn
Install r-cran-gsubfn Using apt
Update apt database with apt
using the following command.
sudo apt update
After updating apt database, We can install r-cran-gsubfn
using apt
by running the following command:
sudo apt -y install r-cran-gsubfn
Install r-cran-gsubfn 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-gsubfn
using aptitude
by running the following command:
sudo aptitude -y install r-cran-gsubfn
How To Uninstall r-cran-gsubfn on Ubuntu 22.04
To uninstall only the r-cran-gsubfn
package we can use the following command:
sudo apt-get remove r-cran-gsubfn
Uninstall r-cran-gsubfn And Its Dependencies
To uninstall r-cran-gsubfn
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-gsubfn
Remove r-cran-gsubfn Configurations and Data
To remove r-cran-gsubfn
configuration and data from Ubuntu 22.04 we can use the following command:
sudo apt-get -y purge r-cran-gsubfn
Remove r-cran-gsubfn configuration, data, and all of its dependencies
We can use the following command to remove r-cran-gsubfn
configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge r-cran-gsubfn
References
Summary
In this tutorial we learn how to install r-cran-gsubfn
package on Ubuntu 22.04 using different package management tools: apt
, apt-get
and aptitude
.