Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

pixels

Generate SpatialPixels covering an inla.mesh


Description

Generate SpatialPixels covering an inla.mesh

Usage

pixels(mesh, nx = 150, ny = 150, mask = TRUE)

Arguments

mesh

An inla.mesh object

nx

Number of pixels in x direction

ny

Number of pixels in y direction

mask

If logical and TRUE, remove pixels that are outside the mesh. If mask is a Spatial object, only return pixels covered by this object.

Value

SpatialPixelsDataFrame covering the mesh

Author(s)

Fabian E. Bachl bachlfab@gmail.com

Examples

data("mrsea")
pxl <- pixels(mrsea$mesh, nx = 50, ny = 50, mask = mrsea$boundary)
ggplot() +
  gg(pxl, fill = "grey", alpha = 0.5) +
  gg(mrsea$mesh)

inlabru

Bayesian Latent Gaussian Modelling using INLA and Extensions

v2.3.1
GPL (>= 2)
Authors
Finn Lindgren [aut, cre, cph] (<https://orcid.org/0000-0002-5833-2011>, Finn Lindgren continued development of the main code), Fabian E. Bachl [aut, cph] (Fabian Bachl wrote the main code), David L. Borchers [ctb, dtc, cph] (David Borchers wrote code for Gorilla data import and sampling, multiplot tool), Daniel Simpson [ctb, cph] (Daniel Simpson wrote the basic LGCP sampling method), Lindesay Scott-Howard [ctb, dtc, cph] (Lindesay Scott-Howard provided MRSea data import code), Seaton Andy [ctb] (Andy Seaton provided testing and bugfixes)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.