print_msg: Print a message based on the level of verbosity

View source: R/utils.R

print_msgR Documentation

Description

Print a message based on the level of verbosity

Usage

print_msg(msg, msg_type = c("INFO", "DEBUG", "WARNING", "STOP"))

Arguments

msg

The message to be printed

msg_type

The type of message, one of "INFO", "DEBUG", or "WARNING"

Value

None

Examples

opt_warn <- options()$warn
set_verbosity(1)
print_msg("Hello world!", "INFO")
set_verbosity(3)
print_msg("Debugging message", "DEBUG")
set_verbosity(0)
print_msg("Hello world!", "INFO")
print_msg("Debugging message", "DEBUG")
options(warn=-1)
print_msg("A warning message not displayed", "WARNING")
options(warn=opt_warn)

dputhier/scigenex documentation built on May 31, 2024, 8:59 a.m.