A function to convert a regular (x,y) grid of centroids into a SpatialPoints object
grid2spdf(xgrid, ygrid, proj4string = CRS(as.character(NA)))
vector of x centroids (equally spaced)
vector of x centroids (equally spaced)
an optional proj4string, projection string for the grid, set using the function CRS
a SpatialPolygonsDataFrame