{"id":15165879,"url":"https://github.com/egpivo/spatmca","last_synced_at":"2025-10-25T08:30:30.057Z","repository":{"id":54625813,"uuid":"79646326","full_name":"egpivo/SpatMCA","owner":"egpivo","description":"R Package: Regularized Spatial Maximum Covariance Analysis","archived":false,"fork":false,"pushed_at":"2024-08-26T16:40:35.000Z","size":17575,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-09-27T04:05:16.337Z","etag":null,"topics":["admm","cca","cross-covariance","lasso","matrix-factorization","r","r-package","rcpparmadillo","rcppparallel","splines"],"latest_commit_sha":null,"homepage":"https://egpivo.github.io/SpatMCA","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/egpivo.png","metadata":{"files":{"readme":"README.md","changelog":"NEWS.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-01-21T13:08:29.000Z","updated_at":"2024-08-26T16:36:02.000Z","dependencies_parsed_at":"2024-01-12T13:27:51.502Z","dependency_job_id":"7516a2bb-2e08-463c-b1f1-4cdc7e041b6b","html_url":"https://github.com/egpivo/SpatMCA","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egpivo%2FSpatMCA","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egpivo%2FSpatMCA/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egpivo%2FSpatMCA/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egpivo%2FSpatMCA/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/egpivo","download_url":"https://codeload.github.com/egpivo/SpatMCA/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219874955,"owners_count":16554632,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["admm","cca","cross-covariance","lasso","matrix-factorization","r","r-package","rcpparmadillo","rcppparallel","splines"],"created_at":"2024-09-27T04:05:38.582Z","updated_at":"2025-10-25T08:30:30.052Z","avatar_url":"https://github.com/egpivo.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SpatMCA: Regularized Spatial Maximum Covariance Analysis\n\n[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/SpatMCA?color=green)](https://cran.r-project.org/package=SpatMCA)\n[![R build status](https://github.com/egpivo/SpatMCA/workflows/R-CMD-check/badge.svg)](https://github.com/egpivo/SpatMCA/actions)\n[![Coverage Status](https://img.shields.io/codecov/c/github/egpivo/SpatMCA/master.svg)](https://codecov.io/github/egpivo/SpatMCA?branch=master)\n[![Downloads (monthly)](https://cranlogs.r-pkg.org/badges/SpatMCA?color=brightgreen)](https://www.r-pkg.org/pkg/SpatMCA)\n[![Downloads (total)](https://cranlogs.r-pkg.org/badges/grand-total/SpatMCA?color=brightgreen)](https://www.r-pkg.org/pkg/SpatMCA)\n[![Environmetrics](https://img.shields.io/badge/Environmetrics-10.1002%2Fenv.2481-brightgreen)](https://doi.org/10.1002/env.2481)\n\n## Description\n\n**SpatMCA** is an R package designed for regularized maximum covariance analysis. It serves as a powerful tool for:\n\n- Identifying smooth and localized coupling patterns to understand how one spatial process affects another.\n- Handling both regularly and irregularly spaced data, spanning 1D, 2D, and 3D datasets.\n- Implementing the alternating direction method of multipliers (ADMM) algorithm.\n\n\n## Installation\nYou can install the **SpatMCA** package using one of the following methods:\n\n### Install from CRAN:\n```r\ninstall.packages(\"SpatMCA\")\n```\n\n### Install the current development version from GitHub:\n```r\nremotes::install_github(\"egpivo/SpatMCA\")\n```\n#### Please Note:\n- **Windows Users:** Ensure that you have [Rtools](https://cran.r-project.org/bin/windows/Rtools/) installed before proceeding with the installation.\n\n- **Mac Users:** You need Xcode Command Line Tools and should install the library [`gfortran`](https://github.com/fxcoudert/gfortran-for-macOS/releases). Follow these steps in the terminal:\n    ```bash\n    brew update\n    brew install gcc\n    ```\n    For a detailed solution, refer to this [link](https://blog.thecoatlessprofessor.com/programming/cpp/rcpp-rcpparmadillo-and-os-x-mavericks-lgfortran-and-lquadmath-error/index.html), or download and install the library [`gfortran`](https://github.com/fxcoudert/gfortran-for-macOS/releases) to resolve the \"`ld: library not found for -lgfortran`\" error.\n\n\n### Usage\nTo perform regularized maximum covariance analysis using **SpatMCA**, follow these steps:\n\n```r\nlibrary(SpatMCA)\nspatmca(x1, x2, Y1, Y2, K = 1, num_cores = 1)\n```\n#### Parameters:\n  - `x1`, `x2`: Location matrices.\n  - `Y1`, `Y2`: Data matrices.\n  - `K`: Number of patterns.\n  - `num_cores`: Number of CPU cores.\n#### Output:\nProvides information about the identified patterns\n\n## Authors\n - [Wen-Ting Wang](https://www.linkedin.com/in/wtwang) ([GitHub](https://www.github.com/egpivo))\n - [Hsin-Cheng Huang](https://sites.stat.sinica.edu.tw/hchuang/)\n \n## Maintainer\n[Wen-Ting Wang](https://www.linkedin.com/in/wtwang) ([GitHub](https://www.github.com/egpivo))\n\n## Reference\nWang, W.-T. and Huang, H.-C. (2018). [Regularized spatial maximum covariance analysis](https://arxiv.org/pdf/1705.02716.pdf), Environmetrics, 29, https://doi.org/10.1002/env.2481\n \n## License\nGPL (\u003e= 2)\n\n## Citation\n1. To cite package ‘SpatMCA’ in publications use:\n```\n  Wang W, Huang H (2025). _SpatMCA: Regularized Spatial Maximum Covariance Analysis_.\n  R package version 1.0.7, \u003chttps://github.com/egpivo/SpatMCA\u003e.\n```\n2. A BibTeX entry for LaTeX users is\n```\n  @Manual{,\n    title = {SpatMCA: Regularized Spatial Maximum Covariance Analysis},\n    author = {Wen-Ting Wang and Hsin-Cheng Huang},\n    year = {2025},\n    note = {R package version 1.0.7},\n    url = {https://github.com/egpivo/SpatMCA},\n  }\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fegpivo%2Fspatmca","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fegpivo%2Fspatmca","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fegpivo%2Fspatmca/lists"}