Skip to content

Release locationallocation 0.2.1 (CRAN resubmission) - #16

Merged
giacfalk merged 1 commit into
mainfrom
release-0.2.1
Nov 13, 2026
Merged

giacfalk merged 1 commit into
mainfrom
release-0.2.1

Conversation

@giacfalk

Copy link
Copy Markdown
Owner

CRAN's automatic incoming checks rejected 0.2.0 because the allocation() example took 10.3 s on Debian and 11.3 s on Windows. They also flagged some words in DESCRIPTION as possible misspellings, but these are false positives (author names, "et al.", "geospatial").

Changes:

  • Faster masking: mask_raster_to_polygon() rasterizes the polygon with touches = TRUE, the same rule as terra::mask(). A test checks that the result equals terra::mask().
  • Faster allocation setup: demand weights are computed on cell values and resampled only when their grid differs from the demand's.
  • gdistance, igraph, raster, sf, terra and ggplot2 are imported in the NAMESPACE, so they load with the package instead of during the first example.
  • Results are identical to 0.2.0 on the Naples example: travel times, coverage statistics, masked raster, and continuous and discrete allocations (coverage, coordinates, travel times).
  • R CMD check --as-cran --timings gives 0 errors and 0 warnings; the 2 NOTEs are local only (no pandoc or V8). The slowest example now takes 1.5 s (about 8 s before).
  • Version 0.2.1, with updated NEWS, cran-comments, CITATION.cff and codemeta.

CRAN's incoming checks of 0.2.0 flagged the allocation() example at
10.3 s (Debian) and 11.3 s (Windows).

- mask_raster_to_polygon() rasterizes the polygon once (touches = TRUE,
  as terra::mask() does) instead of masking with terra; raster masks
  are compared by cell values.
- allocation_setup() and weighted_demand() work on cell values; demand
  weights are only resampled when their grid differs from the demand.
- Import gdistance, igraph, raster, sf, terra and ggplot2 in the
  NAMESPACE, so they load with the package rather than inside the first
  example.
- Results are identical to 0.2.0 on the Naples data (travel times,
  coverage, masked rasters, selected facilities). The slowest example now
  takes 1.5 s with R CMD check --as-cran --timings.
- Bump to 0.2.1; NEWS, cran-comments (resubmission notes, including the
  spelling false positives), CITATION.cff and codemeta.
@giacfalk
giacfalk merged commit 6004db4 into main Nov 13, 2026
7 checks passed
@giacfalk
giacfalk deleted the release-0.2.1 branch November 13, 2026 19:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant