Checks if x is of type raster,terra,sf or sp
Checks if x is a raster or sp object
getSpatialClass(obj)
obj
## Not run: # add path getSpatialClass(x) ## End(Not run)
Chris Reudenbach
Useful links