Switch branches/tags
Nothing to show
Find file History
Latest commit 7dd1a63 Sep 24, 2015 @oscarperpinan oscarperpinan Fix proj4string of NO2sp
With current version of NO2sp:

> library(gstat)
>
> airGrid <- spsample(NO2sp, type='regular', n=1e5)
> gridded(airGrid) <- TRUE
> airKrige <- krige(mean ~ 1, NO2sp, airGrid)
Error in predict.gstat(g, newdata = newdata, block = block, nsim = nsim,  :
  var1 : data item in gstat object and newdata have different coordinate
> reference systems

because spsample uses CRS to set the proj4string of the result. CRS
reads the proj4string of the data (NO2sp) but fixes it with more information.