I'm trying to set a crs and evaluate min and max for a dataset, but I keep getting an error. My hunch is that something went wrong when I was setting the DSM_HARV, because although it ran without error, it's not functioning properly when I try to use it by name in code.
Here is the error message I'm receiving:
Error in (function (classes, fdef, mtable) : unable to find an inherited method for function ‘setMinMax’ for signature ‘"character"’
Here is my code:
library(raster)
library(rgdal)
raster("HARV_dsmCrop.tif")
DSM_HARV <- "HARV_dsmCrop.tif"
DSM_HARV <- setMinMax(DSM_HARV)