capture.output2 | R Documentation |
Like classic capture.output()
, but with additional arguments collapse
and trim
.
capture.output2(..., collapse = "\n", trim = FALSE)
... |
Arguments passed on to |
collapse |
If |
trim |
If |
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()
.
capture.output()
x <- capture.output2(str(list(a = 1, b = 2, c = 1:3)))
cat2(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.