These functions wrap {cli} functions and elements
to build an attractive command line interface (CLI).
They divide into those that change what a function does
and those that only report what it did.
A call that changes control flow always fires, whatever the verbosity, because silencing it would let the code it guards run on and return a wrong answer instead of an explanation:
snet_abort() for an error the user has to fix.
snet_unavailable() for a feature that is not yet available.
snet_warn() for a result the user should not trust without reading,
such as a value that is dropped or a name that does not match.
A call that only reports is silenced under the default verbosity:
snet_info() for what a function chose on the user's behalf.
snet_success() for the completion of a long task.
snet_progress_step() and the other snet_progress_*() functions
for a progress bar.
snet_minor_info() for the bookkeeping a function did on the way,
such as which column it renamed.
snet_prompt() asks the user something, so it always shows.
snet_info(..., .envir = parent.frame())
snet_minor_info(..., .envir = parent.frame())
snet_warn(..., .envir = parent.frame())
snet_abort(..., .envir = parent.frame())
snet_success(..., .envir = parent.frame())
snet_prompt(..., .envir = parent.frame())
snet_unavailable(..., .envir = parent.frame())The snet_verbosity option takes four levels, each adding one thing to
the one before it:
'quiet', the default, reports nothing that is not an error,
a warning, or a prompt.
'normal' adds snet_info() and snet_success(),
so that a user learns what a function chose on their behalf.
'verbose' adds the progress bars,
which reassure a user that a long task is running.
'debug' adds snet_minor_info(),
which reports exhaustively what a function did on the way.
Set one with, for example, options(snet_verbosity = 'verbose').