SpatPCA is an R package designed for efficient regularized principal component analysis, providing the following features:
To install the current development version from GitHub, use the following R code:
::install_github("egpivo/SpatPCA") remotes
For compiling C++ code with the required RcppArmadillo
and RcppParallel
packages, follow these instructions:
gfortran
library. You can achieve this by running the
following commands in the terminal:brew update
brew install gcc
For a detailed solution, refer to this
link, or download and install the library gfortran
to resolve the error
ld: library not found for -lgfortran
.
library(SpatPCA)
spatpca(position, realizations)
Wang, W.-T. and Huang, H.-C. (2017). Regularized principal component analysis for spatial data. Journal of Computational and Graphical Statistics, 26, 14-25.
GPL-3