R/utils-mocks.R

Defines functions read_line require_namespace is_interactive

# These functions were created to be used with the 'mockr' package.
# Sort by type or alphabetical order.

is_interactive <- function(...) {
    interactive()
}

require_namespace <- function(x, ..., quietly = TRUE) {
    requireNamespace(x, ..., quietly = quietly)
}

read_line <- function(prompt, ...) {
    readline(prompt)
}

Try the mctq package in your browser

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

mctq documentation built on March 7, 2023, 8:22 p.m.