| record_print {xfun} | R Documentation |
Print methods for record()
Description
An S3 generic function to be called to print visible values in code when the
code is recorded by record(). It is similar to knitr::knit_print(). By
default, it captures the normal print() output and returns the result as a
character vector. The knitr_kable method is for printing knitr::kable()
output. Users and package authors can define other S3 methods to extend this
function.
Usage
record_print(x, ...)
## Default S3 method:
record_print(x, ...)
new_record(x, class)
Arguments
x |
For |
... |
Other arguments to be passed to |
class |
A class name. Possible values are |
Value
A record_print() method should return a character vector or a list
of character vectors. The original classes of the vector will be discarded,
and the vector will be treated as console output by default (i.e.,
new_record(class = "output")). If it should be another type of output,
wrap the vector in new_record() and specify a class name.