Debian Codegraph @

man/knit_meta.Rd

raw
1 % Generated by roxygen2: do not edit by hand
2 % Please edit documentation in R/output.R
3 \name{knit_meta}
4 \alias{knit_meta}
5 \alias{knit_meta_add}
6 \title{Metadata about objects to be printed}
7 \usage{
8 knit_meta(class = NULL, clean = TRUE)
9
10 knit_meta_add(meta, label = "")
11 }
12 \arguments{
13 \item{class}{Optionally return only metadata entries that inherit from the
14 specified class. The default, \code{NULL}, returns all entries.}
15
16 \item{clean}{Whether to clean the collected metadata. By default, the
17 metadata stored in \pkg{knitr} is cleaned up once retrieved, because we may
18 not want the metadata to be passed to the next \code{knit()} call; to be
19 defensive (i.e. not to have carryover metadata), you can call
20 \code{knit_meta()} before \code{knit()}.}
21
22 \item{meta}{A metadata object to be added to the session.}
23
24 \item{label}{A chunk label to indicate which chunk the metadata belongs to.}
25 }
26 \value{
27 \code{knit_meta()} returns the matched metadata specified by
28 \code{class}; \code{knit_meta_add()} returns all current metadata.
29 }
30 \description{
31 As an object is printed, \pkg{knitr} will collect metadata about it (if
32 available). After knitting is done, all the metadata is accessible via this
33 function. You can manually add metadata to the \pkg{knitr} session via
34 \code{knit_meta_add()}.
35 }