record()
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.
record_print(x, ...)# S3 method for default
record_print(x, ...)
# S3 method for record_asis
record_print(x, ...)
new_record(x, class)
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.
For record_print()
, the value to be printed. For new_record()
, a
character vector to be included in the printed results.
Other arguments to be passed to record_print()
methods.
A class name. Possible values are xfun:::.record_cls
.