Like classic capture.output()
, but with additional arguments collapse
and trim
.
Arguments
- ...
Arguments passed on to
capture.output()
.- collapse
If
TRUE
, lines are collapsed into a single string. IfFALSE
, lines are returned as is. If any character, lines are collapsed using that character.- trim
If
TRUE
, leading and trailing whitespace from each line is removed before the lines are collapsed and/or returned.
Value
If collapse
is TRUE
or "\n"
, a character vector of length 1. Else, a character vector of length n
, where n
corresponds to the number of lines outputted by the expression passed to capture.output()
.