diff --git a/DESCRIPTION b/DESCRIPTION index 00e8501a8..3567a7a2f 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -93,6 +93,7 @@ Suggests: ggplot2, inlabru, INLAspacetime, + INLA, knitr, rgdal, rmarkdown, diff --git a/R/barrier.R b/R/barrier.R index 9f1975e81..f8298e002 100644 --- a/R/barrier.R +++ b/R/barrier.R @@ -114,6 +114,9 @@ add_barrier_mesh <- function(spde_obj, barrier_sf, range_fraction = 0.2, if (!requireNamespace("INLAspacetime", quietly = TRUE)) { cli_abort("The INLAspacetime package must be installed to use this function.") } + if (!requireNamespace("INLAspacetime", quietly = TRUE)) { + cli_abort("The INLA package must be installed to use this function.") + } # b/c INLAspacetime uses it!! assert_that( is.numeric(range_fraction), range_fraction <= 1,