How To Install r-cran-spdep on Ubuntu 22.04
Introduction
In this tutorial we learn how to install r-cran-spdep
on Ubuntu 22.04.
What is r-cran-spdep
r-cran-spdep is:
A collection of functions to create spatial weights matrix objects from polygon contiguities, from point patterns by distance and tessellations, for summarizing these objects, and for permitting their use in spatial data analysis, including regional aggregation by minimum spanning tree; a collection of tests for spatial autocorrelation, including global Moran’s I, APLE, Geary’s C, Hubert/Mantel general cross product statistic, Empirical Bayes estimates and Assunção/Reis Index, Getis/Ord G and multicoloured join count statistics, local Moran’s I and Getis/Ord G, saddlepoint approximations and exact tests for global and local Moran’s I; and functions for estimating spatial simultaneous autoregressive (SAR) lag and error models, impact measures for lag models, weighted and unweighted SAR and CAR spatial regression models, semi-parametric and Moran eigenvector spatial filtering, GM SAR error models, and generalized spatial two stage least squares models.
There are three methods to install r-cran-spdep
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-spdep 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-spdep
using apt-get
by running the following command:
sudo apt-get -y install r-cran-spdep
Install r-cran-spdep Using apt
Update apt database with apt
using the following command.
sudo apt update
After updating apt database, We can install r-cran-spdep
using apt
by running the following command:
sudo apt -y install r-cran-spdep
Install r-cran-spdep 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-spdep
using aptitude
by running the following command:
sudo aptitude -y install r-cran-spdep
How To Uninstall r-cran-spdep on Ubuntu 22.04
To uninstall only the r-cran-spdep
package we can use the following command:
sudo apt-get remove r-cran-spdep
Uninstall r-cran-spdep And Its Dependencies
To uninstall r-cran-spdep
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-spdep
Remove r-cran-spdep Configurations and Data
To remove r-cran-spdep
configuration and data from Ubuntu 22.04 we can use the following command:
sudo apt-get -y purge r-cran-spdep
Remove r-cran-spdep configuration, data, and all of its dependencies
We can use the following command to remove r-cran-spdep
configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge r-cran-spdep
References
Summary
In this tutorial we learn how to install r-cran-spdep
package on Ubuntu 22.04 using different package management tools: apt
, apt-get
and aptitude
.