Closed rsbivand closed 1 year ago
Thanks for reaching out @rsbivand. I agree, the preferred approach is to replace the retiring R spatial packages with active ones.
@sokole, do you have any cycles to put into this? I think you are most familiar with this part of the code base.
@clnsmth I'll try to address this in my next pull request to dev.
Please also see https://r-spatial.org/r/2023/04/10/evolution3.html, fix best by June, latest October 2023.
thanks for the link @rsbivand
@sokole Because of this change, usmap_transform
from the usmap
package now requires the sf
package. ecocomDP
will result in the following error once usmap
is updated soon:
Package: ecocomDP
Check: examples
New result: ERROR
Running examples in ‘ecocomDP-Ex.R’ failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: plot_sites
> ### Title: Plot sites on US map
> ### Aliases: plot_sites
>
> ### ** Examples
>
> ## Not run:
> ##D # Read a dataset of interest
> ##D dataset <- read_data("edi.193.5")
> ##D
> ##D # Plot the dataset
> ##D plot_sites(dataset)
> ##D
> ##D # Flatten dataset then plot
> ##D dataset %>%
> ##D flatten_data() %>%
> ##D plot_sites()
> ## End(Not run)
>
> # Plot the example dataset
> plot_sites(ants_L1)
The legacy packages maptools, rgdal, and rgeos, underpinning this package
will retire shortly. Please refer to R-spatial evolution reports on
https://r-spatial.org/r/2023/05/15/evolution4.html for details.
This package is now running under evolution status 0
Please note that 'maptools' will be retired during October 2023,
plan transition at your earliest convenience (see
https://r-spatial.org/r/2023/05/15/evolution4.html and earlier blogs
for guidance);some functionality will be moved to 'sp'.
Checking rgeos availability: FALSE
Please note that rgdal will be retired during October 2023,
plan transition to sf/stars/terra functions using GDAL and PROJ
at your earliest convenience.
See https://r-spatial.org/r/2023/05/15/evolution4.html and https://github.com/r-spatial/evolution
rgdal: version: 1.6-7, (SVN revision 1203)
Geospatial Data Abstraction Library extensions to R successfully loaded
Loaded GDAL runtime: GDAL 3.6.2, released 2023/01/02
Path to GDAL shared files: /usr/share/gdal
GDAL does not use iconv for recoding strings.
GDAL binary built with GEOS: TRUE
Loaded PROJ runtime: Rel. 9.1.1, December 1st, 2022, [PJ_VERSION: 911]
Path to PROJ shared files: /home/hornik/.local/share/proj:/usr/share/proj
PROJ CDN enabled: FALSE
Linking to sp version:1.6-1
To mute warnings of possible GDAL/OSR exportToProj4() degradation,
use options("rgdal_show_exportToProj4_warnings"="none") before loading sp or rgdal.
Error in usmap::usmap_transform(cleaned, input_names = c("longitude", :
`sf` must be installed to use `usmap_transform`.
Use: install.packages("sf") and try again.
Calls: plot_sites
Execution halted
The simplest fix would be to add sf
to your DESCRIPTION/Suggests
and/or importing it whenever usmap_transform()
or usmap_crs()
is used.
And https://r-spatial.org/r/2023/05/15/evolution4.html. Expect package to fail CRAN CMD check with _R_CHECK_SUGGESTS_ONLY_=true
when sp
2.0-0 is published very soon, if sf
is not added to Suggests:
See https://github.com/pdil/usmap/issues/70; new usmap
release forthcoming. You need to add sf
to Suggests: in DESCRIPTION
, if you do so, ecocomDP
passes CMD check
also with _R_CHECK_SUGGESTS_ONLY_=true
.
@clnsmth we have a fix for this, will submit PR this week.
Thanks!
00check.log is a recent check log from running under
_SP_EVOLUTION_STATUS_=2
without retiring r-spatial packages (suggested in this package) on the library path. The minimal correction is to check that the package namespaces can be loaded, and if not, do not run those parts of the examples or vignettes. It would be safer in the longer term to replace retiring r-spatial packages with active r-spatial/rspatial packages (see https://r-spatial.org/r/2022/04/12/evolution.html, https://r-spatial.org/r/2022/12/14/evolution2.html).