SpatPCA is an R package designed for efficient regularized principal component analysis, providing the following features:
You can install SpatPCA using either of the following methods:
install.packages("SpatPCA")
remotes::install_github("egpivo/SpatPCA")
To compile C++ code with the required RcppArmadillo package, follow these instructions based on your operating system:
Install Rtools
gfortran library. You can achieve this by running the following commands in the terminal:
bash
brew update
brew install gccFor a detailed solution, refer to this link, or download and install the library gfortran to resolve the error ld: library not found for -lgfortran.
To use SpatPCA, first load the package:
library(SpatPCA)
Then, apply the spatpca function with the following syntax:
spatpca(position, realizations)
For more details, refer to the Demo.
To submit package checks to R-hub v2, source tools/run_rhub_checks.R and use
submission <- run_rhub_checks(confirmation = TRUE)
summarise_rhub_jobs(submission)
Adjust include_os, platforms, or email as needed. summarise_rhub_jobs()
prints the submission id plus GitHub URLs where each builder’s logs appear.
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 (>= 2)
Wang W, Huang H (2023). SpatPCA: Regularized Principal Component Analysis for
Spatial Data_. R package version 1.3.5,
<https://CRAN.R-project.org/package=SpatPCA>.
@Manual{,
title = {SpatPCA: Regularized Principal Component Analysis for Spatial Data},
author = {Wen-Ting Wang and Hsin-Cheng Huang},
year = {2023},
note = {R package version 1.3.5},
url = {https://CRAN.R-project.org/package=SpatPCA},
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.