# \donttest{
library(raster)
prod <- sdc_raster(enterprises, field = "production", r = 500)
print(prod)
prod <- sdc_raster(enterprises, field = "production", r = 1e3)
print(prod)
# get raster with the average production per cell averaged over the enterprises
prod_mean <- mean(prod)
summary(prod_mean)
# get raster with the total production per cell
prod_total <- sum(prod)
summary(prod_total)
# }
Run the code above in your browser using DataLab