R/onAttach.R

Defines functions .onAttach

Documented in .onAttach

#' Message on attach
#' 
#' Checks if INLA is installed, and prints a warning if not.
#'
#' @param ... Not used
#' 
#' @return \code{NULL}, invisibly
#'
#' @keywords internal
.onAttach <- function(...) {
  if (interactive()) {

    if (!requireNamespace("INLA", quietly = TRUE)) {
      warning(
        "The `INLA` package is required to the Bayesian methods in `BayesfMRI`.",
        "Please install it.", 
        call. = FALSE
      )
    }
  }

}

Try the BayesfMRI package in your browser

Any scripts or data that you put into this service are public.

BayesfMRI documentation built on Dec. 23, 2025, 1:07 a.m.