0

I am running the following code to convert an an inverse distance weighted interpolation of nitrate values from a spatial data Frame. The problem is I have an empty raster when I convert it to raster as shown below. The idw function appears to work well and returns two values vra1.predict which has values in it and var1.var that is empty

enter image description here

Is there something I am doing wrong with the raster function that it casting the raster to be empty or is am I doing something wrong in the ids function or potentially an issue with my inputs?

my code is below

idw<-idw(formula = results ~ 1, locations = spdf, newdata = grd, idp = 1.0)

r       <- raster(idw$var1.pred)

The raster comes out empty

jpsmith
  • 11,023
  • 5
  • 15
  • 36
  • 1
    Hi @jdiales1! Please dont upload your data as an image for [these reasons](https://meta.stackoverflow.com/a/285557/12109788), but instead edit your question include code to recreate example data. If you need tips on how to do that, you can find some [here](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example). Good luck! – jpsmith Jun 23 '23 at 17:32

0 Answers0