Learn R Programming

cooltools (version 2.18)

quiet: Suppress console output

Description

Executes routines and command lines and load packages while suppressing the console output.

Usage

quiet(x)

Value

Returns whatever the called routine returns in invisible form.

Arguments

x

routine to be called

Author

Danail Obreschkow

Examples

Run this code
# Test function
test = function(x) {
  cat('This routine is likes to talk a lot!\n')
  return(x^2)
}

# Standard call call:
y = test(5)
print(y)

# Quiet call:
y = quiet(test(6))
print(y)

Run the code above in your browser using DataLab