# NOT RUN {
if (require("INLA", quietly = TRUE)) {
# Load Gorilla data
data("gorillas", package = "inlabru")
# Check if all Gorilla nests are inside the mesh
all(is.inside(gorillas$mesh, gorillas$nests))
# Also works for locations not stored as SpatialPoints object
loc <- coordinates(gorillas$nests)
all(is.inside(gorillas$mesh, loc))
}
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab