simSpatialCov: Simulate random covariate field

View source: R/simSpatialCov.R

simSpatialCovR Documentation

Simulate random covariate field

Description

Simulate random covariate field

Usage

simSpatialCov(
  lim,
  nu,
  rho,
  sigma2,
  resol = 1,
  mean_function = NULL,
  raster_like = FALSE
)

Arguments

lim

Vector of limits of the map (xmin, xmax, ymin, ymax)

nu

smoothness parameter

rho

range parameter

sigma2

variance parameter

resol

Grid resolution (defaults to 1)

mean_function

function giving mean of a spatial coordinate. Must be coded to take a 2 (or 3)d vector and return a scalar. By default set to return 0 for every coordinates

raster_like

logical specifying the return output. If TRUE, then a list with xgrid, ygrid and matrix is returned convenient for image.plot. If FALSE a data.frame is returned, which might be more convenient for ggplot. Default to FALSE.

Value

either a data.frame (convenient for ggplot2) or a raster like list


papayoun/Rhabit documentation built on July 19, 2023, 8:04 p.m.