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
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