initgrid: Initiate Grid

Description Usage Arguments Value Examples

Description

Initiates a SpatialPolygonsDataFrame grid that will be used as the model domain. Variables in the dataframe of the SpatialPolygonsDataFrame that should otherwise be logical (e.g. areas) are converted to numeric since logical variables are incompatible with ESRI shapefiles.

Usage

1
initgrid(EEZ, cell_size, proj, areas = NA)

Arguments

EEZ

A SpatialPolygonsDataFrame of the model domain

cell_size

cell size of the grid to be created

proj

A character string of projection arguments; the arguments must be entered exactly as in the PROJ.4 documentation

areas

a named list of areas to include within the dataframe of the grid SpatialPolygonsDataFrame. (e.g. areas=c(Habitats=Habitats,Breeding=Breeding))

Value

SpatialPolygonsDataFrame

Examples

1
2
proj  <- "+proj=utm +zone=20 +datum=NAD83 +units=m +no_defs +ellps=GRS80 +towgs84=0,0,0"
p <- initgrid(EEZ=EEZ,cell_size=20000,proj=proj,areas=c(Habitats=Habitats,Breeding=Breeding))

remi-daigle/BESTMPA documentation built on May 27, 2019, 4:55 a.m.