| Type: | Package | 
| Title: | Simplify Output Verbosity | 
| Version: | 0.1.0 | 
| Maintainer: | Thomas Johnson <thomascjohnson@gmail.com> | 
| Description: | Simplifies output suppression logic in R packages, as it's common to develop some form of it in R. 'quietR' intends to simplify that problem and allow a set of simple toggle functions to be used to suppress console output. | 
| License: | MIT + file LICENSE | 
| URL: | https://github.com/thomascjohnson/quietR | 
| BugReports: | https://github.com/thomascjohnson/quietR/issues | 
| Encoding: | UTF-8 | 
| LazyData: | true | 
| Suggests: | testthat | 
| RoxygenNote: | 6.1.1 | 
| NeedsCompilation: | no | 
| Packaged: | 2019-06-16 19:21:14 UTC; thom | 
| Author: | Thomas Johnson [aut, cre] | 
| Repository: | CRAN | 
| Date/Publication: | 2019-06-17 16:40:03 UTC | 
Output Functions
Description
Masked output functions (cat, message, print) that can be toggled with [verbosity] functions. Instead of implementing your own verbose handling system, use quietR.
Usage
cat(...)
message(...)
print(...)
Arguments
| ... | Arguments passed to masked output function | 
Examples
print("Hello World!")
disable_verbose()
print("Hello World!")
Getting and Setting Verbosity
Description
Use the 'is_verbose', 'enable_verbose' and 'disable_verbose' to toggle console output functions.
Usage
enable_cat()
disable_cat()
enable_message()
disable_message()
enable_print()
disable_print()
is_verbose(func = c("print", "cat", "message"))
enable_verbose(func = c("print", "cat", "message"))
disable_verbose(func = c("print", "cat", "message"))
Arguments
| func | character - which function(s) to enable | 
Value
logical, whether or not to output specified function
Examples
# Returns FALSE:
is_verbose("print") #FALSE
enable_verbose()
# Now it returns TRUE:
is_verbose("print") #TRUE
disable_verbose()
# Now it returns FALSE:
is_verbose() #FALSE
is_verbose("print") #FALSE
enable_verbose("print")
print("Hi there!") # Outputs
cat("I won't output") # Doesn't output