priorityMesh: Creates a mesh based on gradient analysis

View source: R/priorityMesh.R

priorityMeshR Documentation

Creates a mesh based on gradient analysis

Description

A function to generate a mesh, placing points preferentially where there are larger changes in the values of a set of environmental covariates

Usage

priorityMesh(
  covars = NULL,
  numCovarPoints = 100,
  ...,
  funcApply = function(curRaster, extraOptions = writeOptions) {
    
    do.call(terra::terrain, append(list(x = curRaster, v = "slope", filename =
    tempfile(fileext = ".tif")), as.list(extraOptions)))
 },
  filename = NULL,
  writeOptions = list()
)

Arguments

covars

A SpatRaster object that contains the covariate information

numCovarPoints

An integer scalar that provides the number of extra covariate-related triangulation points that will be produced and added to the list of parameters appended to the loc argument before running the fm_mesh_2d_inla mesh creation function.

...

Parameters to be passed to the fm_mesh_2d_inla mesh creation function

funcApply

A function to apply to the covars object before the priority analysis is performed. A value of NULL means that no function will be applied to the covariate information. The default option is that the slope of the covariates will be calculated through the application of the terrain function.

filename

An optional character scalar giving the location to store the calculated intensity raster object. If this value is NULL (the default) then the raster is not stored in a file.

writeOptions

A list of named options to be passed to the writeRaster function when producing raster outputs.

Value

An inla.mesh object

Author(s)

Joseph D. Chipperfield, joechip90@googlemail.com

See Also

fm_mesh_2d_inla, SpatRaster, terrain, writeRaster


joechip90/PaGAn documentation built on April 17, 2025, 4:05 p.m.