Skip to content

Commit

Permalink
Move to require for INLA loads
Browse files Browse the repository at this point in the history
  • Loading branch information
gareth-j committed Aug 22, 2023
1 parent 6b62a0a commit d9d0ccd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions R/shiny_priors.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ priors_shiny <- function(spatial_data,
time_variable,
mesh) {
require_packages(packages = "INLA")
loadNamespace(INLA)
library(future)
library(promises)
require(INLA)
require(future)
require(promises)
future::plan(future::multisession())

# Text for priors help
Expand Down Expand Up @@ -259,7 +259,7 @@ priors_shiny <- function(spatial_data,
promise <- promises::future_promise(
{
# Without loading INLA here we get errors
library(INLA)
require(INLA)
inlabru::bru(formula_local,
data = measurement_data_local,
family = "poisson",
Expand Down

0 comments on commit d9d0ccd

Please sign in to comment.