Skip to contents

subincomeR 0.6.0

CRAN release: 2026-08-21

CRAN compliance

  • All exported functions now fail gracefully when an internet resource is unavailable, per CRAN policy: getDOSE(), getDOSE_geom() and matchDOSE() return NULL invisibly with an informative message instead of throwing an error when there is no internet connection, a download fails, or a downloaded file is corrupt. stop() is still used for invalid user input.
  • The regional-convergence vignette is now precomputed (source in vignettes/regional-convergence.Rmd.orig, regenerated with dev/precompute-vignettes.R), so no network-dependent code runs at R CMD check time.

New features

  • New cache = TRUE argument in getDOSE(), getDOSE_geom() and matchDOSE(): opt-in persistent storage of downloaded data in tools::R_user_dir("subincomeR", "cache"), so the data (up to ~769 MB for the geometries) is reused across R sessions instead of being re-downloaded every session. The default behavior (storage in tempdir()) is unchanged.
  • New helpers subincomeR_cache_dir() and subincomeR_cache_clear() to locate and delete the persistent cache.

Other improvements

  • The testthat suite now runs during R CMD check (the tests/testthat.R runner was missing), with new network-free tests covering the offline and failed-download paths via mocked connectivity.
  • More robust downloads: the download.file() fallback now checks its return status, partial or corrupt downloads are always removed, the download timeout is raised to 600s, and the deprecated wininet method was dropped.
  • matchDOSE() now validates all its arguments before any network activity.

subincomeR 0.5.0

CRAN release: 2026-05-08

  • Updated DOSE dataset to version 2.14 (Zenodo record 20035157)
  • Replaced the magrittr pipe (%>%) with the native R pipe (|>) in package code, addressing the CRAN NOTE flagged after sf stopped re-exporting %>% (see r-spatial/sf#2607)
  • Declared a minimum R version of 4.1.0 (required by the native pipe)

subincomeR 0.4.0

CRAN release: 2025-09-11

  • Updated DOSE dataset to version 2.11

subincomeR 0.3.0

CRAN release: 2025-02-16

  • Updated DOSE dataset to version 2.10

subincomeR 0.2.2

CRAN release: 2024-12-19

  • Removed writing to user’s home filespace by default (using tempdir() instead)
  • Added explicit path parameter throughout to allow users to specify custom storage locations
  • Added download confirmation for large files with option to skip in non-interactive sessions

subincomeR 0.2.1

  • Fixed minor style issues in DESCRIPTION file

subincomeR 0.2.0

  • Added the getDOSE_geom() function to explicitly download the geometries of the sub-national regions

subincomeR 0.1.3

  • Updated DOSE dataset to version 2.9
  • Improved download handling to better manage corrupted downloads and connection issues

subincomeR 0.1.2

  • Added the option to specify the path where the .gpkg file with the sub-national geometries would be stored

subincomeR 0.1.1

  • Added the option to pre-specify country identifiers in matchDOSE() to skip the first step of the geocoding process

subincomeR 0.1.0

  • Initial release