# a vector resource
vec <- system.file("shape/nc.shp", package = "sf")
spds_exists(vec, what = "vector")
# a raster resource
ras <- system.file("ex/elev.tif", package = "terra")
spds_exists(ras, what = "raster")
# a non existing file
spds_exists("not-here.gpkg", what = "vector")
Run the code above in your browser using DataLab