Conditionally suppress messages from expressions in BirdFlowR code
Source:R/bf_msg.R
bf_suppress_msg.Rd
This internal functions is used to suppress messages thrown
by functions called in BirdFlowR code if birdflow_options("verbose")
is FALSE
.
See also
preprocess_species()
uses this when calling ebirdst
functions that display messages.
When BirdFlowR functions generate messages they should use bf_msg()
so that
birdflow_options("verbose")
is honored.
Examples
if (FALSE) { # \dontrun{
# bf_suppress_msg isn't exported so can't be run in examples
# in internal code or after devtools::load_all() example will work
ob <- birdflow_options("verbose")
birdflow_options(verbose = FALSE)
bf_suppress_msg( message("hi" ))
birdflow_options(verbose = TRUE)
bf_suppress_msg( message("hi" ))
birdflow_options(ob)
} # }