capture.output.both: capture.output.both captures both output and messages

capture.output.bothR Documentation

capture.output.both captures both output and messages

Description

Adaptation of utils::capture.output() to enable capture of both output and messages

Usage

capture.output.both(
  ...,
  file = NULL,
  append = FALSE,
  type = c("both", "output", "message"),
  split = FALSE
)

Arguments

...

Expressions to be evaluated

file

A file name or a connection, or NULL to return the output as a character vector. If the connection is not open, it will be opened initially and closed on exit.

append

logical. If file a file name or unopened connection, append or overwrite?

type

is passed to sink, see there (but both is allowed)

split

is passed to sink, see there

Value

A character string (if file = NULL), or invisible NULL

details

See utils::capture.output() for detailed description. The current function allows type='both'.


HanOostdijk/HOQCutil documentation built on July 28, 2023, 5:56 p.m.