The raster pkg in R depends on sp, which depends on maptools, rgdal, and rgeos. The latter 3 pkgs will be retired soon (by October 2023). I need to transfer the amapps_grid data from raster to terra. Unfortunately, there are issues with saving SpatRaster objects from terra using save (which is the method used by usethis::use_data). As a workaround, I'm going to save amapps_grid as an sf object with an example of how to convert the sf object into a SpatRaster object.
This is ugly, but should work. At least until I can figure out if and how to save SpatRaster objects in *.rda files.
The
raster
pkg in R depends onsp
, which depends onmaptools
,rgdal
, andrgeos
. The latter 3 pkgs will be retired soon (by October 2023). I need to transfer theamapps_grid
data fromraster
toterra
. Unfortunately, there are issues with savingSpatRaster
objects fromterra
usingsave
(which is the method used byusethis::use_data
). As a workaround, I'm going to saveamapps_grid
as ansf
object with an example of how to convert thesf
object into aSpatRaster
object.This is ugly, but should work. At least until I can figure out if and how to save
SpatRaster
objects in*.rda
files.