MakeSpatialRegion: Function to set up spatial structure for region

View source: R/MakeSpatialRegion.R

MakeSpatialRegionR Documentation

Function to set up spatial structure for region

Description

Function to set up spatial structure for region

Usage

MakeSpatialRegion(data = NULL, coords = c("X", "Y"), meshpars,
  bdry = NULL, proj = CRS("+proj=utm"))

Arguments

data

Data (as data frame, with points having locations, or as a SpatialPointsDataFrame). Can be NULL, if bdry is not NULL.

coords

Names of columns for coordinates (X & Y) in data. Ignored if data is NULL.

meshpars

List of parameters to be sent to inla.mesh.2d().

bdry

Polygon of boundary for region, of class Polygon. If NULL, draws a boundary around the points.

proj

Projection to use if data is not a projection. Defaults to utm (hopefully).

Value

A list with 3 elements: . mesh: mesh (from inla.mesh.2d) . spde: spde object for Matern model (from inla.spde2.matern) . w: weights for each point in mesh


oharar/PointedSDMs documentation built on July 11, 2022, 11:20 a.m.