I tried to read a DEM raster using getData (from the raster package), then convert the RasterLayer to a SpatRaster (terra package). First step worked, but the second one fai