Changelog
Source:NEWS.md
sfclust 1.1.0
CRAN release: 2026-07-28
New features
- Added support for raster
starsinput (x/ygrid dimensions), alongside the existing vector-geometry input, including a newraster_adjacency()internal helper and dispatch ingenclust()/sfclust(). - Added
chapa, a real NDWI2 vegetation-index raster dataset from El Chaparrillo, Spain, and a new article vignette demonstrating raster clustering (vg13-ndwi-chaparrillo.Rmd). - Cells with missing/
NAresponse values (e.g. raster cells outside a study region) are now automatically excluded from clustering viaresponse/valid_ids, instead of requiring the user to pre-filter their data. - Added
update()methods forsfclustobjects:nitercontinues MCMC sampling from where a previous fit left off, andsamplerefits the full INLA models for a specific stored sample without further sampling. - Generalized spatial/functional dimension handling (
spnames/fnames) so spatial dimension names no longer need to match a fixed convention. -
plot_clusters_fitted()/fitted()gainedinv_link/aggregation options, returning cluster-level (mean_cluster) and inverse-link (mean_cluster_inv) summaries.
Changes
- Internal architecture reworked:
sfclust()now dispatches tosfclust.data.frame()(core interface) andsfclust.stars()(spatial convenience wrapper), replacing the previous single-path implementation.data_all()/filter_df()replace the oldstnames-based long-format conversion.
Bug fixes
- Fixed corner cases with
NULLfitted models and raster inputs. - Fixed adjacency handling for custom/user-supplied adjacency matrices and point-geometry plotting.
- Fixed cluster-level aggregation in fitted values and plots.
-
fitted()/plot()no longer require INLA to be installed when applied to an already-fittedsfclustobject (e.g. one loaded from a saved.rds); the inverse-link transform for standard families (gaussian, binomial, poisson) is now computed natively instead of viaINLA::inla.link.inv*().