grid2spdf: grid2spdf function

View source: R/spatgrid.R

grid2spdfR Documentation

grid2spdf function

Description

A function to convert a regular (x,y) grid of centroids into a SpatialPoints object

Usage

grid2spdf(xgrid, ygrid, proj4string = CRS(as.character(NA)))

Arguments

xgrid

vector of x centroids (equally spaced)

ygrid

vector of x centroids (equally spaced)

proj4string

an optional proj4string, projection string for the grid, set using the function CRS

Value

a SpatialPolygonsDataFrame


spatsurv documentation built on Oct. 19, 2023, 9:07 a.m.