# NOT RUN {
library(dggridR)
data(dgquakes)
#Construct a grid with cells about ~1000 miles wide
dggs <- dgconstruct(spacing=1000,metric=FALSE)
dgquakes$cell <- dgtransform(dggs,dgquakes$lat,dgquakes$lon)
#Get grid cells for the earthquakes identified
grid <- dgcellstogrid(dggs, dgquakes$cell, frame=TRUE)
# }
Run the code above in your browser using DataLab