From abfb8f2a52f9b5457b486287bc134e60f4ef73b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kirill=20M=C3=BCller?= Date: Tue, 12 Mar 2024 19:31:37 +0100 Subject: [PATCH] docs: Document `on_load()` detail --- R/aaa.R | 4 ++++ man/on_load.Rd | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/R/aaa.R b/R/aaa.R index 3a4920d2be..82ad373239 100644 --- a/R/aaa.R +++ b/R/aaa.R @@ -69,6 +69,10 @@ the <- new.env(parent = emptyenv()) #' `on_load()` is implemented via `.onLoad()` and requires #' `run_on_load()` to be called from that hook. #' +#' The expressions inside `on_load()` do not undergo static analysis +#' by `R CMD check`. Therefore, it is advisable to only use +#' simple function calls inside `on_load()`. +#' #' @examples #' quote({ # Not run #' diff --git a/man/on_load.Rd b/man/on_load.Rd index b99c562870..bd75be995c 100644 --- a/man/on_load.Rd +++ b/man/on_load.Rd @@ -72,6 +72,10 @@ disparate expressions in a single block. \code{on_load()} is implemented via \code{.onLoad()} and requires \code{run_on_load()} to be called from that hook. + +The expressions inside \code{on_load()} do not undergo static analysis +by \verb{R CMD check}. Therefore, it is advisable to only use +simple function calls inside \code{on_load()}. } \examples{