run_and_capture {simplermarkdown} | R Documentation |
Run code and capture the output
Description
Run code and capture the output
Usage
run_and_capture(
code,
echo = TRUE,
results = TRUE,
output = results,
capture_warnings = FALSE,
capture_messages = results,
muffle_warnings = FALSE,
muffle_messages = TRUE
)
Arguments
code |
character vector or expression with the code to run |
echo |
the code in |
results |
include the results of running the code in the output. |
output |
include output that is explicitly written to the output, for
example using |
capture_warnings |
include warnings in the output. |
capture_messages |
include messages in the output. |
muffle_warnings |
do not show warnings in the console. |
muffle_messages |
do not show messages in the console. |
Value
Returns a list. Each item of the list contains a list with elements
input
and output
. input
contains the command/code and
output
the corresponding output. These are empty vectors when there is
no output or when input and output are suppressed using one of the
echo
/results
/output
statements.
[Package simplermarkdown version 0.0.6 Index]