sfclust
Bayesian Spatial Functional Clustering
Description
Bayesian clustering of spatial regions with similar functional shapes using spanning trees and latent Gaussian models. The method enforces spatial contiguity within clusters and supports a wide range of latent Gaussian models, including non-Gaussian likelihoods, via the R-INLA framework. The algorithm is based on Zhong, R., Chacón-Montalván, E. A., and Moraga, P. (2024) <doi:10.48550/arXiv.2407.12633>, extending the approach of Zhang, B., Sang, H., Luo, Z. T., and Huang, H. (2023) <doi:10.1214/22-AOAS1643>. The package includes tools for model fitting, convergence diagnostics, visualization, and summarization of clustering results.
Downloads
685
Last 30 days
5432nd
1.8K
Last 90 days
5.4K
Last year
Trend: +16.5% (30d vs prior 30d)
CRAN Check Status
Show all 14 flavors
| Flavor | Status |
|---|---|
| r-devel-linux-x86_64-debian-clang | OK |
| r-devel-linux-x86_64-debian-gcc | OK |
| r-devel-linux-x86_64-fedora-clang | OK |
| r-devel-linux-x86_64-fedora-gcc | OK |
| r-devel-macos-arm64 | OK |
| r-devel-windows-x86_64 | ERROR |
| r-oldrel-macos-arm64 | NOTE |
| r-oldrel-macos-x86_64 | NOTE |
| r-oldrel-windows-x86_64 | OK |
| r-patched-linux-x86_64 | OK |
| r-release-linux-x86_64 | OK |
| r-release-macos-arm64 | OK |
| r-release-macos-x86_64 | OK |
| r-release-windows-x86_64 | OK |
Check details (3 non-OK)
tests
Running 'testthat.R' [3s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
> # This file is part of the standard setup for testthat.
> # It is recommended that you do not modify it.
> #
> # Where should you do additional test configuration?
> # Learn more about the roles of various files in:
> # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
> # * https://testthat.r-lib.org/articles/special-files.html
>
> library(testthat)
> library(sfclust)
>
> test_check("sfclust")
Linking to GEOS 3.14.1, GDAL 3.12.1, PROJ 9.7.1; sf_use_s2() is TRUE
Attaching package: 'igraph'
The following object is masked from 'package:testthat':
compare
The following objects are masked from 'package:stats':
decompose, spectrum
The following object is masked from 'package:base':
union
package dependencies
Package suggested but not available for checking: ‘INLA’
package dependencies
Package suggested but not available for checking: ‘INLA’
Check History
ERROR 11 OK · 2 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Apr 2, 2026
tests
Running 'testthat.R' [3s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
> # This file is part of the standard setup for testthat.
> # It is recommended that you do not modify it.
> #
> # Where should you do additional test
...[truncated]...
e: 'igraph'
The following object is masked from 'package:testthat':
compare
The following objects are masked from 'package:stats':
decompose, spectrum
The following object is masked from 'package:base':
union
package dependencies
Package suggested but not available for checking: ‘INLA’
package dependencies
Package suggested but not available for checking: ‘INLA’
NOTE 12 OK · 2 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Mar 30, 2026
package dependencies
Package suggested but not available for checking: ‘INLA’
package dependencies
Package suggested but not available for checking: ‘INLA’
ERROR 11 OK · 2 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Mar 24, 2026
tests
Running 'testthat.R' [3s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
> # This file is part of the standard setup for testthat.
> # It is recommended that you do not modify it.
> #
> # Where should you do additional test
...[truncated]...
e: 'igraph'
The following object is masked from 'package:testthat':
compare
The following objects are masked from 'package:stats':
decompose, spectrum
The following object is masked from 'package:base':
union
package dependencies
Package suggested but not available for checking: ‘INLA’
package dependencies
Package suggested but not available for checking: ‘INLA’
NOTE 12 OK · 2 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Mar 10, 2026
package dependencies
Package suggested but not available for checking: ‘INLA’
package dependencies
Package suggested but not available for checking: ‘INLA’