toggle_silence: Toggle between silence on and silence off
Description
This function detects whether output suppression is on or off, and switches it to its opposite state. Under one setting, this function can be used as an off-switch for the GRASS message/warning/error suppression enforced via the use of silence(value = TRUE).
Usage
toggle_silence(stay_off = TRUE)
Value
A logical indicating whether output suppression is active.
Arguments
stay_off
A logical indicating whether output suppression should be kept off once it is turned off. That is, if this function is called but output suppression is already off, then for stay_off=TRUE output suppression will simply remain off. Defaults to TRUE.
# Even if silence is currently off, silence will stay offtoggle_silence(TRUE)
# If silence is currently off, silence will be turned on.toggle_silence(FALSE)