Like classic capture.output(), but with additional arguments collapse and trim.
Usage
capture.output2(..., collapse = "\n", trim = FALSE)
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().