Skip to content

Commit

Permalink
Revert to inla.spde2.matern
Browse files Browse the repository at this point in the history
  • Loading branch information
seananderson committed Oct 11, 2023
1 parent 08325b4 commit e960d1e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
10 changes: 5 additions & 5 deletions R/mesh.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@
#'
#' @export
#'
#' @examples
#'
#' @examplesIf inla_installed()
#' \donttest{
#' mesh <- make_mesh(pcod, c("X", "Y"), cutoff = 5, type = "cutoff")
#' plot(mesh)
Expand All @@ -38,6 +37,7 @@
#' plot(mesh)
#'
#'}
#'
# # Defining a mesh directly with fmesher (formerly in INLA):
# bnd <- fmesher::fm_nonconvex_hull(cbind(pcod$X, pcod$Y), convex = -0.05)
# inla_mesh <- fmesher::fm_mesh_2d_inla(
Expand Down Expand Up @@ -128,11 +128,11 @@ make_mesh <- function(data, xy_cols,
loc_centers <- NA
}
# TODO:
# spde <- INLA::inla.spde2.matern(mesh)
# mesh_inla <- INLA::inla.mesh.create(loc_xy, refine = TRUE, cutoff = cutoff)
spde <- INLA::inla.spde2.matern(mesh)
mesh_inla <- INLA::inla.mesh.create(loc_xy, refine = TRUE, cutoff = cutoff)
# names(spde_inla$param.inla)

spde <- fmesher::fm_matern_precision(mesh, alpha = 2)
# spde <- fmesher::fm_matern_precision(mesh, alpha = 2, rho = )
# A_inla <- INLA::inla.spde.make.A(mesh, loc = loc_xy)
A <- fmesher::fm_basis(mesh, loc = loc_xy)

Expand Down
3 changes: 2 additions & 1 deletion man/make_mesh.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e960d1e

Please sign in to comment.