title: Error in (function( classes,fdef, mtable)
body: <p>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.</p>
  
  <p>Here is the error message I'm receiving:</p>
  
  <blockquote>
  <pre><code>Error in (function (classes, fdef, mtable)  : 
    unable to find an inherited method for function ‘setMinMax’ for signature ‘"character"’
  </code></pre>
  </blockquote>
  
  <p>Here is my code:</p>
  
  <pre><code>library(raster)
  library(rgdal)
  
  raster("HARV_dsmCrop.tif")
  
  DSM_HARV &lt;- "HARV_dsmCrop.tif"
  
  DSM_HARV &lt;- setMinMax(DSM_HARV) 
  </code></pre>