inla.spTransform {INLA}R Documentation

Wrapper method for inlabru::fm_transform

Description

[Deprecated] in favour of inlabru::fm_transform(). Handles transformation of various inla objects according to coordinate reference systems of sf::crs, sp::CRS or inla.CRS class.

Usage

inla.spTransform(x, CRSobj, ...)

Arguments

x

The object that should be transformed from it's current CRS to a new CRS

CRSobj

passed on as the crs argument to inlabru::fm_transform().

...

Potential other arguments for inlabru::fm_transform().

Value

The object is returned with its coordinates transformed

Author(s)

Finn Lindgren finn.lindgren@gmail.com

See Also

inla.CRS()

Examples


if (require("sf") && require("sp") && require("inlabru")) {
  latt <- inla.mesh.lattice(-10:10, 40:60)
  mesh1 <- inla.mesh.create(
    lattice = latt, extend = FALSE, refine = FALSE,
    crs = fm_CRS("longlat_norm")
  )
  mesh2 <- fm_transform(mesh1, fm_crs("lambert_globe"))
  print(summary(mesh1))
  print(summary(mesh2))
}

[Package INLA version 23.06.29 Index]