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(dims=c(10,10))
mesh = inla.mesh.create(loc=loc, lattice=lattice, extend=FALSE)
#> Error in inla.has_PROJ6(): inla.require("rgdal") is not TRUE
vt = which(inla.mesh.query(mesh,
vt.neighbours=list(mesh$idx$loc,
4:6))$vt.neighbours)
#> Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'which': object 'mesh' not found
mesh2 = inla.mesh.create(mesh$loc, tv=mesh$graph$tv[vt,,drop=FALSE],
refine=FALSE, extend=FALSE)
#> Error: object 'mesh' not found