quiet: Suppress console output

View source: R/quiet.R

quietR Documentation

Suppress console output

Description

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

Usage

quiet(x)

Arguments

x

routine to be called

Value

Returns whatever the called routine returns in invisible form.

Author(s)

Danail Obreschkow

Examples

# 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)


obreschkow/cooltools documentation built on Nov. 16, 2024, 2:46 a.m.