record_output: Record output of an R script and return it as a character...

View source: R/record-output.R

record_outputR Documentation

Record output of an R script and return it as a character vector

Description

This function uses record() internally, but instead of creating an ascii cast, it just returns the output of the code in a character vector.

Usage

record_output(
  script,
  echo = FALSE,
  prompt = echo,
  stdout = TRUE,
  stderr = TRUE,
  ...
)

Arguments

script

The code to record, passed to record().

echo

Whether to include the input in the return value.

prompt

Whether to include the R prompt in the return value.

stdout

Whether to include the standard output in the return value.

stderr

Whether to include the standard error in the return value.

...

Addiitonal arguments are passed to record(). (You cannot use typing_speed and echo, though, because these are used internally by record_output().

Value

Character vector of output (plus input if echo, plus prompt if prompt), as it would appear on a terminal.

See record() for additional options.


asciicast documentation built on May 29, 2024, 6:24 a.m.