If we do it: R CMD check on the package is NOTE-free, so a new NOTE is a signal. If we never do: two standing NOTEs hide the next one, as the five NOTEs from #100 hid each other.
Problem
R CMD check --no-manual --ignore-vignettes on the v0.5.6 tarball, built with the #100 .Rbuildignore change, reports 2 NOTEs (measured 2026-10-01, _R_CHECK_FORCE_SUGGESTS_=false). #100 cleared the other 3. These 2 are not caused by #100, and nothing tracks them:
* checking dependencies in R code ... NOTE
Namespace in Imports field not imported from: 'sf'
* checking R code for possible problems ... NOTE
cd_baseline / cd_compare / cd_plot_comparison / cd_plot_timeseries / cd_summary:
no visible binding for global variable '.data' (cd_summary also '.env')
NAMESPACE has no import or importFrom lines at all. Code uses the .data and .env pronouns unqualified, and never imports them from rlang.
sf is in Imports, but no R code calls it. Outside @examples, the only reference is inherits(aoi, "sf") in R/cd_crop.R:30, which does not need the namespace.
Proposed Solution
- Add
@importFrom rlang .data .env to a package-level doc (R/cd-package.R), per the r-package convention.
- Decide where
sf belongs. It could move to Suggests: the examples call sf::st_read(), and cd_crop() only checks the class. Or it could stay in Imports with a real import, if an sf input should guarantee sf is loaded for the terra::vect() conversion. Check how cd_crop() turns an sf object into a SpatVector before choosing.
- Re-run
R CMD check and confirm 0 NOTEs.
Resolution
Landed in #114. Decided: sf moves to Suggests. cd_crop() hands an sf AOI to terra::vect(), and terra 1.9.50 converts it through methods::as(x, "SpatVector"), which loads sf when it is needed (checked in a session with sf not loaded). Anyone holding an sf object therefore already has sf. The 8 tests that read their AOI with sf::st_read() now skip_if_not_installed("sf"). R CMD check is Status OK, 0 NOTEs. The one change users see: pak::pak("NewGraphEnvironment/cd") no longer installs sf.
If we do it:
R CMD checkon the package is NOTE-free, so a new NOTE is a signal. If we never do: two standing NOTEs hide the next one, as the five NOTEs from #100 hid each other.Problem
R CMD check --no-manual --ignore-vignetteson the v0.5.6 tarball, built with the #100.Rbuildignorechange, reports 2 NOTEs (measured 2026-10-01,_R_CHECK_FORCE_SUGGESTS_=false). #100 cleared the other 3. These 2 are not caused by #100, and nothing tracks them:NAMESPACEhas noimportorimportFromlines at all. Code uses the.dataand.envpronouns unqualified, and never imports them from rlang.sfis inImports, but no R code calls it. Outside@examples, the only reference isinherits(aoi, "sf")inR/cd_crop.R:30, which does not need the namespace.Proposed Solution
@importFrom rlang .data .envto a package-level doc (R/cd-package.R), per the r-package convention.sfbelongs. It could move toSuggests: the examples callsf::st_read(), andcd_crop()only checks the class. Or it could stay inImportswith a real import, if an sf input should guarantee sf is loaded for theterra::vect()conversion. Check howcd_crop()turns an sf object into aSpatVectorbefore choosing.R CMD checkand confirm 0 NOTEs.Resolution
Landed in #114. Decided:
sfmoves to Suggests.cd_crop()hands an sf AOI toterra::vect(), and terra 1.9.50 converts it throughmethods::as(x, "SpatVector"), which loads sf when it is needed (checked in a session with sf not loaded). Anyone holding an sf object therefore already has sf. The 8 tests that read their AOI withsf::st_read()nowskip_if_not_installed("sf").R CMD checkis Status OK, 0 NOTEs. The one change users see:pak::pak("NewGraphEnvironment/cd")no longer installs sf.