We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 907c791 commit 5f6453dCopy full SHA for 5f6453d
1 file changed
R/misc.R
@@ -5,13 +5,15 @@
5
#' @param ... Parameters passed to `stop()`
6
#'
7
#' @return Concisely stops program execution
8
+#' @internal
9
qstop <- function(...) stop(..., call. = FALSE)
10
11
#' Require that a namespace be loaded, or stop execution
12
13
#' @param pkg (`character(1)`) Package to be loaded
14
15
#' @return Silently loads namespace, or stops execution if package cannot be loaded
16
17
require_namespace_or_stop <- function(pkg) {
18
if (!requireNamespace(pkg, quietly = TRUE)){
19
paste('Package', pkg, 'is required.') |> qstop()
0 commit comments