inla.mesh.query.RdQuery information about an inla.mesh object.
inla.mesh.query(mesh, ...)A list of query results.
loc <- matrix(c(0.1, 0.15), 1, 2)
lattice <- inla.mesh.lattice(
seq(0, 1, length.out = 10),
seq(0, 1, length.out = 10)
)
mesh <- inla.mesh.create(loc = loc, lattice = lattice, extend = FALSE)
vt <- which(inla.mesh.query(mesh,
vt.neighbours = list(
mesh$idx$loc,
4:6
)
)$vt.neighbours)
#> Warning: `inla.mesh.query()` was deprecated in INLA 23.08.18.
#> ℹ Does not yet have an `fmesher` alternative.
#> ℹ For more information, see
#> https://inlabru-org.github.io/fmesher/articles/inla_conversion.html
#> ℹ To silence these deprecation messages in old legacy code, set
#> `inla.setOption(fmesher.evolution.warn = FALSE)`.
#> ℹ To ensure visibility of these messages in package tests, also set
#> `inla.setOption(fmesher.evolution.verbosity = 'warn')`.
mesh2 <- inla.mesh.create(mesh$loc,
tv = mesh$graph$tv[vt, , drop = FALSE],
refine = FALSE, extend = FALSE
)