title: Problem in exporting a kriging map as Raster
body: <p>I created a kriging map which was created by using the kriging() and image() functions of the kriging package (table is the data with the coords and values):</p>
  
  <pre><code>krig &lt;- kriging(table@coords[ ,1], table@coords[ ,2], response = table@data$Joined.l_8, model = "spherical", lags = 3, pixels = 100)
  krig_raster &lt;- image(krig, main = NULL, xlab = "X coords", ylab = "", col = heat.colors(100))
  </code></pre>
  
  <p>The result can be viewed in the picture attached.</p>
  
  <p><a href="https://i.stack.imgur.com/laqS0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/laqS0.png" alt="enter image description here"></a></p>
  
  <p>My problem is that I cannot export this map as a raster. When using the following command of the raster package:</p>
  
  <pre><code>writeRaster(krig_raster, "/home/stathis/Desktop/test.tif", format="Gtiff", overwrite = TRUE)
  </code></pre>
  
  <p>I get the following error:</p>
  
  <pre><code>Error in (function (classes, fdef, mtable)  : 
    unable to find an inherited method for function ‘writeRaster’ for signature ‘"NULL", "character"’
  </code></pre>