This function wraps knitr's knit
function in
a way that captures and records some or all values generated by code within the report, as well as the report itself.
This means that many records will generally be added to the trackr db for a single call to this function.
knit_and_record(
input,
...,
verbose = FALSE,
tmptdb = TrackrDB(backend = ListBackend(), img_dir = img_dir(defaultTDB())),
recvars = NULL,
dryrun = FALSE
)
The input argument exactly as knitr's knit
function accepts it
Passed directly to knit
passed to (multiple) record
calls for report
and its outputs
A TrackrDB in which to temporarily record results which are printed within the dynamic document. Generally this should not need to be changed, as it is only used to collect the records so they can be associated with the result for the whole document (in the defaultTDB).
character or NULL. The names of variables generated by the code within input
which should be automatically recorded, or NULL.
logical. Should a dryrun be performed?
When recvars
is NULL, any objects which are
visibly printed within the report are also
recorded. Otherwise, only the values of the listed variables
(after all code has been evaluated) are recorded, regardless
of visibility