| 1 |
% Generated by roxygen2: do not edit by hand |
| 2 |
% Please edit documentation in R/record.R |
| 3 |
\name{record_print} |
| 4 |
\alias{record_print} |
| 5 |
\alias{record_print.default} |
| 6 |
\alias{record_print.record_asis} |
| 7 |
\alias{new_record} |
| 8 |
\title{Print methods for \code{record()}} |
| 9 |
\usage{ |
| 10 |
record_print(x, ...) |
| 11 |
|
| 12 |
\method{record_print}{default}(x, ...) |
| 13 |
|
| 14 |
\method{record_print}{record_asis}(x, ...) |
| 15 |
|
| 16 |
new_record(x, class) |
| 17 |
} |
| 18 |
\arguments{ |
| 19 |
\item{x}{For \code{record_print()}, the value to be printed. For \code{new_record()}, a |
| 20 |
character vector to be included in the printed results.} |
| 21 |
|
| 22 |
\item{...}{Other arguments to be passed to \code{record_print()} methods.} |
| 23 |
|
| 24 |
\item{class}{A class name. Possible values are \code{xfun:::.record_cls}.} |
| 25 |
} |
| 26 |
\value{ |
| 27 |
A \code{record_print()} method should return a character vector or a list |
| 28 |
of character vectors. The original classes of the vector will be discarded, |
| 29 |
and the vector will be treated as console output by default (i.e., |
| 30 |
\code{new_record(class = "output")}). If it should be another type of output, |
| 31 |
wrap the vector in \code{\link[=new_record]{new_record()}} and specify a class name. |
| 32 |
} |
| 33 |
\description{ |
| 34 |
An S3 generic function to be called to print visible values in code when the |
| 35 |
code is recorded by \code{\link[=record]{record()}}. It is similar to \code{\link[knitr:knit_print]{knitr::knit_print()}}. By |
| 36 |
default, it captures the normal \code{\link[=print]{print()}} output and returns the result as a |
| 37 |
character vector. The \code{knitr_kable} method is for printing \code{\link[knitr:kable]{knitr::kable()}} |
| 38 |
output. Users and package authors can define other S3 methods to extend this |
| 39 |
function. |
| 40 |
} |